Cellphone Robot Using 89s51 (1)

download Cellphone Robot Using 89s51 (1)

of 25

description

cellphone robot

Transcript of Cellphone Robot Using 89s51 (1)

certificate

DTMF CONTROLLED ROBOT USING 89s51Submitted by ABSTRACT

In this project, the robot is controlled by a mobile phone that makes a call to the mobile phone attached to the robot micro-controller.

In the course of a call, if any key is pressed, a tone corresponding to that key 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 on the robot.

The received tone is processed by the microcontroller with the help of decoder circuit.

Microcontroller then sends signals to the motor driver IC to operate the motors.

The metal detector circuit mounted on the robot detects any metal object around it and transmits the signal wirelessly.

This robot is password protected.

INDEXChapter 1 : Introduction.4chapter 2 : literature survey..5 -6

2.1 IC MT8870C

2.2 IC 89S51

2.3 IC L293D

2.4 ROBOT

2.5 DTMF

chapter 3 : system design 7 -223.1 System Specification 3.2 System block diagram with explanation

3.3 Transmitter Module3.4 Receiver Module3.5 Explanation of Modular Design3.6 Metal Detector Module

3.7 System Flowchart

3.8 Artwork layoutCHAPTER 4 : RESULT & DISCUSSION 23CHAPTER 5 : CONCLUSION 24CHAPTER 6 : APPENDIX . 25CHAPTER 7 : REFERENCE ..27 CHAPTER - 1 INTRODUCTIONThis project is designed using DTMF( Dual Tone Multiple Frequency) decoder to come

over the problems with RF-ID.

Generally RF-ID has very limited frequency range, limited distance range & limited controls.

But mobile phone using DTMF has working range as the coverage area of the service provider.

Hence user can send our robot anywhere on the earth & control it being at our place.We have used ATMEGA 16 as the micro-controller of the robot. The IC of DTMF decoderis MT8870C. This IC receives the DTMF tone from phone through headset. Its inner decodercircuit converts the tone into respective BCD code.

The BCD output of 8870 IC is given to 89S51. The software code isburnt to microcontroller IC using ISP programmer. The code is written in C language using

WINAVR - Programmers Notepad. The Hex file of the code is burnt to AVR. AVR

drives 2 DC motors according to the code burnt to it. But the output current available

at the output of the micro-controller is not sufficient to drive motors. Hence we have

used motor driver IC L293D at the output of AVR. And output of driver IC drives

motors.

Power supply circuit is connected to the main circuit. 5V voltage regulator

IC 7805 is used to supply 5V to DTMF decoder and IC 7812 to supply 12 V to AVR & motor driver L293D. As plugging to AC input does not allow to move the robot more than 3 m range hence

This circuit requires 12V DC rechargeable battery.The complete circuit layout is made by EAGLE software.

CHAPTER - 2

LITERATURE SURVEY

2.1 IC MT8870C

This IC is used in this project for following features:

It provides full DTMF receiver capability.

Less than 35mW power consumption.

It uses digital counting techniques for detection and decoding of all 16 DTMF tone pairs into a 4-bit code.

It requires only a low cost TV crystal or ceramic resonator as an external component.

Other Applications of MT8870C : PABX

Central office

Mobile radio

Remote control

Remote data entry

Call limiting

Telephone answering systems

Paging systems2.2 IC 89S51

This IC is used in this project for following features:

The PWM feature can be used to control speed of DC motor.

It has 4KB flash program memory Other Applications of 89S51 : Faster & higher program memory applications

Multiple input output applications

2.3 IC L293D

This IC is used in this project for following features:

600mA output current capability per channel. Enable facility.Other Applications of L293D: It drives inductive loads ,such as- relays, solenoides,

DC and stepping motors . Switching power transistors2.4 ROBOT

This robot is manually operated robot by DTMF keypad and decoder circuit . It has ATMEGA 16 Microcontroller . It is password protected . It moves forward, reversed, left ,right and stops according to programming. It detects metal objects .2.5 DTMF

Dual-tone multi frequency signalling (DTMF) is used for telecommunication signalling over analog telephone lines in the voice frequency band between telephone handsets and other communications devices and the switching centre. CHAPTER - 3

SYSTEM DEVELOPMENT3.1 SYSTEM SPECIFICATIONS :Mechanical specifications :ROBOT Dimensions

Length

: 30cm

Breadth

: 20 cmWeight

: 475 gmHeight

: 8cmMaximum speed:200rpmMaterial used : BakeliteMotors used : 12 volts 200 rpm motorElectronical specifications :Input current : Input voltage : 12.06 voutput current :output voltage : AVR output :3.2 SYSTEM BLOCK DIAGRAM WITH EXPLANATION

