final project report_full edit

47
1 A PROJECT REPORT ON GSM BASED ROBOTIC VEHICLE Submitted by NIPUN NAIR (SP09EEU024) ABIR BOSE (SP09EEU302) SAYAM ROY (SP09EEU308) SHASHI BHUSHAN (SP09EEU309) In partial fulfillment for the award of the degree Of BACHELOR OF ENGINEERING IN ELECTRICAL AND ELECTRONICS ENGINEERING St. PETER’S UNIVERSITY St. Peter’s Institute of Higher Education and Research (Declared Under Section 3 of the UGC Act, 1956) AVADI, CHENNAI 600 054 TAMIL NADU APRIL 2013

Transcript of final project report_full edit

Page 1: final project report_full edit

1

A PROJECT REPORT ON

GSM BASED ROBOTIC VEHICLE

Submitted by

NIPUN NAIR (SP09EEU024)

ABIR BOSE (SP09EEU302)

SAYAM ROY (SP09EEU308)

SHASHI BHUSHAN (SP09EEU309)

In partial fulfillment for the award of the degree

Of

BACHELOR OF ENGINEERING

IN

ELECTRICAL AND ELECTRONICS ENGINEERING

St. PETER’S UNIVERSITY St. Peter’s Institute of Higher Education and Research

(Declared Under Section 3 of the UGC Act, 1956)

AVADI, CHENNAI – 600 054

TAMIL NADU

APRIL 2013

Page 2: final project report_full edit

2

St. PETER’S UNIVERSITY St. Peter’s Institute of Higher Education and Research

(Declared Under Section 3 of the UGC Act, 1956)

AVADI, CHENNAI – 600 054

TAMIL NADU

BONAFIDE CERTIFICATE

Certified that this project report “GSM BASED ROBOTIC VEHICLE”

is the bonafide work of Nipun Nair (Reg No: SP09EEU024), Abir Bose (Reg

No: SP09EEU302), Sayam Roy (Reg No: SP09EEU308), Shashi Bhushan

(Reg No: SP09EEU309) who carried out the project work under my

supervision.

SIGNATURE SIGNATURE

Prof. R. JAYARAMAN, M.Sc.(Engg), Mrs. M. VASUGI

Head of the Department

Professor & Head Of the

Department of EEE Department of EEE

St. Peter’s University, St. Peter’s University,

Avadi, Chennai – 600 054 Avadi, Chennai – 600 054

Certified that the candidate was examined in the viva-voce examination held

on__________.

INTERNAL EXAMINER EXTERNAL EXAMINER

Page 3: final project report_full edit

3

ACKNOWLEDGEMENT

The satisfaction and euphoria that accompany the successful completion of any task

would be incomplete without the mentioning of the people whose constant guidance and

encouragement made it possible. We take pleasure in presenting before you, our project,

which is result of studied blend of both research and knowledge.

With deep sense of gratitude and immense pleasure, we would first like to thank our

Vice Chancellor Dr. D.S. RAMACHANDRA MURTHY, B.E, M.Sc(Engg.), Ph.D. (Offg.) for his

support.

A particular department of gratitude to Prof R. JAYARAMAN, M.Sc.(Engg), Head of

the Department, Electrical and Electronics Engineering for having instilled in us the

confidence to complete our project in time.

We express our earnest gratitude to our internal guide Mrs. M. VASUGI, ,

Electrical and Electronics Engineering, our project guide, for his constant support,

encouragement and guidance. We are grateful for his cooperation and his valuable

suggestions.

Finally, we express our gratitude to all other members who are involved either directly

or indirectly for the completion of this project.

Page 4: final project report_full edit

4

TABLE OF CONTENTS

TOPIC PAGE NO

Bonafide Certificate 2

Acknowledgement 3

Table of Contents 4

List of Figures 6

1. Abstract 7

2. Introduction to Embedded Systems 8

3. Project block Diagram 12

4. Hardware Requirements 13

4.1 Voltage Regulator 14

4.2 Microcontroller AT89S52 15

4.3 Push button 19

