14
GENERAL DESCRIPTION Conventionally, wireless-controlled robots use RF circuits, which have the drawbacks of limited working range, limited frequency range and limited control. Use of a mobile phone for robotic control can overcome these limitations. It provides the advantages of robust control, working range as large as the coverage area of the service provider, no interference with other controllers and up to twelve controls. Although the appearance and capabilities of robots vary vastly, all robots share the features of a mechanical, movable structure under some form of control. The control of robot involves three distinct phases: perception, processing and action. Generally, the preceptors are sensors mounted on the robot, processing is done by the on-board microcontroller or processor, and the task (action) is performed using motors or with some other actuators. In this project, the robot is controlled by a mobile phone that makes a call to the mobile phone attached to the robot. In the course of a call, if any button is pressed, a tone corresponding to the button pressed is heard at the other end of the call. The robot perceives this DTMF code with the help of the phone stacked in the robot. The received code is processed by the AT89xxx microcontroller. TECHNICAL SPECIFICATION Working Voltage – 12V AC/DC Operating Current - 1000ma approx. Dual 12V – 400 MA Motor Driver On board Power LED indicator Data received LED (Red) indicator GSM or CDMA Mobile interfacing Via Head phone (kit with standard NOKIA Head phone) Two Digital Sensor Input = Active Low @ 5V DC Status of each sensor with LED Indication Can be operated from anywhere, no distance limit; Internal Buzzer for alarm Operating voltage – 12 to 15V DC Operating current – 1500ma (approx.) Power on LED Indication Communicate from any other mobile phone (GSM or CDMA)

Cell Phone Controlled Robot With Fire Detection System

Embed Size (px)

DESCRIPTION

This is Project Report on Cell Phone Controlled Robot With Fire Detection System.This is an basic Embedded System Project Report.

Citation preview

GENERAL DESCRIPTION

Conventionally, wireless-controlled robots use RF circuits, which have the drawbacks of limited working range, limited frequency range and limited control. Use of a mobile phone for robotic control can overcome these limitations. It provides the advantages of robust control, working range as large as the coverage area of the service provider, no interference with other controllers and up to twelve controls.

Although the appearance and capabilities of robots vary vastly, all robots share the features of a mechanical, movable structure under some form of control. The control of robot involves three distinct phases: perception, processing and action. Generally, the preceptors are sensors mounted on the robot, processing is done by the on-board microcontroller or processor, and the task (action) is performed using motors or with some other actuators.

In this project, the robot is controlled by a mobile phone that makes a call to the mobile phone attached to the robot. In the course of a call, if any button is pressed, a tone corresponding to the button pressed is heard at the other end of the call. The robot perceives this DTMF code with the help of the phone stacked in the robot. The received code is processed by the AT89xxx microcontroller.

TECHNICAL SPECIFICATION

Working Voltage 12V AC/DC

Operating Current - 1000ma approx.

Dual 12V 400 MA Motor Driver

On board Power LED indicator

Data received LED (Red) indicator

GSM or CDMA Mobile interfacing Via Head phone (kit with standard NOKIA Head phone)

Two Digital Sensor Input = Active Low @ 5V DC

Status of each sensor with LED Indication

Can be operated from anywhere, no distance limit;

Internal Buzzer for alarm

Operating voltage 12 to 15V DC

Operating current 1500ma (approx.)

Power on LED Indication

Communicate from any other mobile phone (GSM or CDMA)

Diode protection for reverse polarity connection of DC supply to the PCB

Onboard regulator for regulated supply to the kit

Extremely easy to install

Microcontroller based design for greater flexibility

HOW ITS WORK?

In this project, the robot is controlled by a mobile phone that makes a call to the mobile phone attached to the robot. In the course of a call, if any button is pressed, a tone corresponding to the button pressed is heard at the other end of the call. This tone is called 'dual-tone multiple-frequency' (DTMF) tone. The robot perceives this DTMF tone with the help of the phone stacked in the robot. The received tone is processed by the AT89xxx microcontroller with the help of DTMF decoder MT8870.

The decoder decodes the DTMF tone into its equivalent binary digit and this binary number is sent to the microcontroller. The microcontroller is preprogrammed to take a decision for any given input and outputs its decision to motor drivers in order to drive the motors for forward or backward motion or a turn.

The mobile that makes a call to the mobile phone stacked in the robot acts as a remote. So this simple robotic project does not require the construction of receiver and transmitter units. DTMF signaling is used for telephone signaling over the line in the voice-frequency band to the call switching centre. The version of DTMF used for telephone tone dialing is known as 'Touch-Tone. DTMF assigns a specific frequency (consisting of two separate tones) to each key so that it can easily be identified by the electronic circuit. The signal generated by the DTMF encoder is a direct algebraic summation, in real time, of the amplitudes of two sine (cosine) waves of different frequencies, i.e., pressing '5' will send a tone made by adding 1336 Hz and 770 Hz to the other end of the line. The tones and assignments in a DTMF system are shown in Table 1