Fig 2.1 block diagram of Robot/Receiver ModuleEXPLANATION OF BLOCK DIAGRAM

MOBILE :

This system requires any GSM mobile phone with headsets connectivity .Two mobiles are required one as transmitter & other as receiver. Transmitter calls receiver mobile which is in auto receive mode. Call is received automatically; then DTMF tones which are sent by transmitter are received by receiver. Receiver sends the DTMF tone to DTMF decoder via headsets.

DTMF DECODER :This system uses DTMF IC MT8870C. This IC provides full DTMF receiver capability by integrating both the band split filter & digital decoder functions into a single 18 pin IC.Inbuilt decoder circuit converts the DTMF tone into 4 bit BCD output. 89S51 : This system uses AVR ATMEGA 16.Output of DTMF decoder is parallaly given to the microcontroller at the lower nibble of port B. The AVR controller then passes the command to the motor driver ICs for motion.

The output is given to the motor driver IC from upper nibble of port B.

POWER SUPPLY :This system requires 12V & 5V supply. So battery of 12 volts & 500 mA is used.

LM7812 & LM7805 regulator ICs are used. MOTOR DRIVER IC :The output of microcontroller is given to the motor driver IC L293D. As output current of microcontroller is insufficient to drive the motors; motor driver IC is required. Also it protects microcontroller IC from large reverse voltage spikes produced by motors. DC MOTORS :DC motors are connected to motor driver IC. 12 volts, 100 rpm DC motors are used which move the wheels. METAL DETECTOR CIRCUIT :The metal detector when detects a metal passes a signal turns the buzzer on. So we can use this robot for detecting the metal.3.3 TRANSMITTER MODULE:

3.4 RECEIVER MODULE

3.5 Explanation of Modular Design MICRO-CONTROLLER (89s51):Low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry- standard 8051 instruction set and pin-out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel 89s51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The 89s51 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the 89s51 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 interrupt or hardware reset.

This is the most important segment of the project, i.e. the microcontroller AVR. The controller is responsible for detection and polling of the peripherals status. It is responsible for making decisions for decoding the DTMF output and giving control signal to Motors through motor driver ICs. It is responsible for prioritizing all the devices attached to it.

We have used the ATMEL 89s51 microcontroller. The 89s51 is a low-power, high-performance CMOS 8-bit microcontroller with 16K bytes of in-system programmable Flash memory. It has got 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and a clock circuitry.

It is the major part of the system which controls all the operation of the circuit such as motor interfacing. It also decides the control signal to be given to DC motors along with the time duration for which they should be given.

Pin no.DescriptionPin no.description

PA.0Not ConnectedPC.0Not Connected

PA.1Not ConnectedPC.1Not Connected

PA.2Not ConnectedPC.2Not Connected

PA.3Not ConnectedPC.3Not Connected

PA.4Not ConnectedPC.4Not Connected

PA.5Not ConnectedPC.5Not Connected

PA.6Not ConnectedPC.6Not Connected

PA.7Not ConnectedPC.7Not Connected

PB.0DTMF DecoderPD.0Not Connected

PB.1DTMF DecoderPD.1Not Connected

PB.2DTMF DecoderPD.2Not Connected

PB.3DTMF DecoderPD.3Not Connected

PB.4MOTOR DRIVER PD.4Not Connected

PB.5MOTOR DRIVER PD.5Not Connected

PB.6MOTOR DRIVER PD.6Not Connected

PB.7MOTOR DRIVER PD.7Not Connected

POweR SUPPLY MODULE

1) Battery:

Battery is the main component of the power supply module. We have used Battery as we have to generate 5 volts and 12 volts DC supply so we have used 12 volts / 500 mA Batteries which mean its output will be 12 volts with current rating of 500 mA.

2) FILTER CAPACITOR:

As mentioned above we have to use filter capacitor to remove the signal from the output of battery.

3) VOLTAGE REGULATOR:

Two separate voltage regulators are used after the filter capacitor so as to generate constant DC voltage supply of 5 volts and 12 volts. We have used 7805 and 7812 as a voltage regulator. Both of them are three pin IC which are namely input, ground and output. We have to give out put of filter capacitor to the input of regulator, and we get 5 volts and 12 volts supply at the output pin of the respective regulator.

Crystal circuit: - Diagram: -

Working: - The circuit consists of one crystal and two capacitors. The crystal is used to give the microcontroller the required periodic pulses to make it function properly. The crystal used in the project is of 12 MHz. The two capacitors are connected to two pins of the crystal and are grounded at the other ends