4.4 DTMF Decoder 20

4.5 MOTOR DRIVER IC L293D 22

4.6 DC MOTOR 25

4.7 INVERTER IC 7404 26

4.8 LED 27

4.9 1N4007 DIODE 28

4.10 Resistors 29

4.11 Capacitors 30

4.12 Battery 31

Page 5: final project report_full edit

5

CONTENTS PAGE NO

5. Schematic Diagram 32

5.1 Description 33

5.2 Operation Explanation 35

6. List of Materials 38

7. Coding 39

8. Hardware Testing 41

8.1 Continuity Test 41

8.2 Power on Test 41

9. Result 42

10. Conclusion 45

11. Bibliography 46

Page 6: final project report_full edit

6

LIST OF FIGURES

Figures Page No

2(a). Embedded System design Calls 8

2(b). V Diagram 9

3. Project block diagram 12

4.1(a) Block diagram of Voltage Regulator 14

4.2(a) Pin diagram AT89S52 15

4.2(b) Oscillator Connections 16

4.2(c) External clock drive Configuration 16

4.2(d) Block diagram of AT89S52 17

4.3(a) Push on Button 19

4.4(a) Frequency Group of DTMF Decoder 20

4.4(b) DTMF Decoder IC MT8870D 21

4.4(c) DTMF Generated signal 21

4.5(a) Block Diagram of L293D 23

4.5(b) Pin Diagram of L293D 23

4.6(a) DC MOTOR 25

4.7(a) INVERTER IC 7404 26

4.8(a) Types of LED 27

4.8(b) Symbol of LED 27

4.9(a) 1N4007 DIODE 28

4.9(b) PN Junction DIODE 28

4.10 Different Resistors 29

4.11 Different Capacitors 30

5.1(a) L293D Working circuit 34

5.2(a) DTMF Decoder Circuit 36

9.1 Voltage of pin Without IC 42

9.2 Voltage of pin With IC 43

9.3 Project photo 44

Page 7: final project report_full edit

7

1. ABSTRACT

The project is designed to develop a robotic vehicle that is controlled by a GSM based

cell phone. DTMF commands from a GSM device (cell phone) are sent to another GSM

device (cell phone) which is mounted on the robot. These commands are fed to a

microcontroller of 8051 family to operate the vehicle movement through motor interface.

The main scope of project is to send commands from one GSM device to be received

by another GSM device mounted on the robot to receive the DTMF (Dual Tone Multi

Frequency) mode commands which are then decoded by a DTMF decoder. The

corresponding codes are then fed to a microcontroller, programmed to recognize those codes

to operate 2nos DC motors through motor driver IC for any direction movement as per the

sent commands from sender’s mobile. The motors are controlled using motor driver IC which

is interfaced to the microcontroller. It uses microcontroller from 8051 family and a battery for

power source.

In this we aim to develop the GSM based robotic vehicle with successful movement

of the vehicle in the direction required. Further the project can be enhanced by interfacing it

with additional motors for multipurpose activity, with camera and sensors for remote

movement of vehicle by avoiding obstacle. For example, spy robot, obstacle sensing robot,

war fighter, pick and place robot used in industry works etc.

Page 8: final project report_full edit

8

2. INTRODUCTION TO EMBEDDED SYSTEMS

What is embedded system?

An Embedded System is a combination of computer hardware and software, and

perhaps additional mechanical or other parts, designed to perform a specific function. An

embedded system is a microcontroller-based, software driven, reliable, real-time control

system, autonomous, or human or network interactive, operating on diverse physical

variables and in diverse environments and sold into a competitive and cost conscious market.

An embedded system is not a computer system that is used primarily for processing,

not a software system on PC or UNIX, not a traditional business or scientific application.

High-end embedded & lower end embedded systems. High-end embedded system - Generally

32, 64 Bit Controllers used with OS. Examples Personal Digital Assistant and Mobile phones

etc .Lower end embedded systems - Generally 8,16 Bit Controllers used with an minimal

operating systems and hardware layout designed for the specific purpose

.

SYSTEM DESIGN CALLS:

FIG 2(a): Embedded system design calls

Page 9: final project report_full edit

9

EMBEDDED SYSTEM DESIGN CYCLE:

FIG 2(b) “V Diagram”

Characteristics of Embedded System:

• An embedded system is any computer system hidden inside a product other than a

computer.

• They will encounter a number of difficulties when writing embedded system software

in addition to those we encounter when we write applications

– Throughput – Our system may need to handle a lot of data in a short period of

time.

– Response–Our system may need to react to events quickly

– Testability–Setting up equipment to test embedded software can be difficult

– Debugability–Without a screen or a keyboard, finding out what the software is

doing wrong (other than not working) is a troublesome problem

– Reliability – embedded systems must be able to handle any situation without

human intervention

– Memory space – Memory is limited on embedded systems, and you must

make the software and the data fit into whatever memory exists

Page 10: final project report_full edit

10

– Program installation – you will need special tools to get your software into

embedded systems

– Power consumption – Portable systems must run on battery power, and the

software in these systems must conserve power

– Processor hogs – computing that requires large amounts of CPU time can

complicate the response problem

– Cost – Reducing the cost of the hardware is a concern in many embedded

system projects; software often operates on hardware that is barely adequate

for the job.

• Embedded systems have a microprocessor/ microcontroller and a memory. Some

have a serial port or a network connection. They usually do not have keyboards,

screens or disk drives.

Page 11: final project report_full edit

11

APPLICATIONS

1) Military and aerospace embedded software applications

2) Communicat ion Appl icat ions

3) Indus tr ial automation and process cont rol software

4) Mastering the complexity of applications.

5) Reduction of product design time.

6) Real time processing of ever increasing amounts of data.

7) Intelligent, autonomous sensors.

CLASSIFICATION

Real Time Systems.

RTS is one which has to respond to events within a specified deadline.

A right answer after the dead line is a wrong answer.

RTS CLASSIFICATION

Hard Real Time Systems

Soft Real Time System

HARD REAL TIME SYSTEM

"Hard" real-time systems have very narrow response time.

Example: Nuclear power system, Cardiac pacemaker.

SOFT REAL TIME SYSTEM

"Soft" real-time systems have reduced constrains on "lateness" but still must operate

very quickly and repeatable.

Example: Railway reservation system – takes a few extra seconds the data remains

valid.

Page 12: final project report_full edit

12

3. PROJECT BLOCK DIAGRAM

Page 13: final project report_full edit

13

4. HARDWARE REQUIREMENTS

Page 14: final project report_full edit

14

HARDWARE COMPONENTS:

1. VOLTAGE REGULATOR

2. MICROCONTROLLER (AT89S52)

3. PUSH BUTTONS

4. DTMF DECODER

5. L293D MOTOR DRIVER

6. DC MOTOR

7. INVERTER IC 7404

8. LED

9. 1N4007

10. RESISTORS

11. CAPACITORS

12. BATTERY

4.1 VOLTAGE REGULATOR 7805

Page 15: final project report_full edit

15

Features

• Output Current up to 1A

• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V

• Thermal Overload Protection

• Short Circuit Protection

• Output Transistor Safe Operating Area Protection

Description

The LM78XX/LM78XXA series of 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 shutdown

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, these devices can be used with external components to obtain

adjustable voltages and currents.

Here we use the voltage regulator to provide a constant 5v Dc output voltage.

Internal Block Diagram

FIG 4.1(a): BLOCK DIAGRAM OF VOLTAGE REGULATOR

4.2 MICROCONTROLLER AT89S52

Page 16: final project report_full edit

16

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with

8K bytes of in-system programmable Flash memory. The Atmel AT89S52 is a powerful

microcontroller which provides a highly-flexible and cost-effective solution to many

embedded control applications. The AT89S52 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 AT89S52 is designed with static logic for

operation down to zero frequency and supports two software selectable power saving modes.

Pin Configurations of AT89S52

FIG 4.2(a): PIN DIAGRAM OF AT89S52

Oscillator Characteristics:

Page 17: final project report_full edit