DTMF TONE ASSIGNMENT SYSTEM (TABLE - 1)

Frequency1209 Hz1336 Hz1477 Hz1633 Hz

697123A

770456B

852789C

941*0#D

In the block diagram of the microcontroller-based cell phone controlled robot. The important components of this rover are a DTMF decoder, microcontroller and motor driver.

DTMF DECODER

An MT8870 series DTMF decoder is used here. All types of the MT8870 series use digital counting techniques to detect and decode all the 16 DTMF tone pairs into a 4-bit code output. The built-in dial tone rejection circuit eliminates the need for pre-filtering. When the input signal given at pin 2 (IN-) in single-ended input configuration is recognized to be effective, the correct 4-bit decode signal of the DTMF tone is transferred to Q1 (pin 11) through Q4 (pin 14) outputs. Table 2 shows the DTMF data output table of MT8870. Q1 through Q4 outputs of the DTMF decoder (U4) are connected to port pins P1.0 through P1.4 of AT89xxx microcontroller (U2).

MICRO CONTROLLER INTERFACE

The AT89xxx is a low-power, high-performance CMOS 8-bit microcomputer with 4K / 8K bytes 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 AT89xxx is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. It provides the following features:

Compatible with MCS-51 Products

4K / 8K Bytes of In-System Reprogrammable Flash Memory Fully Static Operation: 0 Hz to 24 MHzThree-level Program Memory Lock 128 x 8-bit Internal RAM

32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt SourcesProgrammable Serial Channel

Low-power Idle and Power-down Modes 8-bit

Outputs from port pins P0.0 through P0.4 of the microcontroller are fed to inputs INI through IN4 and enable pins (EN1 and EN2) of motor driver L293D, respectively, to drive two geared DC motors. The microcontroller output is not sufficient to drive the DC motors, so current drivers are required for motor rotation.SENSOR INTERFACE

A maximum of two sensors can be connected to the system via CN7; these can be found in the circuit diagram. These sensors need to have their contacts open when in the inactive state (i.e. normally open) or active low signal @ 5V DC. A power supply voltage of +5 VDC is available for each sensor at the corresponding wiring terminals (CN4). There are many type of sensor available you can connect with the projects. External detection Sensors interface to micro controller via Port, P0.0 to P0.1, (pin no 39 & 38). Port P0 Used as a digital Input Port and is pulled up via 10K resistors network (R-pack RN1).

PIR (Passive Infrared Detector) SensorFIRE sensor (Temperature sensor withactive Low output)

Metal DetectorUltrasonic motion sensor

Smoke detectorWater Overflow Level Sensor

Flame SensorOil Overflow Level Sensor

Alcohol sensorWater Leak Sensor

Glass Break SensorTemperature Sensor

Sound SensorShock Sensor

Vibration sensorPower failure sensor

LPG GAS detector

Magnetic door sensor

BUZZER

A 12V buzzer is connected to port P3.3 (pin 13) of the micro controller through a driver transistor (Q1). The buzzer requires 12 volts at a current of around 100 MA, which cannot provide by the micro controller. So the driver transistor is added. The buzzer is used to addible alarm indication. Normally the buzzer remains off. As soon as pin of the micro controller goes high, the buzzer operates.

MOTOR DRIVER

The L293D is a quad, high-current, half-H driver designed to provide bidirectional drive currents of up to 600 mA at voltages from 4.5V to 36V. It makes it easier to drive the DC motors. The L293D consists of four drivers. Pins INI through IN4 and OUT1 through OUT4 are input and output pins, respectively, of driver 1 through driver 4. Drivers 1 and 2, and drivers 3 and 4 are enabled by enable pin 1 (EN1) and pin 9 (EN2) respectively. When enable input EN1 (pin 1) is high, drivers 1 and 2 are enabled and the outputs corresponding to their inputs are active. Similarly, enable input EN2 (pin 9) enables drivers 3 and 4.

POWER SUPPLY

Two supply voltages are required for circuit. A DC or AC 12 V mains adaptor is connected to bridge rectifier (D1 - 4) via CN5 connector. U1, U2 and U3 are supplied with a regulated 5 V from a 7805 (U4) fixed voltage Regulator. The unregulated voltage of approximately 12 V is required for Motor driving circuit (U3) and Two DC Motor.

THEORY OF H BRIDGE (DC MOTOR DRIVER)

Let's start with the name, H-bridge. Sometimes called a "full bridge" the H-bridge is so named because it has four switching elements at the "corners" of the H and the motor forms the cross bar. The basic bridge is shown in the figure to the right. The key fact to note is that there are, in theory, four switching elements within the bridge. These four elements are often called, high side left, high side right, low side right, and low side left (when traversing in clockwise order).

