Вы находитесь на странице: 1из 55

Gas And Flame Detection Robot

CHAPTER-1
1.1.INTRODUCTION:
In industries some disasters or damages may occur due to the leakage of gas. When gas leakage occurs there is the problem of fire. If human beings are not present at the situation they cannot control the fire quickly. Due to this damage of machines may occur. So, in order to avoid this robot is designed called Gas and flame detection robot. In this project we detect the gas and flame to avoid disasters in industries or house. Here we are using a gas sensor for detection of gas that is leaked. Then the gas sensor sends a signal and activates the robot. Then it searches for fire on the four sides of the room by using flame sensors. If fire is detected on any side a fan is switched on and fire is controlled.

St.Anns Engineering College

Page 1

Gas And Flame Detection Robot

CHAPTER-2
2.1.BLOCK DIAGRAM:

2.2. BLOCK DIAGRAM DESCRIPTION:


The project is designed by following blocks Gas sensor Flame Sensor Amplifier Microcontroller LCD display Alarm with driver circuit Motor with driver circuit Robot model

St.Anns Engineering College

Page 2

Gas And Flame Detection Robot

The gas sensor is using here to sense the gas. The gas sensor output is very low voltage so we amplified that voltage with help of differential amplifier. The amplified voltage is given to micro controller. The micro controller may be Atmel or PIC both is flash types reprogrammable controller. Already we have programmed in microcontroller the microcontroller run according to our objective. The flame sensor is using here to sense the fire. The flame sensor output is very low voltage so we amplified that voltage with help of differential amplifier. The amplified voltage is given to micro controller. The micro controller may be Atmel or PIC both is flash types reprogrammable controller. Already we have programmed in microcontroller the microcontroller run according to our objective. Therefore, it received the signal from amplifier and activates corresponding driver circuit. It any objectives related to gas is there; the sensor detecting the gas finds that one and gives the signal to micro controller. By which the robot movement is controlled

now, the micro controller activates the alarm driver circuits. So the alarm makes sound for indication for fire. The keypad is used here to control the robot movement likes as forward and reverse direction and left and direction control.

St.Anns Engineering College

Page 3

Gas And Flame Detection Robot

CHAPTER-3
3.1: MICROCONTROLLER AT89C52: 3.1.1: ARCHITECTURE OF 89C52:

Fig 3.1:Architecture of 89C52

St.Anns Engineering College

Page 4

Gas And Flame Detection Robot

3.1.2: PIN DIAGRAM AND ITS DESCRIPTION:


The microcontroller generic part number actually includes a whole family of microcontrollers that have numbers ranging from 8031to 8751 and are available in NChannel Metal Oxide Silicon (NMOS) and Complementary Metal Oxide Silicon (CMOS) construction in a variety of package types.

PIN DIAGRAM:

Fig 3.2: Pin Diagram St.Anns Engineering College Page 5

Gas And Flame Detection Robot

With 4Kbytes of Flash Programmable and Erasable Read Only Memory (PEROM). The device is manufactured using Atmels high density nonvolatile memory technology and is compatible with the industry standard MCS-51 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 Flash on a monolithic chip, the Atmel AT89C52 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. The AT89C52 provides the following standard features: 4 Kbytes of Flash, 256 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C52 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 hardware reset

Port 0:
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and St.Anns Engineering College Page 6

Gas And Flame Detection Robot

outputs the code bytes during program verification. External pull-ups are required during program verification

Port 1:
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and program verification. Alternate functions of port 1

Port 2:
Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pullups. Port 2 emits the high-order address byte during fetches from external program memory St.Anns Engineering College Page 7

Gas And Flame Detection Robot

and during accesses to external data memory that use 16-bit addresses (MOVX A,@DPTR). In this application it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX A,@RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.

Port 3:
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special features of the AT89C52 as listed below: Alternate functions of port 3

RST:
RST means RESET; 89C52 uses an active high reset pin. It must go high for two machine cycles. The simple RC circuit used here will supply voltage (Vcc) to reset pin St.Anns Engineering College Page 8

Gas And Flame Detection Robot

until capacitance begins to charge. At a threshold of about 2.5V, reset input reaches a low level and system begin to run.

Fig: 3.3: Reset Connection

ALE/PROG:
Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.

PSEN:
Program Store Enable is the read strobe to external program memory. When the AT89C52 is executing code from external program memory, PSEN is activated twice

St.Anns Engineering College

Page 9

Gas And Flame Detection Robot

each machine cycle, except that two PSEN activations are skipped during each access to external data memory.

EA/VPP:
External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at OOOOH up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to Vcc for internal program executions. This pin also receives the 12-volt programming enable voltage (Vpp) during Flash programming, for parts that require 12-volt Vpp. XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit XTAL2: Output from the inverting oscillator amplifier. T2: External count input to Timer/Counter 2, Clock out. T2EX: Counter 2 capture/reload trigger & direction control.

3.1.3: THE ON-CHIP OSCILLATORS:


Pins XTAL1 and XTAL2 are provided for connecting a resonant network to form an oscillator. The crystal frequency is basic internal clock frequency. The maximum and minimum frequencies are specified from 1to 24MHZ. Program instructions may require one, two or four machine cycles to be executed depending on type of instructions. To calculate the time any particular instructions will take to be executed, the number of cycles C, T = C*12d / Crystal frequency St.Anns Engineering College Page 10

Gas And Flame Detection Robot

