Chapter One
Chapter One
1.0. INTRODUCTION
In human's daily life, environment, gives the most significant impact to our health issues Therefore,
environment and industrial air quality issues are critically discussed to increase the awareness and
responsibility regarding the threat on the environment towards public and health workers. Most of
the dangerous gas such as carbon monoxide (CO), refrigerant gas and liquefied petroleum gas
(LPG) are colorless and odorless compound that are produced ty incomplete combustion. (Theraja,
1995)
2CH+90, 400+200+ 8H₂O Therefore, gas detector device is needed in order to give information
about the safety situation continuously. Carbon monoxide (CO), often referred to as a "silent killer"
is an injurious gas and its prolonged exposure to living beings can lead to brain damage and even
death. The harmfulness of CO is dependent on both, the concentration of the gas and the exposure
time. Thus, a small concentration of the CO when exposed for a long period of time can be fatal just
like a large concentration of the CO for a small period of time. Fires are the most common source of
CO. In smaller quantities (eg 100 ppm) it may cause a headache and dizziness after a couple of
hours of exposure. Higher concentrations (example 3200 ppm) may causes headaches and dizziness
Very high concentrations (e.g. 12800 ppm) causes unconsciousness after a couple of breaths,
The indoor dangerous sources are the leak source of CO, CO2 and CH4, which may be gas tank or
the fire site. The essential component of coal gas or natural gas is CO or alkanes gas The burning of
chemical materials or decorative materials will emanate CO, CO2 and alkanes gas. The danger of
these gases arising is from two aspects, one is the toxicity of these gases themselves, the other side
1
is that the accumulation of these gases can easy be ignited. The danger of the CO gas is the same as
the LPG and others dangerous gas in the environment Gas detector is a gas detecting device. That
gives alert in the event of gas leakage thought of finding a lasting solution to this problem infirm
Due to recent fire outbreak and incidence of gas explosion and fire resulting in gas leakages that are
not detected in time. The purpose of this project is to develop alarm system for gas detector. The
gas sensor used in this project is MQ6 which detect the present of smoke alcohol and Liquefied
Petroleum Gas (LPG). This sensor will detect the concentration of the gas according the voltage
output of the sensor. To make the sensors operate in the alarm system and data monitoring system,
Arduino Uno was used as the microcontroller for the whole system.
1.3.1. Aim
The aim of this project is to design and construct a gas leakage detector
1.3.2. Objectives
2 To design gas control system that shows the indicator alarm and blow the buzzer.
This project work is design and construction of gas leakage detector that can detect the presence of
LPG gases and sound an alarm to alert the user of a gas leakage This project is limited to the use of
2
CHAPTER TWO
A gas detector is a device that detects the presence of gases in an area, often as part of a safety
system. This type of equipment is used to detect a gas leakage or other emissions and can be
interface with a control system so that a process can be automatically shut down. A gas detector can
sound an alarm to operators in the area where the leak is occurring, giving them the opportunity to
leave. This type of device is important because there are many gases that can be harmful to organic
Gas detectors can be used to detect combustible, flammable and toxic gases, and oxygen depletion.
This type of device is used widely in industry and can be found in locations, such as on oil rigs, to
monitor manufacture processes and emerging technologies such as photovoltaic. They may be used
in firefighting.
Gas leak detection is the process of identifying potentially hazardous gas leaks by sensors. These
sensors usually employ an audible alarm to alert people when a dangerous gas has been detected.
Exposure to toxic gases can also occur in operations such as painting, fumigation, fuel filling,
construction, excavation of contaminated soils, landfill operations, entering confined spaces, etc.
Common sensors include combustible gas sensors, photoionization detectors, infrared point sensors,
ultrasonic sensors, electrochemical gas sensors, and semiconductor sensors. More recently, infrared
imaging sensors have come into use. All of these sensors are used for a wide range of applications
facilities, paper pulp mills, aircraft and ship-building facilities, hazmat operations, waste-water
treatment facilities, vehicles, indoor air quality testing and homes (Moris, 1989)
3
2.3 Types of Gas Detectors
Gas detectors can be classified according to the operation mechanism (semiconductors, oxidation,
catalytic, photolonization, infrared, etc). Gas detectors can be packaged into two main form is
Portable detectors are used to monitor the atmosphere around personnel and are either hand-held or
worn on clothing or on a belt/harness. These gas detectors are usually battery operated. They
transmit warnings via audible and visible signals, such as alarms and flashing lights, when
dangerous levels of gas vapors are detected (Haufman and Seidman, 1993)
Fixed type gas detectors may be used for detection of one or more gas types. Fixed type detectors
are generally mounted near the process area of a plant or control room, or an area to be protected,
such as a residential bedroom. Generally, industrial sensors are installed on fixed type mild steel
structures and a cable connects the detectors to a SCADA system for continuous monitoring. A
Electrochemical
Electrochemical gas detectors work by allowing gases to diffuse through a porous membrane to an
electrode where it is either chemically oxidized or reduced. The amount of current produced is
determined by how much of the gas is oxidized at the electrode, indicating the concentration of the
gas. Manufactures can customize electrochemical gas detectors by changing the porous barrier to
allow for the detection of a certain gas concentration range. Also, since the diffusion barrier is a
physical/mechanical barrier, the detector tended to be more stable and reliable over the sensor's
duration and thus required less maintenance than other early detector technologies.
However, the sensors are subject to corrosive elements or chemical contamination and may last
only 1-2 years before a replacement is required. Electrochemical gas detectors are used in a wide
variety of environments such as refineries, gas turbines, chemical plants, underground gas storage
sampled gas. If the compound has an ionization energy below that of the lamp photons, an electron
will be ejected, and the resulting current is proportional to the concentration of the compound.
Common lamp photon energies include 10.0 eV, 10.6 eV and 11.7 eV; the standard 10.6 eV lamp
lasts for years, while the 11.7 eV lamp typically last only a few months and is used only when no
other option is available. A broad range of compounds can be detected at levels ranging from a few
ppb to several thousand ppm. Detectable compound classes in order of decreasing sensitivity
include: aromatics and alkyl iodides, olefins, sulfur compounds, amines, ketones, ethers, alkyl
bromides and silicate esters; organic esters, alcohols, aldehydes and alkanes, H2S, NH3, PH3 and
organic acids. There is no response to standard components of air or to mineral acids. Major
advantages of PIDs are their excellent sensitivity and simplicity of use, the main limitation is that
measurements are not compound-specific. Recently PIDs with pre-filter tubes have been introduced
that enhance the specificity for such compounds as benzene or butadiene. Fixed, hand-held and
miniature clothing-clipped PIDs are widely used for industrial hygiene, hazmat, and environmental
Infrared point
Infrared (IR) point sensors use radiation passing through a known volume of gas; energy from the
sensor beam is absorbed at certain wavelengths, depending on the properties of the specific gas. For
example, carbon monoxide absorbs wavelengths of about 4.2-4.5 um. The energy in this
wavelength is compared to a wavelength outside of the absorption range; the difference in energy
This type of sensor is advantageous because it does not have to be placed into the gas to detect it
and can be used for remote sensing. Infrared point sensors can be used to detect hydrocarbons and
other infrared active gases such as water vapor and carbon dioxide IR sensors are commonly found
in waste-water treatment facilities, refineries, gas turbines. chemical plants, and other facilities
5
where flammable gases are present and the possibility of an explosion exists. The remote sensing
Engine emissions are another area where IR sensors are being researched The sensor would detect
high levels of carbon monoxide or other abnormal gases in vehicle exhaust and even be integrated
Semiconductor
Semiconductor sensors detect gases by a chemical reaction that takes place when the gas comes in
direct contact with the sensor. Tin dioxide is the most common material used in semiconductor
sensors, and the electrical resistance in the sensor is decreased when it comes in contact with the
monitored gas. The resistance of the tin dioxide is typically around 50kQ in air but can drop to
around 3.5 k in the presence of 1% methane. This change in resistance is used to calculate the gas
concentration. Semiconductor sensors are commonly used to detect hydrogen, oxygen, alcohol
vapor, and harmful gases such as carbon monoxide. One of the most common uses for
semiconductor sensors is in carbon monoxide sensors. They are also used in breathalyzers. Because
the sensor must come in contact with the gas to detect it, semiconductor sensors work over a
Ultrasonic
Ultrasonic gas detectors use acoustic sensors to detect changes in the background noise of its
environment. Since most high-pressure gas leaks generate sound in the ultrasonic range of 25 kHz
to 10 MHz, the sensors are able to easily distinguish these frequencies from background acoustic
noise which occurs in the audible range of 20 Hz to 20 kHz. The ultrasonic gas leak detector then
produces an alarm when there is an ultrasonic deviation from the normal condition of background
noise. Ultrasonic gas leak detectors cannot measure gas concentration, but the device is able to
determine the leak rate of an escaping gas because the ultrasonic sound level depends on the gas
6
Ultrasonic gas detectors are mainly used for remote sensing in outdoor environments where weather
conditions can easily dissipate escaping gas before allowing it to reach leak detectors that require
contact with the gas to detect it and sound an alarm. These detectors are commonly found on
offshore and onshore oil/gas platforms, gas compressor and metering stations, gas turbine power
plants.
The LPG Gas Sensor is used in gas detection equipment for detecting Propane gas in home,
automotive or industrial settings. This sensor is compatible with all Parallax microcontrollers, and
would be a good addition to any projects needing to sense the presence of propane
Gas sensors based on nickel oxide come in various types. Gas sensors can be either optical or
electrical. The principle of most gas sensors is that a reaction of the sensor with the gas causes
changes in the surface of the sensor, which results in changes of the optical and/or electrical
properties.
a. Optical Sensors
In optical sensors, the colour of the sensor varies with the concentration of the detected gas. Optical
b. Electrical Sensors
Electrical sensors come in two types. In the first type the resistance of the sensor varies with the
concentration of the gas. In the other type the output voltage depends on the concentration. The
resistance-type sensors operate due to a reaction of the gas with chemisorbed oxygen at the surface
of the sensor. This changes the amount of electrons at the surface and thereby the conductivity.
The voltage-type sensors use nickel oxide as thermoelectric (TE) material. By applying a
9
2.3.2 MQ-6 Gas Sensor
Sensitive material of MQ-6 gas sensor is SnO2 with lower conductivity in clean air When the target
combustible gas exist the sensor's conductivity is increases along with the gas concentration rising.
Simple electro circuit is used to convert change of conductivity into corresponding output signal of
MQ-6 gas sensor has high sensitivity to Propane, Butane and LPG. It also response to Natural gas.
The sensor could be used to detect different combustible gas, especially Methane. It has low cost
Features
Fast response
10
Plate 1. MQ-6 Gas Sensor
11
Table 1. Specifications:
12
Structure and Circuit:
Cross-Sectional View:
13
2.4 Microcontroller
Description
The AT8988253 is a low-power, high-performance CMOS 8-bit microcontroller. The device is
manufactured using Atmel's high-density non-volatile memory technology and is compatible with
the industry-standard MCS-51 instruction set and pin out. The on-chip downloadable Flash allows
conventional non-volatile memory programmer. In addition, the AT89S8253 is designed with static
logic for operation down to zero frequency and supports two software selectable power saving
modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and
interrupt system to continue functioning. The Power-down mode saves the RAM contents but
freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware
Features:
12K Bytes of In-System Programmable (ISP) Flash Program Memory
Enhanced UART Serial Port with Framing Error Detection and Automatic
14
Address Recognition
Power-off Flag
Page Mode: 64 Bytes/Page for Code Memory, 32 Bytes/Page for Data Memory
Description
Depending on the design, it may be used to regulate one or more AC or DC voltages. With the
exception of passive shunt regulators, all modern electronic voltage regulators operate by
comparing the actual output voltage to some internal fixed reference voltage. Any difference is
amplified and used to control the regulation element in such a way as to reduce the voltage error.
This forms a negative feedback control loop; increasing the open-loop gain tends to increase
regulation accuracy but reduce stability (avoidance of oscillation, or ringing during step changes).
If the output voltage is too low the regulation element is commanded, up to a point, to produce a
higher output voltage by dropping less of the input voltage if the output voltage is too high, the
15
regulation element will normally be commanded to produce a lower voltage. However, many
regulators have over-current protection, so that they will entirely stop sourcing current (or limit the
current) if the output current is too high, and some regulators may also shut down if the input
16
Advantages:
The 7805 series has several key advantages over many other voltage regulator circuits which have
7805 series ICs do not require any additional components to provide a constant, regulated
source of power, making them easy to use, as well as economical. By contrast, most other
voltage regulators require several additional components to set the output voltage level. or to
78xx series ICs have built-in protection against a circuit drawing too much power. They also
have protection against overheating and short-circuits, making them quite robust in most
applications. In some cases, the current-limiting features of the 78xx devices can provide
protection not only for the 78xx itself, but also for other parts of the circuit it is used in,
Disadvantages:
The 78xx devices have a few drawbacks which can make them unsuitable or less desirable for some
applications:
The input voltage must always be higher than the output voltage by some minimum amount
(typically 2 volts). This can make these devices unsuitable for powering some devices from
certain types of power sources (for example, powering a circuit which requires 5 volts using 6-
As they are based on a linear regulator design, the input current required is always the same as
the output current. As the input voltage must always be higher than the output voltage, this
means that the total power (voltage multiplied by current) going into the 78xx will be more than
the output power provided. The extra input power is dissipated as heat. This means both that for
17
2.6 Crystal Oscillator
A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal
of piezoelectric material to create an electrical signal with a very precise frequency. This frequency
is commonly used to keep track of time, to provide a stable clock signal for digital integrated
18
A crystal oscillator is an electronic circuit that produces electrical oscillations at a particular
designed frequency determined by the physical characteristics of one or more crystals, generally of
quartz positioned in the circuit feedback loop. A piezoelectric effect causes a crystal such as quartz
to vibrate and resonate at a particular frequency. The crystal oscillator is generally used in various
forms such as a frequency generator, a frequency modulator and a frequency converter (Haufman
The crystal oscillator utilizes crystal having excellent piezoelectric characteristics, in which crystal
functions as a stable mechanical vibrator. There are many types of crystal oscillators. One of them
oscillation frequency arises from the frequency- temperature characteristic of the quartz-crystal unit
source particularly for a variety of portable electronic devices such as portable telephones because
Operation
When a crystal of quartz is properly cut and mounted, it can be made to distort in an electric field
piezoelectricity. When the field is removed, the quartz will generate an electric field as it returns to
its previous shape, and this can generate a voltage. The result is that a quartz crystal behaves like a
circuit composed of an inductor, capacitor and resistor, with a precise resonant frequency.
provide multiple different levels of startup current. XTALI and XTAL2 are the input and output,
respectively, of an inverting amplifier that can be configured for use as an on-chip oscillator. Either
19
a quartz crystal or ceramic resonator may be used. For frequencies above 16MHz it is
To drive the device from an external clock source, XTAL2 should be left unconnected while
XTAL1 is driven.
20
Advantages:
High stability
Limitation:
Environmental changes of temperature, humidity, pressure, and vibration can change the resonant
frequency.
A liquid crystal display (LCD) is a thin, flat panel used for electronically displaying information
such as text, images and moving pictures. Its uses include monitors for computers, televisions,
gaming devices, watches, calculators etc. It consumes low electrical power and is an electronically-
modulated optical device made up of any number of pixels filled with liquid crystals and arrayed in
Specifications
Resolution: The horizontal and vertical screen size expressed in pixels (e.g., 1,024×768).
Dot pitch: The distance between the centres of two adjacent pixels. The smaller the dot
Viewable size: The size of an LCD panel measured on the diagonal (more specifically
Response time: The minimum time necessary to change a pixel's colour or brightness.
Input lag: A delay between the moment monitor receives the image over display link and
the moment the image is displayed. Input lag is caused by internal digital processing such as
being given.
Brightness: The amount of light emitted from the display (more specifically known as
luminance).
Contrast ratio: The ratio of the intensity of the brightest bright to the darkest dark.
Aspect ratio: The ratio of the width to the height (for example, 4:3, 5:4, 16:9 or 16:10).
Colour Display
In colour LCDs each individual pixel is divided into three cells, or sub pixels, which are coloured
red, green, and blue, respectively. LCD and CRT monitors are direct applications of the RGB
colour model and give the illusion of representing a continuous spectrum of hues as a result of the
Colour components may be arrayed in various pixel geometries, depending on the monitor's usage.
If the software knows which type of geometry is being used in a given LCD, this can be used to
increase the apparent resolution of the monitor through sub pixel rendering. This technique is
LCDs with a small number of segments have individual electrical contacts for each segment. An
external dedicated circuit supplies an electric charge to control each segment. Small monochrome
displays have a passive-matrix structure employing Super Twisted Nematic (STN) or Double Layer
STN (DSTN) technology and colour-STN (CSTN)-wherein colour is added by using an internal
filter.
Each row or column of the display has a single electrical circuit. The pixels are addressed one at a
time by row and column addresses. This type of display is called passive-matrix addressed because
the pixel must retain its state between refreshes without the benefit of a steady electrical charge. As
22
the number of pixels (and, correspondingly columns and rows) increases, this type of display
becomes less feasible. Very slow response times and poor contrast are typical of passive-matrix
addressed LCDs.
High-resolution colour displays such as modern LCD computer monitors and televisions use an
active matrix structure. A matrix of thin-film transistors (TFTs) is added to the polarizing and
colour filters. Each pixel has its own dedicated transistor, allowing each column line to access one
pixel. When a row line is activated, all of the column lines are connected to a row of pixels and the
correct voltage is driven onto all of the column lines. The row line is then deactivated and the next
row line is activated. All of the row lines are activated in sequence during a refresh operation.
Active-matrix addressed displays look "brighter" and "sharper" than passive-matrix addressed
displays of the same size, and generally have quicker response times, producing much better
images.
23
24
2.8 Buzzer
electromechanical or electronic. Typical uses of buzzers and beepers include alarms, timers and
confirmation of user input such as a mouse click or keystroke In electronic buzzer a piezoelectric
element may be driven by an oscillating electronic circuit or other audio signal source. Sounds
commonly used to indicate that a button has been pressed are a click, a ring or a beep.
Uses
Annunciation panels
Electronic metronomes
Game shows: The buzzer is also used to signal wrong answers and when time expires on many
game shows.
2.9 Resistors
The resistor's function is to reduce the flow of electric current. This symbol -W-is used to indicate a
resistor in a circuit diagram, known as a schematic. Resistance value is designated in units called
Fixed resistors
Variable resistors
They are also classified according to the material from which they are made. The typical resistor is
made of either carbon film or metal film. The resistance value of the resistor is not the only thing to
consider when selecting a resistor for use in a circuit. The "tolerance" and the electric power ratings
of the resistor are also important. The maximum rated power of the resistor is specified in Watts.
Power is calculated using the square of the current (12) x the resistance value (R) of the resistor. If
the maximum rating of the resistor is exceeded, it will become extremely hot, and may even burn.
25
Generally, it's safe to choose a resistor which has a power rating of about twice the power
consumption needed. The resistance value is displayed using the colour code.
A. Fixed Resistors
A fixed resistor is one in which the value of its resistance cannot change.
Carbon film resistor: This is the most general purpose, cheap resistor. Usually the tolerance of the
resistance value is ±5%. Power ratings of 1/8W, 1/4W and 1/2W are frequently used. This resistor
is called a Single-In-Line(SIL) resistor network. It is made with many resistors of the same value,
all in one package. One side of each resistor is connected with one side of all the other resistors
inside.
Metal film resistors: Metal film resistors are used when a higher tolerance (more accurate value) is
needed. They are much more accurate in value than carbon film resistors. They have about ±0.05%
tolerance. They have about ±0.05% tolerance Ni-Cr (Nichrome) used for the material of resistor.
The metal film resistor is used for bridge circuits, filter circuits, and low-noise analog signal
circuits.
B. Variable Resistors
There are two general ways in which variable resistors are used. One is the variable resistor which
value is easily changed, like the volume adjustment of Radio. The other is semi-fixed resistor that is
not meant to be circuit by the technician. Semi-fixed resistors are used to compensate for the
inaccuracies of the resistors, and to fine-tune a circuit. The rotation angle of the variable resistor is
usually about 300 degrees. Some variable resistors must be turned many times to use the whole
range of resistance they offer. This allows for very precise adjustments of their value.
26
27
Table 2.2 Resistor Colour Code
Colour Value Multiplier Tolerance (%)
Black 0 0 -
Brown 1 1 +1
Red 2 2 +2
Orange 3 3 + 0.05
Yellow 4 4 -
Green 5 5 + 0.5
Blue 6 6 + 0.25
Violet 7 7 + 0.1
Gray 8 8 -
White 9 9 -
Gold - -1 +5
Silver - -2 + 10
None - - + 20
28
2.10 Capacitors
The capacitor's function is to store more electricity, or electrical energy. The capacitor also
functions as a filter, passing alternating current (AC) and blocking direct current (DC). This symbol
is used to indicate a capacitor in a circuit diagram. The capacitor is constructed with two electrode
When DC voltage is applied to the capacitor, an electric charge is stored in electrode. While the
capacitor is charging up, current lows. The current will stop flowing when the capacitor has fully
charged.
The most used capacitors are mica, paper, electrolytic and ceramic capacitors Electrolytic
capacitors use a molecular thin oxide film as the dielectric resulting in large capacitance values.
There is no polarity required, since either side can be the most positive plate, except for electrolytic
capacitors. These are marked to indicate which side must be positive to maintain the internal
electrolytic action that produces the dielectric required to form the capacitance. It should be noted
that the polarity of the charging source determines the polarity of the capacitor voltage.
Capacitance:
This is a measure of a capacitor's ability to store charge. Capacitance is measured in farads, symbol
F. However, IF is very large, so prefixes are used to show the smaller values. Three prefixes
Types of Capacitors:
There are various types of capacitors available in the market. Some of them are as follows:
Mica Capacitor
Paper Capacitor
Ceramic Capacitor
Variable Capacitor
29
Electrolytic Capacitor
Film Capacitor
Polystyrene Capacitor
Examples
30
Plate 14. Electrolytic Capacitor
31
Unpolarised Capacitors (Small Values, up to 1µF):
Examples:
Small value capacitors are unpolarised and may be connected either way round. They are not
damaged by heat when soldering, except for one unusual type (polystyrene). They have high
The 3rd number is the number of zeros to give the capacitance in pF.
Ignore any letters - they just indicate tolerance and voltage rating.
32
Table 2.3. Capacitor Colour Codes
Colour Black Brown Red Orange Yellow Green Blue Violet Gray White
Number 0 1 2 3 4 5 6 7 8 9
33
Ceramic Capacitor:
The ceramic dielectric materials are made from earth under extreme heat. By use of titanium
dioxide or several types of silicates, very high values of dielectric constant can be obtained.
34
CHAPTER THREE
3.1 Materials
1. Pic161877 Ic
2. Capacitors
3. Resistor 22p
4. LCD Screen
6. Battery (9v)
The gas sensor module used in this circuit. This Liquefied petroleum gas (LPG) Gas Sensor (MQ6),
ideal sensor are used to detect the presence of a dangerous Liquefied petroleum gas (LPG), and it
(CH2=C(CH3)2. The sensor can also be used to detect combustible gases, especially methane. This
sensor has a high sensitivity and fast response time. The circuit is very simple. This circuit can
detect leakages in your Home, car or in a service station, storage tank environment. This unit can be
The AT89S52 is a low power, high performance CMOS 8-bit microcontroller with 8Kbytes of in-
system programmable flash memory. The device is manufactured using Atmel's high-density
nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set
and pin out. The on-chip flash allows the program memory to be reprogrammed in-system or by a
conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system
35
programmable flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which
The AT89S52 provides the following standard features: 8Kbytes of flash, 256-bytes of Random
Access Memory (RAM), 32 Input/Output (I/O) lines, watchdog timer, two data pointers, three 16-
bit timers/counters, a six-vector two level interrupt architecture, a full duplex serial port, on-chip
oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation
down to zero frequency and supports two software selectable power saving modes. The idle mode
stops the Central Processing Unit (CPU) while allowing the RAM, timer/counters, serial port, and
interrupt system to continue functioning. The power-down mode saves the Random Access
Memory (RAM) contents but freezes the oscillator, disabling all other chip functions until the next
36
Circuit Diagram of the System
37
Transistors
Transistors are active component used basically as amplifier and switches. The two main types of
transistors whose operation depends on the flow of both minority and majority carrier, and the
unipolar or field transistor (called) FET in which current is due to majority carriers only (either
electron or hole). The value of the bias current is either increasing or decreasing about its mean
value by the input signal (if operated as an amplifier). For the transisitors configuration;
3.4 Resistor
Resistor is a component of an electric circuit that resists the flow of direct or alternating electric
current. Resistors can limit or divide the current, reduce the voltage, protect an electric circuit, or
An electric current is the movement of charged particles called electrons from one region to
another. The amount of resistance to the flow of current that a resistor causes depends on the
material it is made of as well as its size and shape. Resistors are usually placed in electric circuits,
which are devices formed when current moves through an electrical conductor (a material that
allows the current to flow without much resistance, such as copper wire) and when the conductor
When a voltage, or electric potential, is applied to opposite ends of a circuit, it causes current to
flow through the circuit. As the current flows, it encounters a certain amount of resistance from the
conductor and any resistors in the circuit. Each material has a characteristics resistance. For
example, wood is a bad conductor because it offers high resistance to current; copper is a better
conductor because it offers less resistance. In any electric circuit, the current in the entire circuit is
equal to the voltage across the circuit divided by the resistance of the circuit. Resistors are often
made to have a specific value of resistance so that the characteristics of the circuit can be accurately
calculated.
38
3.5 Capacitor
Capacitor, or electrical condenser, device for strong an electrical charge, in its simplest form a
capacitor consists of two metal plates separated by a non-conducting layer called the dielectric.
When one plate is charged with electricity from a direct-current or electrostatic source, the other
plate will have induced in it a charge of the opposite sign, that is, positive if the original charge is
negative and negative if the charge is positive The Leyden jar is a simple form of capacitor in which
the two conducting plates are metal foil coatings on the inside and outside of a glass bottle or jar
that serves as the dielectric The electrical size of a capacitor is its capacitance, the amount of
electric charge it can hold. Capacitors are produced in a wide variety of forms. Air, mica, ceramics,
paper, oil, and vacuums are used as dielectric, depending on the purpose for which the device is
intended.
measured in farads and is determined by the formula c q/v, where q is the charge (in coulombs) on
one of the conductors and v is the potential difference (in volts) between the conductors. The
capacitance depends only on the thickness, area, and composition of the capacitors dielectric.
3.6 Diode
The diode used in this project, perform the work of rectification. There three type of rectification;
half, full and bridge rectifier. But in this project work bridge rectifier was used.
39
Plate 3.1 Bridge Rectifier
40
3.7 LCD
LCD (liquid crystal display) screen is an electronics display module and find a wide range of
applications.
A 16x2 LCD display is a very basic module and is very commonly used in various device and
circuit. These modules are preferred over seven segments and other muilti-segment LEDS. The
reasons being: LCDs are economical, easily programmable, have no limitation of displaying special
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD
each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely command and
data
The command register stores the command instructions given to the LCD. A command is an
instruction given to LCD to do a prefixed task like initializing it, clearing its screen, setting the
cursor position, controlling display etc the data register stores the data to be displayed on the LCD.
The data is the ASCII valve of the character to be displayed on the LCD. The physical appearance
The design used 12V transformer. The circuit consists of microcontroller, transistors, regulator,
transistor LCD and some passive components. The regulator transistor is designed to limit the
output to 5V; this voltage will be maintain over the capability of the circuit, the transistor oscillator
is a high current type as it is turned ON for a very short time of period to saturate the core of the
transformer. The energy is then released as a high voltage pulse. These pulses are then passed to the
electrolytic capacitor and appear as a 5V supply to the traffic light controller circuit.
41
I.e. Vin = 12V
According to Hauman (1988)
Drop out voltage for I.C = 2V
Vdc = 1.41 Vac ------------------------------------- (i)
Idc = 191.6mA
Idc = 0.62mA Vac ------------------------- (ii)
Therefore total voltage = 12 + 2 + 1.14 = 15.41V
From equation (i)
Vdc = 1.41 x 12 = 16.92V
Vac= Vdc = 16.92V
1.41 1.41
This means input voltage to ICs is 12 V
From equation (ii)
Iac = Iac = 191.6
0.62 0.62
Iac = 3=9mA
This is the maximum current (Iac) each IC can carry effectively without deviation in its
characteristics.
The circuit is designed with an exit delay which is determined by the charging time of capacitor C 6
Hence: Time Constant ( ) = C6R11
Where C6 = 100µf , R11 = 220k
[] = 100 x 10-6 x 220 x 103
[] = 22s
Therefore at switch ON, it will take capacitor about 22seconds to charge.
The transistor Q1 has a gain of 258 i.e β = 258
Biasing is by fixed bias or Base Resistor method and it is used as a switch in the circuit.
Let Ic = Zero Signal Collector Current
IB = IC --------------------------- (i)
β
Ic = IB β ------------------------ (ii)
42
Applying Kirchhoff’s Voltage Law
Vcc = IBRB+VBE
RB =Vcc – VBE = IB = VCC,
IB IB
IB is approximately Vcc (Mehta, 2000)
RB
IB= 12 = 1.2mA
10000
Tessting with the multi-meter, B =258
From Equation ---------------------------- (ii)
Ic = 1.2MA x 258
Ic = 0.30 96A = 309.6 ma
43
CHAPTER FOUR
4.1 Construction
The construction of this project was conducted in various phases and each phase was carried out
based on the analysis of the design outline. The construction layout was implemented in the
following phases:
Layout Design
Soldering
The first thing that was considered during the planning of the layout design of the project was to
ensure that the project is as portable as possible. Before beginning the layouts design all the
required components to be used were purchased in order to make adequate assessment of space to
be used on the Vero board. Other considerations that were made including case to case of mounted
components over the Vero board or assess part of the present components. The entire components
needed for the projects were assembled part by part before the design layout of the project was
made.
It was necessary for some of the components to be arranged in different angular positions so that
the terminals would be as close as possible to ensure effective connections of the components. The
scale was checked by positioning the components on the squared paper or a sample board. All
common earths and common live/positive terminals where laid to a closely located position in order
to enable easy access to the board. This is very important especially when conducting testing
operations on the board. The layout design of the project was based on arranging and organizing the
44
board for this project in order to ensure space management, proper and regular component
placement.
The various components were arranged on the board based on the design layout. Having carried out
the layout and determined the way in which the various components are placed on the board. Then
the components were carefully placed on the board according to the design. The assembly and
placement of components was achieved by gradually placing the components on the Vero board.
4.1.3 Soldering
The soldering of the components on the Vero board involved mechanically attaching the various
components onto the board. It refers to the method by which various electrical components are
mechanically held together on the board to form an electrical circuit. The soldering process was
Soldering Lead
Cleanser
Lead Sucker
File
Cleaning brush
Cleaning rag.
The precautions observed during the soldering process include the following:
The Soldering iron was kept clean throughout the soldering operation
It was ensured that the soldering iron was left to assume optional temperature before putting
it into use.
45
Shortest possible contact period was maintained on the component of the soldering iron to
Too much lead was avoided on the board as this can lead to short circuit of various points.
Too small lead was avoided to avoid loose joint or dry joints.
The software used for this project was designed to intelligently control the switching of the various
components that are interconnected to the microcontroller to perform the ON and OFF. The
programming language used to write the program of this project is Assembly language.
The software program for the project was written and compiled on Kiel U VERSION software
which allows compilation of 8051based codes. The hex code generated for the program was then
4.2 Tests
The project was tested in various phases and these tests were carried out to ensure proper operation
of the constructed work. The Testing conducted for this project includes:
Continuity test
The continuity test was conducted in order to ensure that the constructed project is in total
compliance with the stipulated design. The continuity test was conducted by sampling the various
positions of the circuit diagram using the test leads of the multi- meter with the range meter of the
multi-meter placed in continuity test mode. The continuity test was also carried out to ensure that
46
there was no short circuit (bridge in the Line or cables) or open circuit (Cut cable or line) in the
The purpose of the power supply test was to ensure that the various voltage levels required at
various points in the circuit were readily available. The supply voltages required for the project
include the SV which is supplied to the microcontroller and the CMOS 4050. The other supply
voltages include the 12VDC source that serve as input and the 220VAC output used to power the
connected load. The power supply test was conducted by placing the multi-meter test leads at
various testing points and the range switch positioned at the correct voltmeter range. The power
The microcontroller machine cycle depends on the external oscillator connected between pins 18
and 19 in order to function effectively. The test of the external oscillation of the microcontroller
gives an analysis whether or not the microcontroller is functioning as required. The test was
conducted by placing the negative terminal of the test probe of the multi-meter on the two crystal
oscillator pins to ensure that it is oscillating when the multi-meter is set to voltage measurement.
The software simulation test involves designing the circuit of the project on a computer Sand
conducting simulations of the designed circuit. The simulation was carried out to observe how the
circuit operation will look like in reality using a given software program. The software used for the
simulation test of the project is the Proteus 7.4 which allows both the simulation of the software
47
4.2.5 Output Display Test
The output display used in the design of this project is the LCD and the buzzer. The operation of the
LCD was tested by using the oscilloscope to investigate the behaviors of the Enable pin (pin 6), the
Register Select pin (pin 4) and the Read Write pin (pin 5) of the LCD display. The behavior of the
output of these pins from the microcontroller tells the status of the LCD display.
During the continuity test some regulators were discovered ie, dry joint, open circuit but at the end,
adjustments were made on the constructed work, the circuit was in compliance and agreement with
the design.
The following results were obtained at the output of the power supply
CMOS 12VDC
The output wave form of the power supply can be illustrated as show below.
The results obtained from the microcontroller external oscillations test are as follows.
Voltage between ground and 1 ^ (st) oscillator pin (pin 19) =2. IV
Voltage between ground the second oscillator pin (pin * 18) = 2.1V
48
49
4.3.3 Software Simulation Test
Since the software simulation was conducted on a computer, the test results were observed by
examining the output from the simulation on the computer system. The output illustrates the
The result from this test is the display of the output of the Inverter on the LCD display which gives
a visual display. It gives the value of the Voltage, the battery status, the state of operation and the
mode of operation.
4.4 Casing
The casing refers to the external housing of the project. The casing used for this project is a white
metallic casing. The casing was able to comfortably accommodate the entire project and proper
The cost implication of the project can be summarized by the bill of engineering measurement and
50
BILLING OF ENGINEERING MEASUREMENT AND EVALUATION
(100) (N)
1. RESISTOR 8 20 160
2. DIODE 4 25 100
GRAND 25,110
TOTAL
51
CHAPTER FIVE
5.0. DISCUSSION, CONCLUSION AND RECOMMENDATION
5.1 Discussion
The project construction was executed in multiple phases, including layout design, component
assembly, soldering, and software development. The layout design focused on maximizing
portability and efficient use of space on the Vero board, with careful arrangement of components to
facilitate easy connections and testing. Assembly involved placing components according to the
design and soldering them using various tools, ensuring no thermal damage or loose joints.
Testing confirmed the project's functionality through several phases: continuity tests ensured no
circuit faults, power supply tests verified correct voltage levels, and microcontroller oscillation tests
showed proper operation. Software simulation tests demonstrated that the code performed as
expected, and output display tests confirmed that the LCD and buzzer provided accurate
Initial continuity tests identified issues like dry joints and open circuits, but these were resolved to
meet design specifications. Power supply tests showed stable voltages, while microcontroller
oscillation tests indicated correct functioning. The software simulation and output display tests
validated that the project operated correctly, displaying relevant data accurately.
The project was housed in a white metallic casing with proper ventilation, ensuring component
safety and functionality. The total cost of the project was 25,110 Naira, covering various
components and materials. The detailed cost analysis provides a clear overview of expenses,
reflecting a well-executed project within budget and demonstrating its successful construction and
operation.
5.2 Conclusion
At the completion of this project, it could be said here that despite the stress and difficulties
encountered in the research and construction work, the project work has been a success. The Gas
Leakage Detector with LCD display was tested in different modes and the performance had been
52
satisfactory. The flexibility of micro controller used in the design and construction has facilitated
5.3 Recommendation
Despite the excellent performance of the gas leakage detector with LCD display using micro
controller PIC 16F84A constructed tested and presenting in this report, further improvement is
recommended. Different programming alternatives and modification can be adopted for variety of
performance.
53
REFERENCES
Theraja B.L and A.K (1995) A Text Book of Electrical Technology, 2 nd Edition, Published
Delhi India.
Allel C.L Atwood K.W (John Authur II) (1973) Electronic Engineering Third Edition, John
Moris J.C (1989) Electronics, Practical Application and Design, Pub Edward Arnold, PP
Anderson R..J and G.L Harris (1997), Specification and Tolerances for Field Standard
Michael R. (1975); Electronic Clocks and Watches; Indianapolis: Howard W. Sams Co.
Cohen, Fred (1988) World War 3 … Information Warfare Basis, Journal of Security.
54