The switches are turned on in pairs, either high left and lower right, or lower left and high right, but never both switches on the same "side" of the bridge. If both switches on one side of a bridge are turned on it creates a short circuit between the battery plus and battery minus terminals. If the bridge is sufficiently powerful it will absorb that load and your batteries will simply drain quickly. Usually however the switches in question melt.

To power the motor, you turn on two switches that are diagonally opposed. In the picture to the right, imagine that the high side left and low side right switches are turned on. The current flow is shown in green.

The current flows and the motor begins to turn in a "positive" direction. What happens if you turn on the high side right and low side left switches? Current flows the other direction through the motor and the motor turns in the opposite direction. Pretty simple stuff right? Actually it is just that simple, the tricky part comes in when you decide what to use for switches. Anything that can carry a current will work, from four SPST switches, one DPDT switch, relays, transistors, to enhancement mode power MOSFETs.

One more topic in the basic theory section quadrants. If each switch can be controlled independently then you can do some interesting things with the bridge, some folks call such a bridge a "four quadrant device" (4QD get it?). If you built it out of a single DPDT relay, you can really only control forward or reverse. You can build a small truth table that tells you for each of the switch's states, what the bridge will do. As each switch has one of two states, and there are four switches, there are 16 possible states. However, since any state that turns both switches on one side on is "bad", there are in fact only four useful states (the four quadrants) where the transistors are turned on.

PART EXPLANATION

WHAT IS A MICRO ?

A microcontroller is a computer on a single chip; it contains a CPU (usually called the core) and a variety of peripherals which assist your application. In simple circuits the micro may be the only IC! By contrast a typical CPU, like the x86 in your PC, contains only the core - all peripherals, like timers and DMA controllers, are in external chips. Many micros can operate with no external components except an oscillator (a crystal or ceramic resonator) - some do not even require this, having an oscillator built in!

You might not be aware of this, but micros greatly outnumber conventional CPUs (as used in PCs) on this planet, numbering in the billions. Almost all modern appliances include them to support the friendliness and programmability consumers expect these days. Micros can have a very long life span - chips first offered in the late 70s are still chosen for many new designs today!

THE MICRO WORLD

At the top level, micros are classified by the number of bits in a data (not instruction) word. The most popular segment by far is the 8-bit micro, which is what this document attempts to cover. 4-bit micros are used in many high-volume appliances with mini man computing needs, but they are not easily accessible to low-volume users. 16 and 32-bit micros are much more powerful and correspondingly larger - many 32-bit devices are designed to offer Pentium-class power at a fraction of the power and price for battery-operated computers, video game consoles etc.

8-bit micros range in size from very small (only 8 pins!) to very large (over 200 pins), with some large chips providing power and expandability comparable to that of modern CPUs. Since applications for very large micros are specialized and expensive to pursue, we will concentrate on micros offering through-hole rather than surface-mount parts, which effectively limits us to 84-pin and smaller devices.

MICRO CONTROLLER AT89Sxx

The AT89xxx is a low-power, high-performance CMOS 8-bit microcomputer with 4K / 8K bytes 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 AT89xxx is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.

L293 H-BRIDGE

The L293 has 2 H-Bridges (actually 4 Half H-Bridges), can provide about 1 amp to each and occasional peak loads to 2 amps.

The L293 contains 4 half H-bridges labelled 1, 2, 3 and 4 in the pin diagram, which can be used in pairs as two full H-Bridges. In this IC there are two different power supplies (Vcc1 and Vcc2). Vcc1 is for logic input circuit while Vcc2 is supply for the output circuit. This means that you should apply about 5V to Vcc1 and whatever voltage required by the motor (upto 36V max for this IC) to Vcc2. Each Half H-Bridge has an individual Ground. So you must ground the terminal corresponding to the Half H-Bridge you want to use or else you can also just ground all the 4 terminals.

Each Half H-Bridge has an Input (A) and output (Y). Also there are enable pins to turn on the Half H-Bridges. (if 1,2EN (Pin1) is given +5V, then the 1 and 2 Half H-Bridges are turned on. If Pin1 is Ground, then the 1 and 2 Half H-Bridges are disabled. Similar for 3,4EN).

Once a Half H-bridge is enabled, it truth table is as follows:

Input AOutput Y

LL

HH

INPUT 1AINPUT 2AOUTPUT 1YOUTPUT 2YDescription

Braking (both terminals of

LLLLmotor are Gnd)

LHLHForward Running

HLHLBackward Running

HHHHBraking (both terminals of

motor at Vcc2)