Here, we chose frequency as 11.0592MHZ. This is because, Baud= 2*clock frequency/(32d. 12d[256d-TH1]).The oscillator is chosen to help generate both standard and nonstandard baud rates. If standard baud rates are desired, an 11.0592MHZ crystal should be selected. From our desired standard rate, TH1 can be calculated. The internally implemented value of capacitance is 33 pf.

Fig 3.4: On-Chip Oscillators

Program Memory Lock Bits:


On the chip there are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features .When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly.

St.Anns Engineering College

Page 11

Gas And Flame Detection Robot

Program Counter and Data Pointer:


The 89C52 contains two 16-bit registers: the program counters (PC) and the data pointer (DPTR), Each is used to hold the address of a byte in memory. The PC is the only register that does not have an internal address. The DPTR is under the control of program instructions and can be specified by its 16-bit name, DPTR, or by each individual byte name, DPH and DPL. DPTR does not have a single internal address; DPH and DPL are each assigned an address.

A & B Registers:
The 89C52 contains 34 general-purpose, working, registers. Two of these, registers A and B, hold results of many instructions, particularly math and logical operations, of the 89C52 CPU. The other 32 are arranged as part of internal RAM in four banks, B0-B3, of eight registers. The A register is also used for all data transfers between the 89C52 and any external memory. The B register is used for with the A register for multiplication and division operations.

Flags and the Program Status Word (PSW):


Flags may be conveniently addressed, they are grouped inside the program status word (PSW) and the power control (PCON) registers. The 89C52 has four math flags that respond automatically to the outcomes of math operations and three general-purpose user flags that can be set to 1 or cleared to 0 by the programmer as desired. The math flags include Carry (C), Auxiliary Carry (AC), Overflow (OV), and Parity (P). User flags are named F0,GF0 and GF1, they are generalpurpose flags that may be used by the programmer to record some event in the program. St.Anns Engineering College Page 12

Gas And Flame Detection Robot

3.1.4: MEMORY ORGANISATION Internal Memory:


The 89C52 has internal RAM and ROM memory for the functions. Additional memory can be added externally using suitable circuits. This has a Hardware architecture, which uses the same address, in different memories, for code and data.

Internal RAM:
The 256-byte internal RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. Instructions that use indirect addressing access the upper 128 bytes of RAM. Stack operations are examples of indirect addressing. Internal Data Memory addresses are always one byte wide, which implies an address space of only 256 bytes. However, the addressing modes for internal RAM can in fact accommodate 384 bytes, using a simple trick. Direct addresses higher than 7FH access one memory space and indirect addresses higher than 7FH access a different memory space. Thus Figure shows the Upper 128 and SFR space occupying the same block of addresses, 80H through FFH, although they are physically separate entities. The Lower 128 bytes of RAM are present in all 89C52 devices as mapped in Figure. The lowest 32 bytes are grouped into 4 banks of 8 registers. Program instructions call out these registers as R0 through R7. Two bits in the Program Status Word (PSW) select which register bank is in use. This allows more efficient use of code space, since register instructions are shorter than instructions that use direct addressing. The next 16 bytes above the register banks form a block of bit addressable memory space. The 89C52 instruction set includes a wide St.Anns Engineering College Page 13

Gas And Flame Detection Robot

selection of single-bit instructions, and the 128 bits in this area can be directly addressed by these instructions. The bit addresses in this area are 00H through 7FH. All of the bytes in the Lower 128 can be accessed by either direct or indirect addressing. The Upper 128 can only be accessed by indirect addressing. SFRs include the Port latches, timers, peripheral controls, etc. These registers can only be accessed by direct addressing. Sixteen addresses in SFR space are both byte- and bit-addressable. The bitaddressable SFRs are those whose address ends in OH or 80H.

St.Anns Engineering College

Page 14

Gas And Flame Detection Robot

The Stack and Stack Pointer:


The stack refers to an area of internal RAM that is used in conjunction with certain opcodes to store and retrieve data quickly. The 8-bit stack pointer register is used by the 89C52 to hold an internal RAM address that is called the top of the stack. The address held in the SP register is the location in internal RAM where the last byte of data was stored by a stack operation. When data is to be placed on the stack, the SP increments before storing data on the stack so that the stack grows up as data is stored. As data is retrieved from the stack, the byte is read from the stack, then the SP decrements to point to the next available byte of stored data.

3.1.5: SPECIAL FUNCTION REGISTERS:


The 89C52 operations that do not use the internal 128-byte RAM addresses from 00h to 7Fh are done by a group of specific internal registers, each called a Special Function register, which may be addressed much like internal RAM, using addresses from 80h to FFh. PC is not part of the SFR and has no internal RAM address St.Anns Engineering College Page 15

Gas And Flame Detection Robot

St.Anns Engineering College

Page 16

Gas And Flame Detection Robot

3.1.6: FEATURES:
Compatible with MCS-51 Products. 8K Bytes of In-System Reprogrammable Flash Memory. Endurance: 1,000 Write/Erase Cycles. Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock. 256 x 8-Bit Internal RAM. 32 Programmable I/O Lines. Three 16-bit Timer/Counters. Eight Interrupt Sources. Programmable Serial Channel. Low Power Idle and Power Down Modes

St.Anns Engineering College

Page 17

Gas And Flame Detection Robot