17

XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier

which can be configured for use as an on-chip oscillator. Either a quartz crystal or ceramic

resonator may be used. To drive the device from an external clock source, XTAL2 should be

left unconnected while XTAL1 is driven as shown in Figure 4.2.

FIG 4.2(b): Oscillator Connections

FIG 4.2(c): External Clock Drive Configuration

Block Diagram of AT89S52:

Page 18: final project report_full edit

18

FIG 4.2(d): BLOCK DIAGRAM OF AT89S52

Operating Modes:

Page 19: final project report_full edit

19

1. Idle Mode

In idle mode, the CPU puts itself to sleep while all the on chip peripherals remain active.

The mode is invoked by software. The content of the on-chip RAM and all the special

functions registers remain unchanged during this mode. The idle mode can be terminated by

any enabled interrupt or by a hardware reset.

2. Power down Mode

In the power down mode the oscillator is stopped, and the instruction that invokes

power down is the last instruction executed. The on-chip RAM and Special Function

Registers retain their values until the power down mode is terminated. The only exit from

power down is a hardware reset. Reset redefines the SFRs but does not change the on-chip

RAM. The reset should not be activated before VCC is restored to its normal operating level

and must be held active long enough to allow the oscillator to restart and stabilize.

4.3 PUSH BUTTONS

Page 20: final project report_full edit

20

A push-button (also spelled pushbutton) or simply button is a simple switch mechanism for

controlling some aspect of a machine or a process. Buttons are typically made out of hard

material, usually plastic or metal. The surface is usually flat or shaped to accommodate the

human finger or hand, so as to be easily depressed or pushed.

Push to ON button:

FIG 4.3(a): Push on button

Initially the two contacts of the button are open. When the button is pressed they become

connected. This makes the switching operation using the push button.

Here we use the push button for the reset operation to clear the memory of the

microcontroller.

4.4 DTMF DECODER

Page 21: final project report_full edit

21

Introduction

Dual Tone Multiple Frequency (DTMF) decoder IC is used to decode the key strokes

like that of a telephone.

Telephone signalling is based on encoding keypad digits using two sinusoidal of

different frequencies, hence the name DTMF. Each digit is represented by a low frequency

and a high frequency sinusoid. The frequencies used were recommended by AT&T such that

no two frequencies are integral multiples of each other. This facilitates correct decoding even

in the presence of non-linearity of filters which cause higher harmonics to be present.

FIG 4.4(a). Frequency group of DTMF Decoder

Page 22: final project report_full edit

22

FIG 4.4(b): DTMF DECODER IC MT8870D

DTMF generated signal

FIG 4.4(c): DTMF generated signal

Each digit on the keypad is encoded as a DTMF tone, which is then transmitted over a

medium, and decoded at the receiving end. A keypad is usually used to generate the required

DTMF tone. Each key has associated with it a row frequency, and a column frequency. When

a key is pressed, the encoding circuitry mixes together these two frequencies, and transmits

the result. The receiver then decodes the tone back into its two respective frequencies, and

then the processing circuit will act accordingly.

Here we use the DTMF tone of keys 2, 4, 5, 6, 8 for vehicle movement. The DTMF tone of

other keys can be designed to control other advanced features if required.

Page 23: final project report_full edit

23

4.5 MOTOR DRIVER IC (L293D)

DESCRIPTION:

L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as

current amplifiers since they take a low-current control signal and provide a higher-current

signal. This higher current signal is used to drive the motors.

L293D contains two inbuilt H-bridge driver circuits. In its common mode of

operation, two DC motors can be driven simultaneously, both in forward and reverse

direction. The motor operations of two motors can be controlled by input logic at pins 2 & 7

and 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will

rotate it in clockwise and anticlockwise directions, respectively.

Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to

start operating. When an enable input is high, the associated driver gets enabled. As a result,

the outputs become active and work in phase with their inputs. Similarly, when the enable

input is low, that driver is disabled, and their outputs are off and in the high-impedance state.

In the project pins 11 and 14 are used to drive the motors to move the vehicle forward

