Fire Fighting Robot
Fire Fighting Robot
A PROJECT REPORT
Submitted by
S.KANNAN
R.KARTHIKEYAN
S.SATHISH KUMAR
of
BACHELOR OF ENGINEERING
in
MAY 2006
Copyright © [email protected] 1
Duplicate is strictly prohibited
ANNA UNIVERSITY: CHENNAI 600025
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Copyright © [email protected] 2
Duplicate is strictly prohibited
ACKNOWLEDGEMENT
We take this opportunity to express our gratitude to all those who have helped us in
completing this project.
1 ABSTRACT i
2 LIST OF FIGURES ii
3 LIST OF TABLES iii
4 LIST OF SYMBOLS iv
1. INTRODUCTION 1
1.1 FIRE FIGHTING ROBOT (FFR)......…….……….. 1
1.2 EMBEDED SYSTEM…………..…………………. 1
1.3 COMPARING MICRO- PROCESSOR
AND CONTROLLER…........................................... 2
2. MICRO CONTROLLER 2
2.1 GENERAL ICROCONTROLLER…………………. 3
2.2 FEATURES OF ATMEGA8 AVR CONTROLLER 4
2.2.1 GENERAL FEATURES …………… 4
2.2.2 PHERIPHERAL FEATURES……… 4
2.2.3 SPECIAL FEATURES……………... 5
2.2.4 I/O AND PACKAGE…..…………. 5
Copyright © [email protected] 4
Duplicate is strictly prohibited
2.3 OVERIEW……………………..…..……………….. 5
2.3.1ATMEGA8 BLOCK DIAGRAM…..... 7
2.3.2 INTRODUCTION…………………… 8
2.3.3 INST. EXECUTION TIMING …… 9
2.3.3 PIN CONFIGURATION………….. 10
2.3.4 INDIVIDUAL PIN DETAILS…….….11
2.4 ATMEGE 8 AVR ARCHITUCTURE. ……………...13
2.4.1 INTRODUCTION ………………………… 13
2.4.2ARCHITECTURALOVERVIEW……..……..13
2.4.3 ARITHMETIC LOGIC UNIT………..…….. 14
2.4.4 STATUS REGISTER. ………………………14
2.4.5 GENERAL PURPOSE REGISTER
SCHEME………………………15
2.4.6 GENERAL PUPOSE
WORKING REGISTERS…….………16
2.4.7 STACK POINTER……………………………17
2.4.8 MEMORIES IN ATMEGA8AVR……………17
2.4.8.1 REPROGRAMMABLE FLASH
MEMORY…………………………….17
2.4.8.2 PROGRAM MEMORY
MAPING……………………………...18
2.4.8.3 EEPROM DATA MEMORY………..18
2.4.8.4 EEPROM READ/WRITE ACCESS....19
Copyright © [email protected] 5
Duplicate is strictly prohibited
2.5 TIMER / COUNTER OSCILLATOR…….…………...19
2.6 ANALOG TO DIGITAL CONVERTER………………19
2.7 ANALOG COMPARATOR…………………………20
2.8 SYSTEM CONTROL AND RESET…………………20
2.9 INTERFACING / EXTERNAL
COMMUNICATION …………………………….22
2.9.1 SERIAL PHERIPHERAL INTERFACE ….22
2.10 USART …………………………………………….22
2.10.1 TWO WIRE SERIAL
INTERFACE……………………………….23
2.10.2 ANALOG COMPARATOR
3. HARDWARE COMPONENTS ` 25
3.1 TEMPERATURE SENSOR………………………… 25
3.1.1 AD590PIN DETAILS AND PACKAGE….. 25
3.1.2 FEATURES…..…………………..…….…... 25
3.1.3 GENERAL DESCRIPTION…………..…… 26
3.1.4 PRODUCT HIGHLIGHT………………..… 26
3.1.5TEMPERATURE
CONVERSION SCALE…….……… 27
3.1.6 CALIBERATION
AND ERRORS…………….……….. 28
3.2 POWERTRANSISTORS………..………………...…29
3.2.1 TECHNICAL AND PIN DETAILS
OF TIP 122…….. 31
3.2.2 TECHNICAL AND PIN DETAILS
OFTIP 127…….. 32
Copyright © [email protected] 6
Duplicate is strictly prohibited
3.3 GENERAL PURPOSE TRANSISTOR……………. 33
3.3.1 TECHNICALAND PIN DETAILS
OF BC 547 …… 33
ABSTRACT
There are many possibilities to get fire in an Industry or any remote areas. For example,
in cotton mills, garments, fuel storages, etc., electric leakage causes huge damage also
it‘s a worst-case scenario, which cause heavy loss not only financially also
which open the door for modern and future world. Robotics is the emerging solution to
protect the human and their wealth and surroundings. The aim of our project is to
design a FIRE FIGHTING ROBOT using embedded system. We have chosen the
ATMEGA 8 AVR controller because, it is a high performance and low power 8-bit
controller, which exactly having the required features. This project helps to improve the
LIST OF FIGURES
Copyright © [email protected] 8
Duplicate is strictly prohibited
2.1 MICROCONTROLLER BLOCK DIAGRAM…………… 3
LIST OF TABLES
Copyright © [email protected] 9
Duplicate is strictly prohibited
3.3 TECHNICAL DETAILS OF BC 547 33
4.1 LOGIC TABLE FOR H-BRIDGE 39
iv
INTRODUCTION
Here we are using the micro controller to perform the action that is
continuously monitors the specified area whether there is any fire and
automatically it goes near to the flame and extinguish the fire.
We are using photo diode of the TIL series are sensitive to linear
polarized light in the wavelength area of 400nm – 950nm. If there is any
presence of flame the forward current increases and confirm the fire by
checking the temperature sensors output and then it gives buzzer and
extinguish the fire by moving towards it.
2 MICROCONTROLLER
Copyright © [email protected] 11
Duplicate is strictly prohibited
advancement in embedded system and development is reliability and data
hiding and protecting the technology from the pirating problem as like in the
discrete IC‘s.
ROM/RAM
MEMORY
I/O
GENERAL PORTS
SYSTEM
PHERIPHERALS
Copyright © [email protected] 12
Duplicate is strictly prohibited
Fig.2.1 BLOCK DIAGRAM OF MICRO CONTROLLER
Copyright © [email protected] 13
Duplicate is strictly prohibited
2.2.2 Peripheral Features
Two 8-bit Timer/Counters with Separate Pre scalar, one
Compare Mode
One 16-bit Timer/Counter with Separate Pre scalar, Compare
Mode, and Capture Mode
Real Time Counter with Separate Oscillator
Three PWM Channels
8-channel ADC in TQFP and MLF package
Eight Channels 10-bit Accuracy
6-channel ADC in PDIP package
Eight Channels 10-bit Accuracy
Byte-oriented Two-wire Serial Interface
Programmable Serial USART
Master/Slave SPI Serial Interface
Programmable Watchdog Timer with Separate On-chip
Oscillator
On-chip Analog Comparator
2.3 OVERVIEW:
The AVR core combines a rich instruction set with 32 general purpose
working registers. All the 32 registers are directly connected to the
Arithmetic Logic Unit (ALU), allowing two independent registers to be
accessed in one single instruction executed in one clock cycle. The resulting
architecture is more code efficient while achieving throughputs up to ten
times faster than conventional CISC micro controllers.
Copyright © [email protected] 16
Duplicate is strictly prohibited
Fig 2.2. BLOCK DIAGRAM OF ATMEGA 8 AVR
Copyright © [email protected] 17
Duplicate is strictly prohibited
2.3.1 INTRODUCTION:
The ADC Noise Reduction mode stops the CPU and all I/O modules
except Asynchronous timer and ADC, to minimize switching noise during
ADC conversions.
Software in the Boot Flash Section will continue to run while the
Application Flash Section is updated, providing true Read-While-Write
operation. By combining an 8-bit RISC CPU with In-System Self-
Programmable Flash on a monolithic chip, the Atmel ATmega8 is a
powerful micro controller that provides a highly flexible and cost-effective
solution to many embedded control applications.
Copyright © [email protected] 18
Duplicate is strictly prohibited
The ATmega8 AVR is supported with a full suite of program and
system development tools, including C compilers, macro assemblers, and
program debugger/simulators, In-Circuit Emulators, and evaluation kits.
Copyright © [email protected] 19
Duplicate is strictly prohibited
2.3.3 PIN CONFIGURATION:
(i) PDIP
Copyright © [email protected] 20
Duplicate is strictly prohibited
2.3.4 INDIVIDUAL PIN DETAILS:
GND Ground.
XTAL1/XTAL2/TOSC1/TOSC2
PORT B (PB7….PB0)
PORT C (PC5..PC0)
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port C output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port C
pins that are externally pulled low will source current if the pull-up resistors
Copyright © [email protected] 21
Duplicate is strictly prohibited
are activated. The Port C pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin.
Note that the electrical characteristics of PC6 differ from those of the other
pins of Port C.
If the RSTDISBL Fuse is un programmed, PC6 is used as a Reset
input. A low level on this pin for longer than the minimum pulse length will
generate a Reset, even if the clock is not running.
Port D (PD7..PD0)
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port D output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port D
pins that are externally pulled low will source current if the pull-up resistors
are activated. The Port D pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
RESET
Reset input. A low level on this pin for longer than the minimum
pulse length will generate a reset, even if the clock is not running.
AVCC
AVCC is the supply voltage pin for the A/D Converter, Port C (3..0),
and ADC (7..6). It should be externally connected to VCC, even if the ADC
is not used. If the ADC is used, it should be connected to VCC through a
low-pass filter. Note that Port C (5..4) use digital supply voltage, VCC.
AREF
AREF is the analog reference pin for the A/D Converter.
Copyright © [email protected] 22
Duplicate is strictly prohibited
2.4 AVR CPU CORE:(ARCHITECTURE)
2.4.1 Introduction:
This section discusses the AVR core architecture in general. The main
function of the CPU core is to ensure correct program execution. The CPU
must therefore be able to access memories, perform calculations, control
peripherals, and handle interrupts.
Copyright © [email protected] 23
Duplicate is strictly prohibited
In order to maximize performance and parallelism, the AVR uses
Harvard architecture with separate memories and buses for program and
data. Instructions in the Program memory are executed with a single level
pipelining. While one instruction is being executed, the next instruction is
pre-fetched from the Program memory. This concept enables instructions to
be executed in every clock cycle. The Program memory is In-System
Reprogrammable Flash memory.
The Status Register contains information about the result of the most
recently executed arithmetic instruction. This information can be used for
altering program flow in order to perform conditional operations. Note that
Copyright © [email protected] 24
Duplicate is strictly prohibited
the Status Register is updated after all ALU Operations, as specified in the
Instruction Set Reference. This will in many cases remove the need for using
the dedicated compare instructions, resulting in faster and more compact
code.
Copyright © [email protected] 26
Duplicate is strictly prohibited
Fig 2.8 CPU General Purpose Working Registers
The Stack is mainly used for storing temporary data, for storing local
variables and for storing return addresses after interrupts and subroutine
calls. The Stack Pointer Register always points to the top of the Stack. Note
that the Stack is implemented as growing from higher memory locations to
lower memory locations. This implies that a Stack PUSH command
decreases the Stack Pointer.
Copyright © [email protected] 28
Duplicate is strictly prohibited
Fig.2.9 Memory mapping.
Copyright © [email protected] 29
Duplicate is strictly prohibited
A self-timing function, however, lets the user software detect when
the next byte can be written. If the user code contains instructions that write
the EEPROM, some precautions must be taken. In heavily filtered power
supplies, VCC is likely to rise or fall slowly on Power up/down. This causes
the device for some period of time to run at a voltage lower than specified as
minimum for the clock frequency used. In order to prevent unintentional
EEPROM writes, a specific write procedure must be followed.
When the EEPROM is read, the CPU is halted for four clock cycles
before the next instruction is executed. When the EEPROM is written, the
CPU is halted for two clock cycles before the next instruction is executed.
If enabled, the ADC will be enabled in all sleep modes. To save power, the
ADC should be disabled before entering any sleep mode. When the ADC is
turned off and on again, the next conversion will be an extended conversion
Copyright © [email protected] 30
Duplicate is strictly prohibited
2.7Analog Comparator:
When entering idle mode, the Analog Comparator should be disabled if not
used. When entering ADC Noise Reduction mode, the Analog Comparator
should be disabled. In the other sleep modes, the Analog Comparator is
automatically disabled. However, if the Analog Comparator is set up to use
the Internal Voltage Reference as input, the Analog Comparator should be
disabled in all sleep modes. Otherwise, the Internal Voltage Reference will
be enabled, independent of sleep mode.
After all reset sources have gone inactive, a delay counter is invoked,
stretching the internal reset. This allows the power to reach a stable level
before normal operation starts. The user through the CKSEL Fuses defines
the time-out period of the delay counter.
Reset Sources:
Copyright © [email protected] 31
Duplicate is strictly prohibited
The ATmega8 has four sources of Reset:
• Power-on Reset:
The MCU is reset when the supply Voltage is below the Power-on
Reset threshold (VPOT).
• External Reset:
The MCU is reset when a low level is present on the RESET pin for
longer than the minimum pulse length.
• Watchdog Reset:
The MCU is reset when the Watchdog Timer period expires and the
Watchdog is enabled.
• Brown-out Reset:
The MCU is reset when the supply voltage VCC is below the Brown-
out Reset threshold (VBOT) and the Brown-out Detector is enabled.
• Watchdog Timer:
The Watchdog Timer is also reset when it is disabled and when a Chip
Reset occurs. Eight different clock cycle periods can be selected to
determine the reset period. If the reset period expires without another
Watchdog Reset, the ATmega8 resets and executes from the Reset Vector.
For timing details on the Watchdog Reset, refer to page 39.
To prevent unintentional disabling of the Watchdog, a special turn-off
sequence must be followed when the Watchdog is disabled.
Copyright © [email protected] 32
Duplicate is strictly prohibited
2.9 INTERFACING / EXTERNAL COMMUNICATION
2.10 USART:
Features
The Analog Comparator compares the input values on the positive pin AIN0
and negative pin AIN1. When the voltage on the positive pin AIN0 is higher
than the voltage on the negative pin AIN1, the Analog Comparator Output,
ACO, is set. The comparator‘s output can be set to trigger the
Timer/Counter1 Input Capture function. In addition, the comparator can
trigger a separate interrupt, exclusive to the Analog Comparator. The user
can select Interrupt triggering on comparator output rise, fall or toggle.
Copyright © [email protected] 34
Duplicate is strictly prohibited
2.10.3 Analog-to-Digital Converter
Features
• 10-bit Resolution
• 0.5 LSB Integral Non-linearity
• ± 2 LSB Absolute Accuracy
• 13 - 260 µs Conversion Time
• Up to 15 kSPS at Maximum Resolution
• 6 Multiplexed Single Ended Input Channels
• 2 Additional Multiplexed Single Ended Input Channels (TQFP and
MLF Package only)
• Optional Left Adjustment for ADC Result Readout
• 0 - VCC ADC Input Voltage Range
• Selectable 2.56V ADC Reference Voltage
• Free Running or Single Conversion Mode
• Interrupt on ADC Conversion Complete
• Sleep Mode Noise Cancellers
The ADC has a separate analog supply voltage pin, AVCC. AVCC
must not differ more than ± 0.3V from VCC. See the paragraph ―ADC Noise
Canceller‖ on page 198 on how to Connect this pin. Internal reference
voltages of nominally 2.56V or AVCC are provided On-chip. The voltage
reference may be externally decoupled at the AREF pin by a capacitor for
better noise performance.
Copyright © [email protected] 35
Duplicate is strictly prohibited
3 HARDWARE COMPONENTS:
3.1.2 FEATURES
3.1.4PRODUCT HIGHLIGHTS:
Copyright © [email protected] 37
Duplicate is strictly prohibited
2. State-of-the-art laser trimming at the wafer level in conjunction with
extensive final testing ensures that AD590 units are easily interchangeable.
Copyright © [email protected] 38
Duplicate is strictly prohibited
Fig 3.1 Temperature Conversion Scale
Copyright © [email protected] 39
Duplicate is strictly prohibited
Fig 3.2 Calibration and Errors
Copyright © [email protected] 40
Duplicate is strictly prohibited
To trim this circuit, the temperature of the AD590 is measured by a
reference temperature sensor and R is trimmed so that VT = 1 mV/K at that
temperature. Note that when this error is trimmed out at one temperature, its
effect is zero over the entire temperature range. In most applications there is
a current-to-voltage conversion resistor (or, as with a current input ADC, a
reference) that can be trimmed for scale factor adjustment.
3.2.1 TIP120/121/122
NPN EPITAXIAL SILICON DARLINGTON TRANSISTOR
Medium Power Linear Switching Applications
Copyright © [email protected] 43
Duplicate is strictly prohibited
Fig 3.6 Equivalent circuit of TIP125/126/127
Copyright © [email protected] 44
Duplicate is strictly prohibited
Table.3.2 Technical details of TIP127
3.3.1 BC 547
Copyright © [email protected] 45
Duplicate is strictly prohibited
NPN GENERAL PURPOSE TRANSISTOR
1 1 COLLECTOR
2 BASE
3 EMITTER
Fig 3.7 BC 547
Copyright © [email protected] 46
Duplicate is strictly prohibited
By generating charge carriers in response to photons, semiconductor
structures yield robust, highly linear solid-state photo detectors for a variety
of applications.
3.5 OP-AMPS
Copyright © [email protected] 47
Duplicate is strictly prohibited
3.5.1 LM324
Low Power Quad Operational Amplifiers
Copyright © [email protected] 48
Duplicate is strictly prohibited
3.5.2 LM 311 VOLTAGE COMPARATOR:
Copyright © [email protected] 49
Duplicate is strictly prohibited
4.0 CIRCUIT DIAGRAMS:
Copyright © [email protected] 50
Duplicate is strictly prohibited
4.2 MOTOR DRIVE CONTROL CIRCUIT
Copyright © [email protected] 51
Duplicate is strictly prohibited
4.2.2 LOGIC TABLE FOR H-BRIDGE CIRCUIT:
Two set of H-Bridge is used for the motion of robot and one is used
for sensing the fire i.e. rotates the sensor and fixes the direction of the fire.
We are using D.C motor of type permanent magnet one the reversal is
done only through change in direction of current flow through the armature.
Ex-or logic gate is used to check the input data if it is same one it
produces logical one output and transistor drive the
Strobe pin of LM311 and for dissimilar input the strobe pin is active
high and perform normal operation. For switching Darlington transistors
NPN and PNP Similar characteristic transistors are used. (TIP 122 and TIP
127).
Copyright © [email protected] 52
Duplicate is strictly prohibited
1 SENSOR CIRCUITS:
VCC
AD 590
PORTC.0
1K Ohms
10K Ohms
GND
Copyright © [email protected] 53
Duplicate is strictly prohibited
4.4 IR Sensor circuit:
VCC
220K ohms
PORTC. 1
TIL81
GND
Copyright © [email protected] 54
Duplicate is strictly prohibited
4.5 Mechanical switch:
S1 Middle
PORT B.1
S2 Left
PORT D.0
GND S3 Right
PORT D.1
Copyright © [email protected] 55
Duplicate is strictly prohibited
5 FUNCTIONAL DESCRIPTIONS:
ALARM FIRE
CIRCUIT EXTINGUISHER
IR FLAME
MOTOR SENSOR
DETECTOR
DRIVE MOTOR
The above Fig.5.1 shows the block diagram of FFR the functional
blocks are indicated and the action or command direction are indicated
clearly. The individual blocks and circuit of each one is explained in the
following sections. The following flow chart gives the full functional idea
of the whole project.
Copyright © [email protected] 56
Duplicate is strictly prohibited
5.2 FUNCTIONAL FLOW CHART
START
SENSOR MONITORING
SEQUENCE
IF FLAME NO
CALL DELAY
DETECTED
YES
ROTATE ROBOT TOWARTS THE
DIRECTION OF FLAME
IF DIRECTION IS NO
CORRECT
YES
CHECK THE TEMPERATURE SENSOR
SIGNAL TO
YES EXTINGUISHER &
IF TEMP.
REACHED ALARM
NO
MOVE FORWARD FOR ‗T‘ SECONDS
Copyright © [email protected] 57
Duplicate is strictly prohibited
Fig 5.2 Functional Flow Chart
5.3 OPERATION:
First the robot stands on its own idle condition and keeps
monitor every‗t‘ sec, if the sensor recognizes any fire. The
sensor is fixed at the top of the robot on a mechanism,
which rotates all around 180 degrees.
After extinguish the fire the alarm continues till the reset
provided to the controller.
Copyright © [email protected] 59
Duplicate is strictly prohibited
6.0 SOFTWARE
The ‗C‘ language has become the standard high level language for
micro controller based applications. Just as the PC is the standard for
personal computing, the AVR are the advanced one for 8- bit micro
controller and the concept of a ‗C‘ Compiler for a controller executing on a
PC is now familiar. Due to numerous improvements the Raisonance RC
compiler version 3student version (generally it is called as Ride RC) is one
of the most efficient compilers based on usual benchmarks results.
Copyright © [email protected] 61
Duplicate is strictly prohibited
REFERENCES:
Copyright © [email protected] 62
Duplicate is strictly prohibited
FURTHER DEVELOPMENTS:
Here we produced the concept of detecting the fire and extinguish the
fire in a remote area. The application oriented developments also be
incorporated such as
Copyright © [email protected] 63
Duplicate is strictly prohibited
Conclusion
• System Status
• Situation Assessment
• Dynamic Planning
• Information Management
• User Interface
• System Interface
Associate system technologies are now mature and ready for implementation
in the command and control architectures for autonomous fire fighting
operations.
Copyright © [email protected] 64
Duplicate is strictly prohibited