CHAPTER-4
4.1. POWER SUPPLY: Description:
The Power Supply is a Primary requirement for the project work. The required DC power supply for the base unit as well as for the recharging unit is derived from the mains line. For this purpose center tapped secondary of 12V-012V transformer is used. From this transformer we getting 5V power supply. In this +5V output is a regulated output and it is designed using 7805 positive voltage regulator. This is a 3 Pin voltage regulator, can deliver current up to 800 milliamps. Rectification is a process of rendering an alternating current or voltage into a unidirectional one. The component used for rectification is called Rectifier. A rectifier permits current to flow only during positive half cycles of the applied AC voltage. Thus, pulsating DC is obtained to obtain smooth DC power additional filter circuits required.

Circuit diagram:
+12v 1N4007 X 2

230v / 12v- 0 -12v 500mA Transformer

2200F/25 v 100F/25v

St.Anns Engineering College

Page 18

Gas And Flame Detection Robot

A diode can be used as rectifier. There are various types of diodes. However, semiconductor diodes are very popularly used as rectifiers. A semiconductor diode is a solid-state device consisting of two elements is being an electron emitter or cathode, the other an electron collector or anode. Since electrons in a semiconductor diode can flow in one direction only-form emitter to collector-the diode provides the unilateral conduction necessary for rectification. The rectified Output is filtered for smoothening the DC, for this purpose capacitor is used in the filter circuit. The filter capacitors are usually connected in parallel with the rectifier output and the load. The AC can pass through a capacitor but DC cannot, the ripples are thus limited and the output becomes smoothed. When the voltage across the capacitor plates tends to rise, it stores up energy back into voltage and current. Thus, the fluctuation in the output voltage is reduced considerable.

VOLTAGE REGULATOR:
LM 78XX SERIES VOLTAGE REGULATOR The LM 78XXX series of the three terminal regulations is available with several fixed output voltages making them useful in a wide range of applications. One of these is local on card regulation. The voltages available allow these regulators to be used in logic systems, instrumentation and other solid state electronic equipment. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents. The LM78XX series is available in aluminum to 3 packages which will allow over 1.5A load current if adequate heat sinking is provided. Current limiting is included to limit the peak output current to a safe value. The LM 78XX is available in the metal 3 leads to 5 and the plastic to 92. For this type, with adequate heat sinking. The regulator can deliver 100mA output current. The advantage of this type of regulator is, it is easy to use and minimize the number of external components. The following are the features voltage regulators: a) Output current in excess of 1.5A for 78 and 78L series St.Anns Engineering College Page 19

Gas And Flame Detection Robot

b) Internal thermal overload protection c) No external components required d) Output transistor sage area protection e) Internal short circuit current limit. f) Available in aluminum 3 package.

POSITIVE VOLTAGE REGULATOR


The positive voltage regulator has different features like Output current up to 1.5A No external components Internal thermal overload protection High power dissipation capability Internal short-circuit current limiting Output transistor safe area compensation Nominal Output Voltage 5V 6V 8V 8.5V 10V 12V 15V 18V 24V uA7805C uA7806C uA7808C uA7885C uA7810C uA7812C uA7815C uA7818C uA7824C Regulator

St.Anns Engineering College

Page 20

Gas And Flame Detection Robot

CHAPTER-5
5.1. MQ-6 Semiconductor Sensor for LPG:
Sensitive material of MQ-6 gas sensor is SnO2, which with lower conductivity in clean air. When the Target combustible gas exist, the sensors conductivity is higher along with the gas concentration rising. Please use simple electro circuit, Convert change of conductivity to correspond output signal of gas concentration. MQ-6 gas sensor has high sensitivity to Propane, Butane and LPG, also response to Natural gas. The sensor could be used to detect different combustible gas, especially Methane; it is with low cost and suitable for different application.

Configuration:

Character:
* Good sensitivity to Combustible gas in wide range * High sensitivity to Propane, Butane and LPG * Long life and low cost * Simple drive circuit.

St.Anns Engineering College

Page 21

Gas And Flame Detection Robot

5.1.1. Technical Data:

Model No. Sensor Type Standard Encapsulation Detection Gas Concentration

MQ-6 Semiconductor Bakelite (Black Bakelite) Isobutene, Butane, LPG 300-10000ppm ( Butane, Propane, LPG) Loop Voltage Heater Voltage Vc 24V DC

VH 5.0V0.2V ACorDC RL Adjustable

Circuit

Load Resistance Heater Resistance Heater