or backward and the pins 3 and 6 used to drive the motors to move the vehicle right or left.

Page 24: final project report_full edit

24

Block diagram:

FIG 4.5(a): BLOCK DIAGRAM OF L293D

Pin Diagram:

FIG 4.5(b): Pin diagram L293D

Page 25: final project report_full edit

25

Pin description:

Page 26: final project report_full edit

26

4.6 DC MOTOR

A DC motor is an electric motor that runs on direct current (DC) electricity. In any

electric motor, operation is based on simple electromagnetism. A current-carrying 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. The internal configuration of a DC motor is designed to harness the

magnetic interaction between a current-carrying conductor and an external magnetic field to

generate rotational motion.

A 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).

FIG.4.6 (a) DC motor

Here we use two dc motors that are used to move the vehicle as required. The two

motors rotate together or individually as per the command given by the driver IC.

Page 27: final project report_full edit

27

4.7 INVERTER IC 7404

The 7404 is an inverting buffer, especially useful when the output of one circuit cannot sink

much current. It operates on the basic principle of NOT gate operation.

NOT GATE Logic-Rules:

The output is the inverse of the input, in other words if the input is HIGH then the output is

LOW and if the input is LOW the output is HIGH.

FIG 4.7: INVERTER IC 7404

Description:

The inverter IC is used here as a buffer to invert the binary output of the DTMF

decoder. For example for the pressed key ‘2’ output of the DTMF decoder is

‘0010’(D3D2D1D0) that is inverted to ‘1101’ by the inverter IC for easy operation of the

interfaced microcontroller.

APPLICATION:

Logical inversion

pulse shaping

Oscillators

Page 28: final project report_full edit

28

4.8 LED

A light-emitting diode (LED) is a semiconductor light source. LEDs are used as

indicator lamps in many devices, and are increasingly used for lighting. When a light-

emitting diode is forward biased (switched on), electrons are able to recombine with holes

within the device, releasing energy in the form of photons.

This effect is called electroluminescence and the color of the light (corresponding to

the energy of the photon) is determined by the energy gap of the semiconductor. LEDs

present many advantages over incandescent light sources including lower energy

consumption, longer lifetime, improved robustness, smaller size, faster switching, and greater

durability and reliability.

Types of LED’S:

FIG 4.8(a): Types of LED

Light-emitting diodes are used in applications as diverse as replacements for aviation

lighting, automotive lighting as well as in traffic signals.

Electronic Symbol:

FIG 4.8(b): Symbol of LED

Page 29: final project report_full edit

29

4.9 1N4007 DIODE

Diodes are used to convert AC into DC these are used as half wave rectifier or full wave

rectifier. Three points must he kept in mind while using any type of diode.

1.Maximum forward current capacity

2.Maximum reverse voltage capacity

3.Maximum forward voltage capacity

FIG 4.9(a): 1N4007 diodes

Diode of same capacities can be used in place of one another. Besides this diode of

more capacity can be used in place of diode of low capacity but diode of low capacity cannot

be used in place of diode of high capacity.

FIG 4.9(b):PN Junction diode

Here we use the diode 1N4007 to get a voltage of approx. 5V.

Page 30: final project report_full edit

30

4.10 RESISTORS

A resistor is a two-terminal electronic component designed to oppose an electric current by

producing a voltage drop between its terminals in proportion to the current, that is, in

accordance with Ohm's law:

V = IR

FIG 4.10: Different Resistors

We use the resistors to limit the current in different applications. The value of

resistances used here are 330R, 330K, 10K, 100K, 22K.

Page 31: final project report_full edit

31

4.11 CAPACITORS

A capacitor or condenser is a passive electronic component consisting of a pair of conductors

separated by a dielectric. When a voltage potential difference exists between the conductors,

an electric field is present in the dielectric. This field stores energy and produces a

mechanical force between the plates. The effect is greatest between wide, flat, parallel,

narrowly separated conductors.

FIG 4.11: Different Capacitors

Capacitors are widely used in electronic circuits for blocking direct current while

allowing alternating current to pass, in filter networks, for smoothing the output of power