Reset circuit: -Diagram: -

Working: - The circuit gives the required starting pulse to the microcontroller to start the operation from the very beginning. The 89s51 microcontroller requires the active high reset pulse. So the capacitor is connected to positive supply and the resistor is grounded.

Pull Up Resistors:Diagram: -

Working: - The microcontroller pins cannot be connected to the MOTOR DRIVER directly because the microcontroller cannot supply all the required current. So the required remaining current is provided through the pull-up resistors. They are designed to supply just the enough current to the motor driver circuit.DTMF DECODER

Features of MT8870 DTMF Decoder IC: Full DTMF receiver

Less than 35mW power consumption

Industrial temperature range

Uses quartz crystal or ceramic resonators

Adjustable acquisition and release times

18-pin DIP, 18-pin DIP EIAJ, 18-pin SOIC ,20-pin PLCC Advantages of DTMF control over RF control

Conventionally, wireless-controlled robots use RF modules, which have the drawbacks of limited working range, limited frequency range and limited control.

Use of 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.

DTMF KEYPAD FREQUENCIES1209 Hz1336 Hz1477 Hz1633 Hz

697 Hz 1 2 3 A

770 Hz 4 5 6 B

852 Hz 7 8 9 C

941 Hz * 0 # D

3.7 SYSTEM FLOWCHART:

3.8 ARTWORK LAYOUT

PCB Layout

CHAPTER - 4RESULTS AND DISCUSSIONS

This design can be implemented further in border security & on mine field. It can send CCTV signals to security system if camera is installed in it. Hence it can be used as real time servellience

system also.

INPUT

KEYS INPUTFREQUENCY TORECEIVER MOTOR INPUTDIRECTION

OF MOTION

( in Hz)R2R1L2L1

2 697 - 1336 0 1 0 1FORWARD

4 770 - 1209 0 1 0 0LEFT

6 770 - 1477 0 0 0 1RIGHT

8 852 - 1336 1 0 1 0BACKWARD

5 770 - 1336 0 0 0 0STOP

APPLICATIONS: -

This robot can be used in the borders for disposing hidden land mines.

The robot can be used for reconnaissance or surveillance.

The robot can be used anywhere there is the service provider tower of the connection provided that is mounted on the robot.

CHAPTER - 5

CONCLUSIONMoves in forward direction ,reverse direction. It can turn left or right while moving forward or in reverse direction.

Instant reverse or forward running without stopping on the spot left or right turn to pass through the narrow space

On the way it detects metal & buzzes. It starts movement only after checking the password.

CHAPTER 6 APPENDIX Datasheet of IC MT8870C Datasheet of IC 89S51 Datasheet of IC L293D

Datasheet of IC 7805

Datasheet of IC 7812 COMPONENT LISTSr.noComponentsSpecifications

PriceQuantity

1.Capacitor

1000microF81

100microF42

10microF21

104picoF12

33picoF12

22picoF12

2.ICs

89s511251

L293D701

CM8870601

7805101

7812101

3.Resistor

10k ohm0.52

330k ohm0.52

100k ohm0.52

4. Crystal oscillator

11.0592MHz81

3.579545 MHz91

5. LED12

6. Motor 12 volts,100 rpm1752

7. Wheels502

8.Castro wheel(Freewheeling)801

9. Battery12v4751

10.Mobile headphone 1501

11.Robot Chassis2001

12.2 Pin connectors34

TOTAL COST1679

CHAPTER -7 REFERENCES1. The 8051 Microcontroller: Architecture, Programming, and Applications

By

Kenneth_Ayala

2. Micro Controllers [Theory And Applications ]

By

Ajay V. Deshmukh-

Tata McGraw. Hill. 8.

STOP

PA0 = 0

PA1 = 0

PA2 = 0

PA3 = 0

PA0 = 0

PA1 = 0

PA2 = 0

PA3 = 1

PA0 = 0

PA1 = 1

PA2 = 0

PA3 = 0

PA0 = 1

PA1 = 0

PA2 = 1

PA3 = 0

DTMF = 6

DTMF = 5

DTMF= 8

INITILIZE DTMF CODE

DC Motor 2

DTMF = 2

CLEAR ALL BITS OF MOTOR PINS

INITIALIZATION

STOP

REVERSE

RIGHT

LEFT

START

89s51

Motor Driver

PA0 = 0

PA1 = 1

PA2 = 0

PA3 = 1

READ THE DTMF PORT

DTMF = 4

DC Motor 1

DTMF Decoder

FORWARD

Mobile

12 V Battery

PAGE 21