313Room Tem. RH PH 900mW 2K-20K(in C3H8) S Rs(in C4H10)5 air)/Rs(1000ppm 2000ppm

Character

consumption Sensing Resistance Sensitivity Rs

Slope

0.6( R2000ppm/R1000ppm LPG )

Tem. Humidity Condition Standard test circuit

20265%5%RH Vc:5.0V0.1V VH: 5.0V0.1V

Preheat time St.Anns Engineering College

Over 48 hours Page 22

Gas And Flame Detection Robot

5.1.2. Basic test loop:

The above is basic test circuit of the sensor. The sensor need to be put 2 voltages, heater voltage(VH and test voltage(VC.VH used to supply certified working temperature to the sensor, while VC used to detect voltage (VRL) on load resistanceRLwhom is in series with sensor. The sensor has light polarity, Vc need DC power. VC and VH could use same power circuit with precondition to assure performance of sensor. In order to make the sensor with better performance, suitable RL value is needed: Power of Sensitivity body (Ps)

Sensitivity Characteristics:
St.Anns Engineering College Page 23

Gas And Flame Detection Robot

The above graph shows the typical sensitivity characteristics of the MQ-6, ordinate means resistance ratio of the sensor resistance in different gases, Ro means resistance of sensor in 1000ppm LPG. All tests are under standard test conditions.

Influence of Temperature/Humidity:

The above graph shows the typical temperature and humidity characteristics. Ordinate means resistance ratio of the sensor (Rs/Ro), Rs means resistance of sensor in 1000ppm Methane under different tem. And humidity Ro means resistance of the sensor in environment of 1000ppm Propane, 20/65%RH.

Structure and configuration:


St.Anns Engineering College Page 24

Gas And Flame Detection Robot

Structure and configuration of MQ-6 gas sensor is shown as Fig. 3, sensor composed by micro AL2O3 ceramic tube, Tin Dioxide (SnO2) sensitive layer, measuring electrode and heater are fixed into a crust made by plastic and stainless steel net. The heater provides necessary work conditions for work of sensitive components. The enveloped MQ-4 has 6 pin, 4 of them are used to fetch signals, and other 2 are used for providing heating current.

Following conditions must be prohibited:


1.1. Exposed to organic silicon steam Organic silicon steam cause sensors invalid, sensors must be avoid exposing to silicon bond, Fixture, silicon latex, putty or plastic contain silicon environment 1.2. High Corrosive gas if the sensors exposed to high concentration corrosive gas (such as H2Sz, SOXCl2HCl etc), it will not only result in corrosion of sensors structure, also it cause sincere sensitivity attenuation. 1.3. Alkali, Alkali metals salt, halogen pollution the sensors performance will be changed badly if sensors be sprayed polluted by alkali metals salt especially brine, or be exposed to halogen such as fluorine. 1.4. Touch water Sensitivity of the sensors will be reduced when spattered or dipped in water. 1.5. Freezing Do avoid icing on sensor surface, otherwise sensor would lose sensitivity. St.Anns Engineering College Page 25

Gas And Flame Detection Robot

1.6 .Applied voltage higher Applied voltage on sensor should not be higher than stipulated value, otherwise it cause down-line or heater damaged, and bring on sensors sensitivity characteristic changed badly. 1.7. Voltage on wrong pins For 6 pins sensor, if apply voltage on 13 pins or 46 pins, it will make lead broken, and without signal when apply on 2, 4 pins.

Following conditions must be avoided:


1. Water Condensation: Indoor conditions, slight water condensation will effect sensors performance lightly. However, if water condensation on sensors surface and keep a certain period, sensor sensitivity will be decreased. 2. Used in high gas concentration: No matter the sensor is electrified or not, if long time placed in high gas concentration, if will affect sensors characteristic. 3. Long time storage: The sensors resistance produce reversible drift if its stored for long time without electrify, this drift is related with storage conditions. Sensors should be stored in airproof without silicon gel bag with clean air. For the sensors with long time storage but no electrify, they need long aging time for stability before using. 4. Long time exposed to adverse environment: No matter the sensors electrified or not, if exposed to adverse environment for long time, such as high humidity, high temperature, or high pollution etc, it will affect the sensors performance badly. 5. Vibration:

St.Anns Engineering College

Page 26

Gas And Flame Detection Robot

Continual vibration will result in sensors down-lead response then repture. In transportation or assembling line, pneumatic screwdriver/ultrasonic welding machine can lead this vibration. 6. Concussion: If sensors meet strong concussion, it may lead its lead wire disconnected. 7. Usage: For sensor, handmade welding is optimal way. If use wave crest welding should meet the following Conditions: Soldering flux: Rosin soldering flux contains least chlorine Speed: 1-2 Meter/ Minute Warm-up temperature10020 Welding temperature25010 Time pass wave crest welding machine If disobey the above using terms, sensors sensitivity will be reduced.

Applications:
* Domestic gas leakage detector. * Industrial Combustible gas detector. * Portable gas detector

ADVANTAGES & DISADVANTAGES: Advantages:


It also detects alcohol so it is used as liquor tester. The sensor has excellent sensitivity combined with a quick response time. It is used in house as LPG gas leakage detector

.Disadvantages:

It works only when at 5V power supply is given. Its sensitivity depends on Humidity and temperature. 5.2. FLAME SENSOR (THERMISTOR):
St.Anns Engineering College Page 27

Gas And Flame Detection Robot

WHAT IS A THERMISTOR
A Thermistor is an electronic component that exhibits a large change in resistance with a change in its body temperature. The word Thermistor is actually a contraction of the words thermal resistor. The Thermistor that we shall describe herein is ceramic semiconductors and has either large positive temperature coefficient of resistance (PTC devices) or large negative temperature coefficient of resistance (NTC devices). Both types of thermistors (PTC and NTC) have definite features and advantages which make them ideal for certain sensor applications. The NTC thermistors which are discussed herein are composed of metal oxides. The most commonly used oxides are those of manganese, nickel, cobalt, iron, copper and titanium. The fabrication of commercial NTC thermistors uses basic ceramics technology and continues today much as it has for decades. In the basic process, a mixture of two or more metal oxide powders are combined with suitable binders, are formed to a desired geometry, dried, and sintered at an elevated temperature. By varying the types of oxides used, their relative proportions, the sintering atmosphere, and the sintering temperature, a wide range of resistivities and temperature coefficient characteristics can be obtained.

5.2.1. Temperature Measurement Methods:


There are several techniques for measuring temperature with a thermistor, the most common being the two-wire and four-wire techniques. The two-wire technique works by forcing current through the thermistor and measuring the resulting voltage. The benefit is that its a simple method using only two wires, making it easy to connect and implement. The main drawback is that the lead resistance is part of the measurement, which can cause some error. In the four-wire technique, a current is forced through the thermistor and a voltage is measured. However, the current is sourced on one set of leads, while the voltage is sensed on a different set of leads. The voltage is sensed at a different spot from the source current. This means the test lead resistance is completely out of the measurement path. In other words, the test lead resistance is not a part of the measurement.

Pros and Cons:


St.Anns Engineering College Page 28

Gas And Flame Detection Robot

Thermistors have several distinct advantages over other temperature sensors. For starters, they are simple to set up and operate, using a two-wire measurement scheme. They are also fast, because they can be made small and can respond to temperature changes quickly. On the down side, the non-linear properties of thermistors means they need to be linearised. They also have a limited temperature range and are fragile, because they are semiconductors and are more likely to have decalibration issues at high temperatures. Thermistors also require a current source and have self-heating characteristics, which must be taken into account. Not accounting for self heating and selecting a device with an inadequate temperature range are common mistakes that are made when using thermistors. There are a few ways to reduce self-heating effects, including using as small as possible a test current and using a pulse current method instead of a continuous current.

5.2.2. Types of NTC Thermistors:


Commercial NTC thermistors can be classified into two major groups depending upon the method by which electrodes are attached to the ceramic body. Each group may be further subdivided into various types of thermistors where each type is characterized by differences in geometry, packaging and/or processing techniques. The first group consists of bead type thermistors. All of the bead type thermistors have platinum alloy lead wires which are directly sintered into the ceramic body. Bead type thermistors include the following: Bare Beads Glass Coated Beads Ruggedized Beads Miniature Glass Probes Glass Probes Glass Rods Bead-in-Glass Enclosures

St.Anns Engineering College

Page 29

Gas And Flame Detection Robot

The second group of thermistors has metalized surface contacts. All of these types are available with radial or axial leads as well as without leads for surface mounting or mounting by means of spring contacts. Metalized surface contact thermistors include the following: Disks Chips (Wafers) Surface Mounts Flakes Rods Washers NTC thermistors are available in a wide variety of configurations and protective coatings to suit almost any application. The most stable and accurate thermistors available are those which are hermetically sealed in glass. Hermetically sealed thermistors are also used, almost exclusively, for applications that require continuous exposure to temperatures above 150C.

5.2.3. Disc Type NTC Thermistors:

Disc type negative temperature coefficient thermistors . Resistance values from 8 W to 150 kW and B Values are from 3000 K to5000 K.

Thermal Properties:
When an NTC thermistor is connected in an electrical circuit, power is dissipated as heat and the body temperature of the thermistor will rise above the ambient St.Anns Engineering College Page 30

Gas And Flame Detection Robot

temperature of its environment. The rate at which energy is supplied must equal the rate at which energy is lost plus the rate at which energy is absorbed (the energy storage capacity of the device).

dH/dt=dHl/dt+dHa/dt The rate at which thermal energy is supplied to the thermistor in an electrical circuit is equal to the power dissipated in the thermistor.

dH/dt=p= I2R=EI The rate at which thermal energy is lost from the thermistor to its surroundings is proportional to the temperature rise of the thermistor.

dHL/dt= dDT= d(T-TA) Where the dissipation constant ( d ), is defined as the ratio, at a specified ambient temperature, of a change in the power dissipation of a thermistor to the resultant body temperature change. The dissipation constant depends upon the thermal conductivity and relative motion of the medium in which the thermistor is located, as well as the heat transfer from the thermistor to its surroundings by conduction through the leads, by free convection in the medium and by radiation. The dissipation constant is not a true constant since it varies slightly with temperature and also with temperature rise. It is typically measured under equilibrium conditions. The rate at which thermal energy is absorbed by the thermistor to produce a specific amount of rise in temperature can be expressed as follows: dHA/dt= smdT/dt=CdT/dt Where (s) is the specific heat and (m) is the mass of the thermistor. The product of the specific heat and the mass is the heat capacity (C) of the thermistor and is dependent upon thermistor materials and construction. Thus, the heat transfer equation for an NTC thermistor at any instant in time after power has been applied to the circuit can be expressed as: St.Anns Engineering College Page 31

Gas And Flame Detection Robot

dH/dt=p= I2R=EI= d(T-TA) +CdT/dt In order to complete our analysis of the thermal characteristics of thermistors, we must examine the thermistor behavior under transient and steady state conditions. The solution of equation (5) where the power (P) is constant is: DT= ( T-TA )=P/ d[1- exp (-d t/c)] Equation demonstrates that when a significant amount of power is dissipated in a thermistor, its body temperature will rise above the ambient temperature as a function of time. The transient conditions at turn on, and all applications that are based upon the Current-Time Characteristics, are governed by equation (6). A condition of equilibrium is achieved when dT/dt=0 in equation (5) or when t>>C/D in equation (6). In this steady state condition, the rate of heat loss is equal to the power supplied to the thermistor. Therefore: d( T-TA ) = dDT = P = ET IT Where (ET ) is the steady state or static thermistor voltage and ( IT ) is the steady state current. The Voltage-Current Characteristic is governed by this equation. When the power is reduced in a thermistor to an amount where the self-heating is considered negligible, then the heat transfer equation can be re-written as follows: dT/dt= -d (T-TA)/C Equation is actually a mathematical statement of Newtons Law of Cooling and has the following solution: T = TA + (TI - TA) exp {-t/ t } Where (TI) is the initial body temperature, (TA) is the ambient temperature and ( t ) is the thermal time constant of the device. Also, t = C/D. The thermal time constant ( t ) is the amount of time required for a thermistor to reach 63.2% of the temperature difference when subjected to a step function change in temperature under negligible power dissipation conditions. The thermal time constant is dependent upon the same environmental factors as the dissipation constant, namely, the thermal conductivity and the motion of the medium, the conduction through the leads, the free convection in the medium and the radiation losses. The thermal time constant and dissipation constant data St.Anns Engineering College Page 32

Gas And Flame Detection Robot

which is given in thermistor product literature must indicate the test methods and mounting methods employed if it is to be valuable to the designer. Devices with leads are normally suspended by their leads in a still medium for testing purposes. Thus far, all of the discussions of thermal properties of NTC thermistors have been based upon a simple device structure with a single time constant. When any thermistor device is encapsulated into sensor housing, the simple exponential response functions no longer exist. The mass of the housing and the thermal conductivity of the materials used in the sensor will normally increase the dissipation constant of the thermistor and will invariably increase the thermal response time.

St.Anns Engineering College

Page 33

Gas And Flame Detection Robot

CHAPTER-6
6.1. ADC:
The function of an ADC is to produce a digital word which represents the magnitude of some analog voltage and current. Our application is using the type, Successive approximation ADC. Commonly available converters have analog multiplexers on their inputs. This allows the one converter to digitize any one of the 8 input signals. The input channel to be digitized is determined by a 3-bit address applied to the address inputs of the device. An ADC with a multiplexer on its inputs is often called a data acquisition system, or DAS. In addition to the data lines, there are two other successive approximation ADC signals we need to interface to the microcomputer for the data transfer. The first of these is a START CONVERT signal Which you output from the microcomputer to the ADC to tell it to do a conversion for you. The second signal is an EOC signal which the ADC outputs to indicate that the conversion is complete and that the word on the outputs is valid. If the time between input and output is more, then we use EOC signal. The OE signal is used to connect the output data lines. If it is grounded, the output will be zero. The ADC 0808 is used as an 8-input DAS. You tell the device which input signal you want digitized with a 3-bit address you send to the ADC, ADB and ADA inputs. This 8-input device was chosen so that other control loops could be added later.

555 TIMERS:
The 555 timer circuit is not very accurate, but it is inexpensive, and it is good enough for this application simply returns to the mainline program until the next interrupt from the 555 or from some other source occurs. The advantage of this approach is that the interrupt-service procedure takes only a few micro seconds. The rest of the time, it is free to run the mainline program.

6.2. COMPARATOR:
Comparator is one of the applications of op-amp. In this circuit the op amp effectively compares the input voltage with the voltage on the inverting input and gives a St.Anns Engineering College Page 34

Gas And Flame Detection Robot

high or low output, depending on the result of the comparison. If the input is more than a few micro volts above the reference voltage on the inverting input, the output will be high. If the input voltage is a few micro volts more negative than the reference voltage, the output will be low. An op amp used in this way is called a comparator. The reference voltage applied to the inverting input does not have to be grounded. An input voltage can be compared to any voltage within the input range specified for the particular op amp.

Frequency:
From the URDC value, select a reference point. Whenever the waveform reaches this reference value from zero, the output is taken as logical zero till that point and when it reaches above reference point, the output will be logical one, till it reaches again below the reference point. When we combine all these points, we will get a square wave output. The reference point can also be changed by varying resistance.

Circuit for frequency

St.Anns Engineering College

Page 35

Gas And Flame Detection Robot

CHAPTER-7
7.1. BUZZER:
A buzzer or beeper is a signaling device, usually electronic, typically used in automobiles, household appliances such as a microwave oven, or game shows. It most commonly consists of a number of switches or sensors connected to a control unit that determines if and which button was pushed or a preset time has lapsed, and usually illuminates a light on the appropriate button or control panel, and sounds a warning in the form of a continuous or intermittent buzzing or beeping sound. Initially this device was based on an electromechanical system which was identical to an electric bell without the metal gong (which makes the ringing noise). Often these units were anchored to a wall or ceiling and used the ceiling or wall as a sounding board. Another implementation with some AC-connected devices was to implement a circuit to make the AC current into a noise loud enough to drive a loudspeaker and hook this circuit up to a cheap 8-ohm speaker. Now-a-days, it is more popular to use a ceramic-based piezo-electric sounder like a Sonalert which makes a high-pitched tone. Usually these were hooked up to driver circuits which varied the pitch of the sound or pulsed the sound on and off.

BUZZER AND ITS DRIVER CIRCUIT

St.Anns Engineering College

Page 36

Gas And Flame Detection Robot

The circuit is designed to control the buzzer. The buzzer ON and OFF is controlled by the pair of switching transistors (BC 547). The buzzer is connected in the Q2 transistor collector terminal. When high pulse signal is given to base of the Q1 transistors, the transistor is conducting and close the collector and emitter terminal so zero signals is given to base of the Q2 transistor. Hence Q2 transistor and buzzer is turned OFF state. When low pulse is given to base of transistor Q1, the transistor is turned OFF. Now 12V is given to base of Q2 transistor so the transistor is conducting and buzzer is energized and produces the sound signal.

St.Anns Engineering College

Page 37

Gas And Flame Detection Robot

CHAPTER-8
8.1. DC MOTOR:
In any electric motor, operation is based on simple electromagnetism. A currentcarrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external magnetic field. As you are well aware of from playing with magnets as a kid, opposite (North and South) polarities attract, while like polarities (North and North, South and South) repel. The internal configuration of a DC motor is designed to hardness the magnetic interaction between a current-carrying conductor and an external magnetic field to generate rotational motion. Lets start by looking at a simple 2-pole DC electric motor (here red represents a magnet or winding with a North polarization, while green represents a magnet or winding with a South polarization). Every DC motor has six basic parts axle, rotor (a.k.a., armature), stator, commutator, field magnet(s), and brushes. In most common DC motors (and all that Beamers will see), the external magnetic field is produced by high-strength permanent magnets. The stator is the stationary part of the motor i.e., this includes the motor casing, as well as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotates with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout with the rotor inside the stator (field) magnets.

St.Anns Engineering College

Page 38

Gas And Flame Detection Robot

Gear motors are complete motive force systems consisting of an electric motor and a reduction gear train integrated into one easy-to-mount and configure package. This greatly reduces the complexity and cost of designing and constructing power tools, machines and appliances calling for high torque at relatively low shaft speed or RPM. Gear motors allow the use of economical low-horsepower motors to provide great motive force at low speed such as in lifts, winches, medical tables, jacks and robotics. They can be large enough to lift a building or small enough to drive a tiny clock.

Gear wheel construction Most synchronous AC electric motors have output ranges from 1,200 to 3,600 revolutions per minute. They also have both normal speed and stall-speed torque specifications. The reduction gear trains used in gear motors are designed to reduce the St.Anns Engineering College Page 39

Gas And Flame Detection Robot

output speed while increasing the torque. The increase in torque is inversely proportional to the reduction in speed. Reduction gearing allows small electric motors to move large driven loads, although more slowly than larger electric motors. Reduction gears consist of a small gear driving a larger gear. There may be several sets of these reduction gear sets in a reduction gear box. Another goal achievable with a gear motor is to use a small motor to generate a very large force albeit at a low speed. These applications include the lifting mechanisms on hospital beds, power recliners, and heavy machine lifts where the great force at low speed is the goal. 8.2. MOTOR DRIVER ULN 2803A:

The ULN2803A is a high-voltage, high-current Darlington transistor array. The device consists of eight NPN Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching inductive loads. The collectorcurrent rating of each Darlington pair is 500 mA. The Darlington pairs may be connected in parallel for higher current capability. Applications include relay drivers, hammer drivers, lamp drivers, display drivers (LED and gas discharge), line drivers, and logic buffers. The ULN2803A has a 2.7-k series base resistor for each Darlington pair for operation directly with TTL or 5V CMOS devices.

St.Anns Engineering College

Page 40

Gas And Flame Detection Robot

Features of ULN 2803A:


EIGHT DARLINGTONS WITH COMMON EMITTERS OUTPUT CURRENT TO 500 mA OUTPUT VOLTAGE TO 50 V INTEGRAL SUPPRESSION DIODES VERSIONS FOR ALL POPULAR LOGIC FAMILIES OUTPUT CAN BE PARALLELED INPUTS TO PINNED OPPOSITE OUTPUTS SIMPLIFY BOARD LAYOUT COMPATIBLE WITH ULN2803A SERIES
RELAY DRIVER APPLICATIONS

St.Anns Engineering College

Page 41

Gas And Flame Detection Robot

CHAPTER-9
9.1. CODE OF THE PROJECT
;ind.fire fighting ROBO WITH GAS DETECTION 08-02-2012 ;LINEAR MOTORS-2 FINAL WITH ULTRASONIC

;P1.0=DATA FRONT ;P1.1=DATA LEFT ;P1.2=DATA BACK ;P1.3=DATA RIGHT ;p2.0= led ;P1.7=UV SENSOR

;P0.0=LM1 ;P0.1=LM1 ;P0.2=LM2 ;P0.3=LM2 ;p2.1 motor rly

ORG 0 LJMP SAAX

;originating at 0 location ;jump to label saa

ORG 0050H SAAX: MOV P0,#00H

SETB P2.0 LCALL SEC CLR P2.0 LCALL SEC St.Anns Engineering College Page 42

Gas And Flame Detection Robot

SETB P2.0 LCALL SEC CLR P2.0 LCALL SEC SETB P2.0 LCALL SEC CLR P2.0

SAA:

MOV P3,#FFH

MOV P2,#FFH SA: MOV P0,#00H MOV P1,#FFH CLR P2.0 CLR P2.1

LCALL DTD JB P1.7,SAA ;GOTO TOP FOR NOT ACTIVATION

SETB P2.0 LCALL SEC1 CLR P2.0

CJNE R2,#01H,N1 LCALL M_FOR LCALL SEC1X LCALL M_OFF

SETB P2.1 St.Anns Engineering College Page 43

Gas And Flame Detection Robot

CONT: ;LCALL WATMOT JNB P1.0,CONT LCALL DEL JNB P1.0,CONT CLR P2.1

CLR P0.4 CLR P0.5

LCALL M_REV LCALL SEC1X LCALL M_OFF

LJMP SA ;----------------------------------N1: CJNE R2,#02H,N2 LCALL M_REV LCALL SEC1 LCALL M_OFF

SETB P2.1 LCALL SEC1X CLR P2.1

LJMP SA

N2:

CJNE R2,#03H,N3 LCALL M_LFT

St.Anns Engineering College

Page 44

Gas And Flame Detection Robot

LCALL SEC1 LCALL M_OFF

LCALL M_FOR LCALL SEC1X LCALL M_OFF

SETB P2.1 LCALL SEC1X CLR P2.1

LJMP SA

N3:

CJNE R2,#04H,N4 LCALL M_RGT LCALL SEC1 LCALL M_OFF LCALL M_FOR LCALL SEC1X LCALL M_OFF

SETB P2.1 LCALL SEC1X CLR P2.1

LJMP SA ;---------------------------N4: LCALL DEL Page 45

St.Anns Engineering College

Gas And Flame Detection Robot

LJMP SA

WATMOT: SETB P0.4 CLR P0.5 LCALL SEC LCALL SEC CLR P0.4 SETB P0.5 LCALL SEC LCALL SEC CLR P0.4 CLR P0.5 RET

;-------------------------M_OFF: CLR P0.0 CLR P0.1 CLR P0.2 CLR P0.3 RET

M_FOR: CLR P0.0 SETB P0.1 CLR P0.2 SETB P0.3 RET

St.Anns Engineering College

Page 46

Gas And Flame Detection Robot

M_REV: SETB P0.0 CLR P0.1 SETB P0.2 CLR P0.3 RET

M_LFT: CLR P0.0 SETB P0.1 CLR P0.2 CLR P0.3 RET

M_RGT: CLR P0.0 CLR P0.1 CLR P0.2 SETB P0.3 RET

CAML: RET CAMR: RET

;--------------------------DTD: MOV R2,#00H NX0: JB P1.0,NX1 LCALL DEL JB P1.0,NX0 MOV R2,#01H RET

St.Anns Engineering College

Page 47

Gas And Flame Detection Robot

NX1: JB P1.1,NX2 LCALL DEL JB P1.1,NX1 MOV R2,#04H RET NX2: JB P1.2,NX3 LCALL DEL JB P1.2,NX2 MOV R2,#02H RET NX3: JB P1.3,NX4 LCALL DEL JB P1.3,NX3 MOV R2,#03H NX4: RET

;--------------------------

DEL1:

MOV PSW,#08H

MOV R6,#0FH L1: MOV R7,#FFH DJNZ R7,$ DJNZ R6,L1

MOV PSW,#00H RET

St.Anns Engineering College

Page 48

Gas And Flame Detection Robot

DEL:

MOV PSW,#08H

MOV R5,#03H M1: M2: MOV R6,#FFH MOV R7,#FFH DJNZ R7,$ DJNZ R6,M2 DJNZ R5,M1

MOV PSW,#00H RET

SEC: MOV R7,#03H SXAE1: SXAD1: SXAB1: MOV R6,#FFH MOV R5,#FFH DJNZ R5,SXAB1

DJNZ R6,SXAD1 DJNZ R7,SXAE1 RET SEC1: MOV R7,#17H GXAE1: GXAD1: GXAB1: MOV R6,#FFH MOV R5,#FFH DJNZ R5,GXAB1

DJNZ R6,GXAD1 DJNZ R7,GXAE1 RET

St.Anns Engineering College

Page 49

Gas And Flame Detection Robot

SEC1X: MOV R7,#17H GXAE1X: GXAD1X: GXAB1X: DJNZ R5,GXAB1X DJNZ R6,GXAD1X DJNZ R7,GXAE1X RET MOV R6,#FFH MOV R5,#FFH

;--------------------------------------END;

St.Anns Engineering College

Page 50

Gas And Flame Detection Robot

CHAPTER-10
10.1. Soft ware Used:

1. Assembly language for 8052 2. 8052 Cross compiler 3. Universal Programmer soft ware 4. ORCAD for PCB designing and layout. 10.2. Software Dumping Procedure:

1. The assembly language Instructions typed in dos editor or notepad with an extension of .ASM. 2. Compile the above .asm file with 8052 cross assembler. 3. The assembler converts the .ASM file into .HEX file (Contains all op codes).

4. Copy the converted Hex file into internal flash Rom of Micro Controller with
the help of Universal Programmer or Micro Controller Programmer.

St.Anns Engineering College

Page 51

Gas And Flame Detection Robot

CHAPTER-11
11.1. ADVANTAGES:
Simple in construction Less space Reliable Economical Avoid the disaster. Low cost

11.2. DISADVANTAGES:

St.Anns Engineering College

Page 52

Gas And Flame Detection Robot

CHAPTER-12 APPLICATIONS:
It is automatically detect the fire or smokes to avoid the collision and prevent disaster. It is used in the military It is used in the textile industry

St.Anns Engineering College

Page 53

Gas And Flame Detection Robot

CHAPTER-13 CONCLUSION:

St.Anns Engineering College

Page 54

Gas And Flame Detection Robot

BIBLIOGRAPHY
The information required for developing the project and presenting the report is gathered from: Text Books: 1. The 8051 Microcontroller Architecture, Programming and Applications by Kenneth J Ayala. 2. Fundamentals of Digital Signal Processing By Robert. J. Schilling and Sandra. L .Harris, Thomson 3. MCS51 series authorized manual. Other References: 1. http://www.atmel.com 2. http://www.aplus.com

3. http://www. I2C protocols


4. http://www.alldatasheets.com

St.Anns Engineering College

Page 55