supplies, in the resonant circuits that tune radios to particular frequencies and for many other

purposes.

Value of capacitances used here are 470uF/35V, 10uF/63V, 33pF Ceramic, 0.1uF

Ceramic, 0.47uF (470nF) Polyester, 22pF Ceramic.

Page 32: final project report_full edit

32

4.12 BATTERY

An electrical battery is a combination of one or more electrochemical cells, used to convert

stored chemical energy into electrical energy. The battery has become a common power

source for many household and industrial applications.

Batteries may be used once and discarded, or recharged for years as in standby

power applications. Miniature cells are used to power devices such as hearing aids and

wristwatches; larger batteries provide standby power for telephone exchanges or computer

data centers.

In this project we use 4 pencil batteries (AA) each providing 1.5V in series. So a

total voltage of 6V is provided to the diode.

Page 33: final project report_full edit

33

5. SCHEMATIC DIAGRAM

Page 34: final project report_full edit

34

5.1 DESCRIPTION

POWER SUPPLY

This project uses a 6V battery for power supply. A silicon diode is used in series for

getting approximately 5V. One LED is connected of this 5V point in series with a resistor of

330Ω to the ground i.e., negative voltage to indicate 5V power supply availability.

STANDARD CONNECTIONS TO 8051 SERIES MICRO CONTROLLER

ATMEL series of 8051 family of micro controllers need certain standard

connections. The 4 set of I/O ports are used based on the project requirement. Every

microcontroller requires a timing reference for its internal program execution therefore an

oscillator needs to be functional with a desired frequency to obtain the timing reference as t

=1/f.

A crystal ranging from 2 to 20 MHz is required to be used at its pin number 18 and 19

for the internal oscillator to work. Typically 11.0592 MHz crystal is used. Two small value

ceramic capacitors of 33pF each is used as a standard connection for the crystal.

RESET

Pin no 9 is provided with a reset arrangement by a combination of an electrolytic

capacitor and a register forming RC time constant. At the time of switch on, the capacitor

gets charged, and it behaves as a full short circuit from the positive to the pin number 9. After

the capacitor gets fully charged the current stops flowing and pin number 9 goes low which is

pulled down by a 10k resistor to the ground. This arrangement of reset at pin 9 going high

initially and then to logic 0 i.e., low helps the program execution to start from the beginning.

In absence of this the program execution could have taken place arbitrarily anywhere from

the program cycle. A pushbutton switch is connected across the capacitor so that at any given

time as desired it can be pressed such that it discharges the capacitor and while released the

capacitor starts charging again and then pin number 9 goes to high and then back to low, to

enable the program execution from the beginning. This operation of high to low of the reset

pin takes place in fraction of a second as decided by the time constant R and C.

Page 35: final project report_full edit

35

For example: A 10µF capacitor and a 10kΩ resistor would render a 100ms time to pin

number 9 from logic high to low, there after the pin number 9 remains low.

External Access (EA):

Pin no 31 of 40 pin 8051 microcontroller termed as EA¯ is required to be connected to

5V for accessing the program form the on-chip program memory. If it is connected to ground

then the controller accesses the program from external memory. However as we are using the

internal memory it is always connected to +5V.

L293D MOTOR DRIVER

L293D has 2 set of arrangements where one set has input 1, input 2, output 1

and output 2 and other set has input 3, input 4, output 3 and output 4, according to

block diagram if pin no 2 & 7 are high then pin no 3 & 6 are also high.

If enable 1 and pin number 2 are high leaving pin number 7 as low then the

motor rotates in forward direction.

If enable 2 and pin number 10 are high leaving pin number 15 as low then the

motor rotates in forward direction.

If enable 1 and pin number 2 are low leaving pin number 7 as high then the

motor rotates in reverse direction.

If enable 2 and pin number 15 are high leaving pin number 10 as low then the

motor rotates in forward direction.

Page 36: final project report_full edit

36

FIG 5.1(a): L293D Circuit

5.2 OPERATION EXPLANATION

Connections:

