Académique Documents
Professionnel Documents
Culture Documents
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.
Page 1
CHAPTER-2
2.1.BLOCK DIAGRAM:
Page 2
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.
Page 3
CHAPTER-3
3.1: MICROCONTROLLER AT89C52: 3.1.1: ARCHITECTURE OF 89C52:
Page 4
PIN DIAGRAM:
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
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
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
until capacitance begins to charge. At a threshold of about 2.5V, reset input reaches a low level and system begin to run.
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
Page 9
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.
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.
Page 11
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.
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
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.
Page 14
Page 16
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
Page 17
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
2200F/25 v 100F/25v
Page 18
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
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.
Page 20
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.
Page 21
MQ-6 Semiconductor Bakelite (Black Bakelite) Isobutene, Butane, LPG 300-10000ppm ( Butane, Propane, LPG) Loop Voltage Heater Voltage Vc 24V DC
Circuit
Character
Slope
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
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 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.
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.
Page 26
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
.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
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.
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.
Page 29
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.
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
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
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
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.
Page 33
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
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.
Page 35
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.
Page 36
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.
Page 37
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.
Page 38
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
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.
Page 40
Page 41
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
SETB P2.0 LCALL SEC CLR P2.0 LCALL SEC St.Anns Engineering College Page 42
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
CONT: ;LCALL WATMOT JNB P1.0,CONT LCALL DEL JNB P1.0,CONT CLR P2.1
LJMP SA ;----------------------------------N1: CJNE R2,#02H,N2 LCALL M_REV LCALL SEC1 LCALL M_OFF
LJMP SA
N2:
Page 44
LJMP SA
N3:
CJNE R2,#04H,N4 LCALL M_RGT LCALL SEC1 LCALL M_OFF LCALL M_FOR LCALL SEC1X LCALL M_OFF
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
Page 46
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
;--------------------------DTD: MOV R2,#00H NX0: JB P1.0,NX1 LCALL DEL JB P1.0,NX0 MOV R2,#01H RET
Page 47
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
Page 48
DEL:
MOV PSW,#08H
MOV R5,#03H M1: M2: MOV R6,#FFH MOV R7,#FFH DJNZ R7,$ DJNZ R6,M2 DJNZ R5,M1
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
Page 49
SEC1X: MOV R7,#17H GXAE1X: GXAD1X: GXAB1X: DJNZ R5,GXAB1X DJNZ R6,GXAD1X DJNZ R7,GXAE1X RET MOV R6,#FFH MOV R5,#FFH
;--------------------------------------END;
Page 50
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.
Page 51
CHAPTER-11
11.1. ADVANTAGES:
Simple in construction Less space Reliable Economical Avoid the disaster. Low cost
11.2. DISADVANTAGES:
Page 52
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
Page 53
CHAPTER-13 CONCLUSION:
Page 54
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
Page 55