So you just give a High level when you want to turn the Half H-Bridge on and Low level when you want to turn it off. When the Half H-Bridge is on, the voltage at the output is equal to Vcc2. If you want to make a Full H-Bridge, you connect the motor (or the load) between the outputs of two Half H-Bridges and the inputs will be the two inputs of the Half H-Bridges. Suppose we have connected Half H-Bridges 1 and 2 to form a Full H-Bridge. Now the truth table is as follows:

CRYSTAL OSCILLATOR

A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters/receivers.

DTMF DECORDER MT8870

The MT8870 is a complete DTMF receiver integrating both the band split filter and digital decoder functions. The filter section uses switched capacitor techniques for high and low group filters; the decoder uses digital counting techniques to detect and decode all 16 DTMF tone pairs into a 4-bit code. External component count is minimized by on chip provision of a differential input amplifier, clock oscillator and latched three-state bus interface. More information please refer Data sheet 0f MT8870

LM7805 (3 TERMINAL VOLTAGE REGULATER)

This is used to make the stable voltage of +5V for U2 (MCU). The LM7805 is three terminal positive regulators are available in the TO-220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, More information please refer Data sheet 0f LM7805

FUNCTIONAL DECODE TABLE

L=LOGIC LOW, H=LOGIC HIGH, Z=HIGH IMPEDANCE

X = DONT CARE

DigitTOEINHE-stQ4Q3Q2Q1

ANYLXHZZZZ

1HXH0001

2HXH0010

3HXH0011

4HXH0100

5HXH0101

6HXH 0110

7HXH0111

8HXH1000

9HXH1001

0HXH1010

*HXH1011

#HXH1100

AHLH1101

BHLH1110

CHLH1111

DHLH0000

.

ASSEMBLY INSTRUCTIONS

Use the component overlay on the PCB to place the components starting with the lowest height components first. Make sure that the diode, LED and electrolytic capacitors are inserted the right way around.

1. Resistors and diodes

2. IC sockets

3. LED s

4. Ceramic capacitors. And crystal

5. Electrolytic capacitors. Make sure you insert them the correct way around.

6. LM7805 regulators. Use needle nosed pliers to bend the leads of the regulator. It does not require a heat sink. Screw down onto to PCB.

FINAL TESTING

In order to control the robot, you need to make a call to the cell phone attached to the robot (through head phone) from am phone, which send-DTMF tunes on pressing the numeric buttons. The cell phone in the robot is kept in 'auto answer' mode. (If the mobile does not have the auto answering facility, receive the call by 'OK' key on the robot connected mobile and then made it in hands-free mode.) So after a ring, the cell phone accepts the call.

Now you ma)' press any button on your mobile to perform actions as listed in Table 2. The DTMF tones thus produced are received by the cell phone in the robot. These tones are fed to the circuit by the headset of the cell phone. The MT8870 decodes the received tone and sends the equivalent binary number to the microcontroller. According to the program in the microcontroller, the robot starts moving.

When you press key '2', Port pins P0.0 and P0.3 are high. The high output at P0.0 and P0.3 of the microcontroller drives the motor driver (L293D). Port pins P0.0 and P0.3 drive motors Ml and M2 in forward direction. Similarly, motors Ml and M2 move for left turn, right turn, backward motion and stop condition as per Table 2

MECHANICAL CONSTRUCTION

When constructing any robot, one major mechanical constraint is the number of motors being used. You can have either a two-wheel drive or a four-wheel drive. Though four-wheel drive is more complex than two-wheel drive, it provides more torque and good control. Two-wheel drive, on the other hand, is very easy to construct.

FURTHER IMROVEMENTS & FUTURE SCOPE

1. IR Sensors: IR sensors can be used to automatically detect & avoid obstacles if the robot goes beyond line of sight. This avoids damage to the vehicle if we are maneuvering it from a distant place.

2. Password Protection: Project can be modified in order to password protect the robot so that it can be operated only if correct password is entered. Either cell phone should be password protected or necessary modification should be made in the assembly language code. This introduces conditioned access & increases security to a great extent.

3. Alarm Phone Dialer: By replacing DTMF Decoder IC CM8870 by a 'DTMF Transceiver IC CM8880, DTMF tones can be generated from the robot. So, a project called 'Alarm Phone Dialer' can be built which will generate necessary alarms for something that is desired to be monitored (usually by triggering a relay). For example, a high water alarm, low temperature alarm, opening of back window, garage door, etc. When the system is activated it will call a number of programmed numbers to let the user know the alarm has been activated. This would be great to get alerts of alarm conditions from home when user is at work.

4. Adding a Camera: If the current project is interfaced with a camera (e.g. a Webcam) robot can be driven beyond line-of-sight & range becomes practically unlimited as GSM networks have a very large range.

PowerSupplyFrequency DecoderBZ1BuzzerdriverSensor-1Sensor-2LEDindication89Sxx5VMotordriverL-motorR-motorConnect cell phoneHandset speakercell phone 1(Rx)12V