1. The output of the power supply which is 5v is connected to the 40 pin of Microcontroller

and GND I connected to its 20th

pin.

2. Port 2.2, 2.3, 2.4 of Microcontroller are connected to pin number 9, 15, 10 of L293D i.e.,

Motor driver IC. Port 2.5, 2.6, 2.7 of Microcontroller are connected to pin number 7, 2, 1 of

Motor driver IC L293D.

3. Two motors M1 and M2 are connected to pin 3, 6 and 11, 14 of Motor driver IC L293D.

4. Port 3.0, 3.1, 3.2 of Microcontroller is connected to pin number 13, 12, and 11 of DTMF

MT8870. Port 3.3 of Microcontroller is connected to pin 10 of DTMF IC.

5. The output of the mobile earphone socket is connected to the pin 2 and 3 of the DTMF IC.

6. Crystal is connected to pin 7, 8 of the DTMF IC and pin 18, 19 of the Microcontroller.

7. Reset circuit is connected across 9, 31 pin of Microcontroller.

Page 37: final project report_full edit

37

Working:

DTMF DECODER

FIG 5.2: DTMF Decoder Circuit

After the call is answered by the mobile phone the tone command sent by the sender

is received at the ear phone socket which is fed to pin no 2 of DTMF decoder through

series resistor and capacitor. The project uses DTMF technology for decoding tone

commands by a DTMF decoder IC MT8870. This develops a 4 bit binary data

corresponding to the number related to the tone received at its pin 2 through a high

pass filter of 0.47 Microfarad and 1K resistor in series. The IC uses a crystal of 3.57

MHz for frequency reference such that input frequency is compared to develop digital

output. This 4 bit binary data is passed through an inverter for buffering purposes

before being connected to MC input at pin 3.1 to 3.3.The output from the

microcontroller drives the L293D for 2 motors as per the command to move forward,

backward, left, right, stop etc.

Page 38: final project report_full edit

38

Operation:

One mobile phone is used on the robotic vehicle with its audio output from the earphone

socket connected to pin 2 of DTMF IC in series with a high pass filter as noted above. The tip

and GND thus formed the input tone command to the DTMF decoder IC. So while a call is

established from a calling cell phone to an installed cell phone which is kept on auto answer

mode gets activated, as if the call is answered. Now any number by the sending cell phone is

pressed the corresponding tone is available at the receivers cell phone (which is connected to

the robot) thus forms an input tone to the DTMF decoder the output from which is fed to the

controller through inverter IC 7404. The program while executed makes the motor run

forward, backward, left, and right as per the command from the senders end. The commands

are 2 for forward, 8 for backward, 4 for left and 6 for right and 5 for stop. Thus the robot

operates as per the command given in the program.

Page 39: final project report_full edit

39

6. LIST OF MATERIALS

COMPONENT NAME QUANTITY Resistors 330R 1 10K 5 330K 1 100K 1 22K 1

Capacitors 470uF/35V 1 10uF/63V 2 33pF Ceramic 2 0.1uF (104) Ceramic 1 0.47uF (470nF) Polyester 1 22pF Ceramic 2

Integrated Circuits AT89S52 1 L293D 1 MT8870/HT9170 1 7404 1

IC Bases 40-PIN BASE 1 18-PIN BASE 1 16-PIN BASE 1 14-PIN BASE 1

DIODE IN4007 1

Miscellaneous CELL COVER 1 PENCIL CELL BATTERY (4 X 1.5V=6V) 4 CRYSTAL1 11.0592MHz 1 CRYSTAL2 3.57MHz 1 2 PIN PUSH BUTTON 1 MALE BURGE 2-PIN 3 MALE RELIMET 2-PIN 1 FEMALE RELEMENT 2-PIN ONE SIDE 4 MOBILE PHONE EARPHONE PIN 1 LED RED 1 VEHICLE BODY (INCLUDING 2 DC MOTORS) 1 PLAIN PCB 1 SCREW DRIVER 1 SOLDERING LED (50 gm) CONNECTING WIRES SCREW NUT SET 2 SPST SWITCH (ON/OFF) 1 CASTOR BALL 1 Z-Clamps 2 104PF 2

7. CODING

Algorithm

1. Start.

2. Assign integer variable h to Port 3 of the microcontroller.

Page 40: final project report_full edit

40

3. Use switch case as per the value of h.

4. For ‘2’ pressed Port 2=2B (Forward).

5. For ‘8’ pressed Port 2=35 (Backward).

6. For ‘4’ pressed Port 2=28 (Left).

7. For ‘6’ pressed Port 2=03 (Right).

8. For ‘5’ pressed Port 2=00 (Stop).

9. Stop

C Program

#include<mega61.h>

void main(void)

unsigned int h;

while(1)

h=PORT3; // binary input from DTMF IC

switch(h)

case 0x0D: // when 2 is pressed

PORT2=0x2B; //move forward

break;

case 0x07: // when 8 is pressed

Page 41: final project report_full edit

41

PORT2=0x35; // move backward

break;

case 0x0B: // when 4 is pressed

PORT2=0x28; // move left

break;

case 0x09: // when 6 is pressed

PORT2=0x03; // move right

break;

case 0x0A: // when 5 is pressed

PORT2=0x00; // stop

break;

8. HARDWARE TESTING

8.1 CONTINUITY TEST:

Page 42: final project report_full edit

42

In electronics, a continuity test is the checking of an electric circuit to see if current

flows (that it is in fact a complete circuit). A continuity test is performed by placing a small

voltage (wired in series with an LED or noise-producing component such as a piezoelectric

speaker) across the chosen path. If electron flow is inhibited by broken conductors, damaged

components, or excessive resistance, the circuit is "open".

This test is the performed just after the hardware soldering and configuration has been

completed. This test aims at finding any electrical open paths in the circuit after the soldering.

Many a times, the electrical continuity in the circuit is lost due to improper soldering, wrong

and rough handling of the PCB, improper usage of the soldering iron, component failures and

presence of bugs in the circuit diagram. We use a multi meter to perform this test. We keep

the multi meter in buzzer mode and connect the ground terminal of the multi meter to the

ground. We connect both the terminals across the path that needs to be checked. If there is

continuation then you will hear the beep sound.

8.2 POWER ON TEST:

This test is performed to check whether the voltage at different terminals is according

to the requirement or not. We take a multi meter and put it in voltage mode. First of all check

the voltage across the battery terminal whether it is fully charged or not, the battery used in

this project is 12V, so touch the ‘red terminal’ of battery with ‘red probe’ of multi meter and

touch ‘black terminal’ of battery with ‘black probe’ of multi meter, if 12V is being displayed

on multi meter screen then we can proceed for next steps.

Now that the power supply is available, no IC should be inserted in the base, first

apply power and check whether proper voltage is reaching at ‘vcc’ and ‘gnd’ pins of each IC

base or not. If proper voltages appear at the supply pins of IC bases then insert IC and check

the required output.

9. RESULTS

9.1 Voltage at Pins Without IC:

Page 43: final project report_full edit

43

9.2 Voltage at Pins With IC:

Page 44: final project report_full edit

44

9.3 Project Photo

Page 45: final project report_full edit

45

10. CONCLUSION

Page 46: final project report_full edit

46

Thus our aim to develop a GSM based robotic vehicle with movement in the desired

direction as per the command given is successful.

The hardware tests provided successful results and the vehicle was fully implemented.

This project defines the preliminary development of a vehicular robot which can be further

applied to manufacture war fighter vehicle, pick and place vehicle in industry or any other

applications involving distance sensors, camera, and remote device operation etc.

11. BIBLIOGRAPHY

Page 47: final project report_full edit

47

TEXT BOOKS REFERED:

1. “The 8051 Microcontroller and Embedded systems” by Muhammad Ali Mazidi and Janice

Gillispie Mazidi , Pearson Education.

2. ATMEL 89S52 Data Sheets.

WEBSITES

www.atmel.com

www.beyondlogic.org

www.wikipedia.org

www.howstuffworks.com

www.alldatasheets.com