GSM CONTROLLED ROBOTIC VEHICLE

42
1 GSM controlled robotic vehicle RCET, Akkikavu AEI Dept. CHAPTER 1 INTRODUCTION GSM (Global System for Mobile Communications) is a digital mobile telephony system that is widely used in Europe and other parts of the world. GSM uses a variation of time division multiple access (TDMA) and is the most widely used of the three digital wireless telephony technologies (TDMA, GSM, and CDMA). Robot is a machine capable of carrying out a complex series of actions automatically, especially one programmable by a computer. In the 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 called ‘Dual Tone Multiple frequency’ (DTMF) tone. The robot receives these tones with help of phone stacked in the robot. The received tone is processed by the microcontroller with the help of DTMF decoder IC HT9170 .these IC sends a signals to the motor driver IC L293d which drives the motor forward, reverse…etc. The applications of the GSM controlled robots are: 1) Scientific Remote control vehicles have various scientific uses including hazardous environments, working in the Deep Ocean, and space exploration. The majority of the probes to other planets in our solar system have been remote control vehicles, although some of the more recent ones were partially autonomous. The sophistication of these devices has fuelled greater debate on the need for manned spaceflight and exploration. The voyager I space craft of any kind to leave the solar system. The mars explorers spirit and opportunity have provided continuous data about the surface of Mars since January 3, 2004.

Transcript of GSM CONTROLLED ROBOTIC VEHICLE

Page 1: GSM CONTROLLED ROBOTIC VEHICLE

1

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

CHAPTER 1

INTRODUCTION

GSM (Global System for Mobile Communications) is a digital mobile telephony

system that is widely used in Europe and other parts of the world. GSM uses a variation of

time division multiple access (TDMA) and is the most widely used of the three digital

wireless telephony technologies (TDMA, GSM, and CDMA).

Robot is a machine capable of carrying out a complex series of actions

automatically, especially one programmable by a computer. In the 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 called ‘Dual Tone Multiple frequency’ (DTMF) tone. The robot

receives these tones with help of phone stacked in the robot. The received tone is processed

by the microcontroller with the help of DTMF decoder IC HT9170 .these IC sends a signals

to the motor driver IC L293d which drives the motor forward, reverse…etc. The

applications of the GSM controlled robots are:

1) Scientific

Remote control vehicles have various scientific uses including hazardous

environments, working in the Deep Ocean, and space exploration. The majority of the

probes to other planets in our solar system have been remote control vehicles, although

some of the more recent ones were partially autonomous. The sophistication of these

devices has fuelled greater debate on the need for manned spaceflight and exploration. The

voyager I space craft of any kind to leave the solar system. The mars explorers spirit and

opportunity have provided continuous data about the surface of Mars since January 3, 2004.

Page 2: GSM CONTROLLED ROBOTIC VEHICLE

2

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

2) Military and Law Enforcement

Military usage of remotely controlled military vehicles dates back to the first half

of the 20th century. Soviet Red Army used remotely controlled Tele tanks during 1930’s

in the winter war and early stage of World War II. There were also remotely controlled

planes in the Red army. Remote control vehicles are used in law enforcement and military

engagements for some of the reasons. The exposure to hazards are mitigated to the person

who operates the vehicle from a location of relative safety. Remote controlled vehicles are

used by many police department bomb squads to defuse or detonate explosives. See Dragon

Runner, Military robot.

Unmanned Aerial Vehicles (UAV’s) have undergone a dramatic evolution in

capability in the past decade. Early UAV’s were capable of reconnaissance missions alone

and then only with a limited range. Current UAV’s can hover around possible targets until

they are positively identified before releasing their payload of weaponry. Backpack sized

UAV’s will provide ground troops with over the horizon surveillance capabilities.

3) Search and Rescue

UAV’s will likely play an increased role in search and rescue in the United

States. This was demonstrated by the successful use of UAV’s during the 2008 hurricanes

that struck Louisiana and Texas.

4) Recreation and Hobby

Small scale remote control vehicles have long been popular among hobbyists.

These remote controlled vehicles span a wide range in terms of price and sophistication.

There are many types of radio controlled vehicles. These include on-road cars, off-road,

off-road trucks, boats, airplanes, and even helicopters. The ‘robots’ now popular in

television shows such as Robot wars, are a recent extension of this hobby (these vehicles

do not meet the classical definition of a robot; they are remotely controlled by a human).

Radio-controlled submarine also exist.

Page 3: GSM CONTROLLED ROBOTIC VEHICLE

3

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

1.1 OBJECTIVE

The main objectives of this project is to construct a robot that has ability to be

controlled using the keypad of mobile phone through the GSM network.

Also the objective of our project is to carry a load from source to destination

without human resource.

1.2 PROJECT WORKING PRINCIPLE

DTMF based robotic vehicle circuit consists of DTMF decoder IC, driver IC L293D IC

and motors. DTMF decoder IC used is HT9170B. It has 18 pins. Tone from DTMF encoder

is given to the DTMF decoder IC. The decoder IC [HT9170B] internally, consists of

operational amplifier whose output is given to pre filters to separate low and high

frequencies. Then it is passed to code detector circuit and it decodes the incoming tone into

4bits of binary data. This data at the output is directly given to the driver IC to drive the

two motors. These motors rotate according to the decoded output.

If the button pressed from mobile is ‘1’, it gives a decoded output of ‘0001’. Thus

motor connected to the first two pins will get 0 volts and second motor will have 5 volts to

one pin and 0 volts to the another pin. Thus second motor starts rotating and first motor is

off. So, robot moves in one direction either to left or right. If the robot is to rotate forward

or backward then the binary value should be either ‘0101’ or ‘1010’.These values indicate

that two motors rotates in the same direction i.e. either forward or backward. The following

table gives the low frequency, high frequency and binary output value of each button

pressed in the keypad.

1.3 SCOPE OF THE PROJECT

We may have seen so many land rover projects such as moon-walker and robot

vehicle. Most probably they are remote controlled (either IR or RF) or they may be

automatic guided vehicles (AGV). Our project is also remote controlled land rover but as

a remote one can use his cell phone. That means he can move the land rover by sending

different commands from his cell phone. Not only that, he can control it from anywhere in

Page 4: GSM CONTROLLED ROBOTIC VEHICLE

4

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

the world (of course where GSM/CDMA network is available).This concept is taken from

military application where such land rover works as Unmanned Guided Vehicle(UGV) for

spy operations, mine diffuser, bomb detector, search and rescue vehicle in case of

emergency situations etc. They can be utilized in lot more applications where distant

control is only possible.

TABLE 1.1 DTMF frequency and corresponding keys binary codes

Page 5: GSM CONTROLLED ROBOTIC VEHICLE

5

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

CHAPTER 2

BLOCK DIAGRAM

The block diagram consists of a DTMF generator which is the mobile phone

used as remote, DTMF receiver as another mobile phone, DTMF decoder as IC

MT8870, microcontroller as ATmega16, motor driver as IC L293D and two geared

motors

Fig.2.1 Block diagram of GSM robot

As shown in block diagram (2.1), first block is the cell phone. So, it acts as a DTMF

generator with tone depending upon the key pressed. DTMF decoder ie. IC HT9170B

decodes the received tones and gives binary equivalent of it to the AT mega

microcontroller. The controller is programmed such that appropriate output is given to the

motor driver IC L293D which drives the two DC motors connected to it. The concept used

Page 6: GSM CONTROLLED ROBOTIC VEHICLE

6

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

for driving is ‘Differential Drive’. So ultimately the two motors get rotated according to

the key pressed on the keypad of the cell.

2.1 Dual-Tone Multi-Frequency (DTMF)

Dual-tone multi-frequency (DTMF) signaling is used for telecommunication

signaling over analog telephone line in the voice-frequency band between telephone

handsets and other c o m m u n i c a t i o n s devices and the switching C e n t r e . The

version of DTMF used for telephone tone dialing is known by the trademarked term

Touch-Tone (cancelled March 13, 1984), and is standardized by ITU-T

Recommendation Q.23. It is also known in the UK as MF4. Other multi-frequency

systems are used f o r signaling internal to the telephone network.

As a method of in-band signaling, DTMF tones were also used by cable

television broadcasters to indicate the start and stop times of local commercial

insertion points during station breaks for the benefit of cable companies. Until better

out-of-band signaling equipment was developed in the 1990s, fast,

unacknowledged, and loud DTMF tone sequences could be heard during the commercial

breaks of cable channels in the United States and elsewhere s SD1400X, known as

’Fritz X,’ both air-launched, primarily against ships at sea.

2.2 Telephone Keypad

The contemporary keypad is laid out in a 3x4 grid, although

the original DTMF keypad had an additional column for four now-defunct menu

selector k e y s . When used to dial a telephone number, pressing a single key will

produce a pitch consisting of two simultaneous pure tone sinusoidal frequencies. The

row in which the key appears determines the low frequency, and the column

determines the high frequency. For example, pressing the !1! key will result in a

sound composed of both a 697 and a 1209 hertz (Hz) tone. The original k e yp a d s

h a d levers i n s i d e , s o each button activated two contacts. The multiple tones are

the reason for calling the system multi frequency. These tones are then decoded by the

switching center to determine which key was pressed.

Page 7: GSM CONTROLLED ROBOTIC VEHICLE

7

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

Fig 2.2 A DTMF Telephone Keypad

Table 2.1 DTMF Keypad Frequencies (With Sound Clips)

1209 Hz 1336 Hz 1477 Hz 1633 Hz

697 Hz 1 2 3 A

770 Hz 4 5 6 B

852 Hz 7 8 9 C

941 Hz * 0 # D

Page 8: GSM CONTROLLED ROBOTIC VEHICLE

8

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

Table 2.2 DTMF Event Frequencies

Tones #, *, A, B, C and D

The engineers had envisioned phones being used to access computers and surveyed

a number of companies to see what they would need for this role. This led to the addition

of the number sign (#, sometimes called !octothorpe! in this context) and asterisk or ‘star’

(*) keys as well as a group of keys for menu selection: A, B, C and D. In the end, the

lettered keys were dropped from most phones, and it was many years before these keys

became widely used for vertical service codes such as *67 in the United States and Canada

to suppress caller id.

The US Military also used the letters, relabeled in their now defunct Autovon Phone

system. Here they were used before dialing the phone in order to give some call priority,

cutting in over existing calls if needed be. The levels of priority available were Flash

override (A), Flash (B), Immediate(C), and Priority (D), with flash Override being the

highest priority.

2.2.1 DTMF Generator and Receiver

Here we use mobile phones as DTMF generator and receiver. One of the phone is

used as a DTMF generator which acts as a remote to control the vehicle. The other phone

Event Low Freq. High Freq.

Busy Signal 480 Hz 620 Hz

Dial Tone 350 Hz 440 Hz

Ring back Tone(US) 440 Hz 480 Hz

Page 9: GSM CONTROLLED ROBOTIC VEHICLE

9

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

acts as a receiver which receives the DTMF tone and hand over it to the DTMF decoder

IC.

Fig. 2.3 Frequencies Corresponding to the Keys in a Telephone Keypad

The figure shows the dial pad and the corresponding frequencies associated with

each key. Whenever a key is pressed two frequencies are generated. The resultant tone is

the combination of the two frequencies generated. The frequency varies from key to key

corresponding to the row and column in which the key is present. Each column and row

has a frequency associated to it.

2.3 DTMF Tone

These DTMF technique outputs distinct representation of 16 common

alphanumeric characters (0-9, A-D,*, #) on the telephone as shown in the Fig.

2.3. The lowest frequency used is 697 Hz and the highest frequency used is 1633

Hz. The DTMF keypad is arranged such that each row will have it’s own unique

tone frequency. Above is a representation of the typical DTMF keypad and the

associated row/column frequencies. By pressing a key, for example 5, will

generate a dual tone consisting of 770 Hz for the low group and 1336 Hz for the

high group.

Page 10: GSM CONTROLLED ROBOTIC VEHICLE

10

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

2.4 Motor Driver

Fig 2.4- Motor driver

L293D is a quad push-pull driver designed to provide bidirectional drive current up

to 1A or 600mA per channel. All channels are TTL-compatible logic inputs, and each

output is a complete totem-pole drive circuit with Darlington transistor sink and pseudo-

Darlington source.

The main function of L293D in this system is to control the current that is delivered

to vibration motor using an enable pin that is connected directly to PIC. Vibration motor

indicates how much the detected body in range is closer to blind person, and when the

vibrator works, it is indicated that there is an obstacle present in the sensing area.

2.5 Motor

Fig 2.5- Motor

A DC motor is a mechanically commutated electric motor powered from direct

current (DC). The stator is stationary in space by definition and therefore so is its current.

The current in the rotor is switched by the commutator to also be stationary in space. This

Page 11: GSM CONTROLLED ROBOTIC VEHICLE

11

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

is how the relative angle between the stator and rotor magnetic flux is maintained near 90

degrees, which generates the maximum torque.

DC motors have a rotating armature winding but non-rotating armature magnetic

field and a static field winding or permanent magnet. Different connections of the field and

armature winding provide different inherent speed/torque regulation characteristics. The

speed of a DC motor can be controlled by changing the voltage applied to the armature or

by changing the field current. The introduction of variable resistance in the armature circuit

or field circuit allowed speed control. Modern DC motors are often controlled by power

electronics systems called DC drives.

The introduction of DC motors to run machinery eliminated the need for local steam

or internal combustion engines, and line shaft drive systems. DC motors can operate

directly from rechargeable batteries, providing the motive power for the first electric

vehicles. Today DC motors are still found in applications as small as toys and disk drives,

or in large sizes to operate steel rolling mills and paper machines.

The speed of a DC motor is directly proportional to the supply voltage, so if we

reduce the supply voltage from 12 Volts to 6 Volts, the motor will run at half the speed.

The speed controller works by varying the average voltage sent to the motor. It could do

this by simply adjusting the voltage sent to the motor, but this is quite inefficient to do. A

better way is to switch the motor's supply on and off very quickly. If the switching is fast

enough, the motor doesn't notice it, it only notices the average effect.

2.5.1 OPERATION

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. As you are well aware of from playing with

magnets as a kid, opposite (North and South) polarities attract, while like polarities (North

and North, South and South) repel. The internal configuration of a DC motor is designed

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

magnetic field to generate rotational motion.

Page 12: GSM CONTROLLED ROBOTIC VEHICLE

12

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet

or winding with a "North" polarization, while green represents a magnet or winding with a

"South" polarization).

Fig 2.6 working of motor

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator,

commutator, field magnet(s), and brushes. In most common DC motors (and all

that Beamers will see), the external magnetic field is produced by high-strength permanent

magnets1. The stator is the stationary part of the motor -- this includes the motor casing, as

well as two or more permanent magnet pole pieces. The rotor (together with the axle and

attached commutator) rotate with respect to the stator. The rotor consists of windings

(generally on a core), the windings being electrically connected to the commutator. The

above diagram shows a common motor layout -- with the rotor inside the stator (field)

magnets.

The geometry of the brushes, commutator contacts, and rotor windings are such that when

power is applied, the polarities of the energized winding and the stator magnet(s) are

misaligned, and the rotor will rotate until it is almost aligned with the stator's field

magnets. As the rotor reaches alignment, the brushes move to the next commutator

contacts, and energize the next winding. Given our example two-pole motor, the rotation

reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's

magnetic field, driving it to continue rotating.

Page 13: GSM CONTROLLED ROBOTIC VEHICLE

13

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

2.5.2 PRINCIPLE

It is based on the principle that when a current-carrying conductor is placed in a

magnetic field, it experiences a mechanical force whose direction is given by Fleming's

Left-hand rule and whose magnitude is given by

Force, F = B I L newton

Where B is the magnetic field in weber/m2.

I is the current in amperes and

L is the length of the coil in meter.

The force, current and the magnetic field are all in different directions.If an Electric current

flows through two copper wires that are between the poles of a magnet, an upward force

will move one wire up and a downward force will move the other wire down.

In real life, though, DC motors will always have more than two poles (three is a very

common number). In particular, this avoids "dead spots" in the commutator. You can

imagine how with our example two-pole motor, if the rotor is exactly at the middle of its

rotation (perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile,

with a two-pole motor, there is a moment where the commutator shorts out the power

supply (i.e., both brushes touch both commutator contacts simultaneously). This would be

bad for the power supply, waste energy, and damage motor components as well. Yet

another disadvantage of such a simple motor is that it would exhibit a high amount

of torque "ripple" (the amount of torque it could produce is cyclic with the position of the

rotor).

Page 14: GSM CONTROLLED ROBOTIC VEHICLE

14

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

( a ) ( b )

(c) (d)

Fig 2.7 (a) Force in DC motor, (b) Magnetic field in DC Motor

(c) Torque in DC motor, (d) Current Flow in DC motor

The loop can be made to spin by fixing a half circle of copper which is known

as commutator, to each end of the loop. Current is passed into and out of the loop by brushes

that press onto the strips. The brushes do not go round so the wire do not get twisted.

Page 15: GSM CONTROLLED ROBOTIC VEHICLE

15

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

CHAPTER 3

PROJECT HARDWARE

MICROCONTROLLER (ATMEGA16)

3.1 DESCRIPTION

• High-performance, Low-power AVR® 8-bit Microcontroller

• Advanced RISC Architecture

– 131 Powerful Instructions 131 Powerful Instructions

– Most Single Most Single-clock Cycle Execution clock Cycle Execution

– 32 x 8 General Purpose Working Registers

– Fully Static Operation

– Up to 16 MIPS Throughput at 16 MHz – On-chip 2-cycle Multiplier

• High Endurance Non-volatile Memory segments

– 16K Bytes of In-System Self-programmable Flash program memory

– 512 Bytes EEPROM

– 1K Byte Internal SRAM

– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

– Data retention: 20 years at 85°C/100 t 25 C/100 years at 25°C(1)

– Optional Boot Code Section with Independent Lock Bits

In-System Programming by On-chip Boot Program True Read-While-Write

Operation

– Programming Lock for Software Security

Page 16: GSM CONTROLLED ROBOTIC VEHICLE

16

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

Fig 3.1- ATMEGA 16

3.2 ARCHITECTURE

Fig 3.2- ATMEGA 16 architecture

Page 17: GSM CONTROLLED ROBOTIC VEHICLE

17

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

The AVR core combines a rich instruction set with 32general purpose working

range. All the 32 registers are directly connected to the 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 toten times faster than

conventional CISC microcontrollers. The device is manufactured using Atmel’s high

density nonvolatile memory technology. The on chip ISP flash allows the program memory

to be reprogrammed in system through an SPI serial interface, by a conventional

nonvolatile memory programmer, or by an on chip boot program running on the AVR core.

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 AT mega 16 is a

powerful microcontroller that providing a highly flexible and cost effective solution to

many embedded control applications.

The AT mega 16 AVR is supported with a full suite of program and system

development tools including: c compilers, macro assemblers, program debugger, in circuit

emulator, and evaluation kits.

Fig 3.3- ATMEGA16 pin diagram

Page 18: GSM CONTROLLED ROBOTIC VEHICLE

18

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

TABLE 3.1 PIN DESCRIPTION OF ATMEGA 16

PIN1 : I/O , T0 ( Timer0 External Counter Input) ,XCK : USART External Clock I/O

PIN2 : I/O, T1 (Timer1 External Counter Input)

PIN3 : I/O, AIN0: Analog Comparator Positive Input , INT2: External Interrupt 2 Input

PIN4 : I/O, AIN1: Analog Comparator Negative Input, OC0 : Timer0 Output Compare

Match Output

PIN9 : Reset Pin, Active Low Reset

PIN10

: VCC=+5V

PIN11

: GND

PIN12

: XTAL2

PIN13

: XTAL1

PIN14

: (RXD) ,I/O PIN 0,USART Serial Communication Interface

PIN15

: (TXD) ,I/O Pin 1,USART Serial Communication Interface

PIN16

: (INT0),I/O Pin 2, External Interrupt INT0

PIN17

: (INT1),I/O Pin 3, External Interrupt INT1

PIN18

: (OC1B),I/O Pin 4, PWM Channel Outputs

PIN19

: (OC1A),I/O Pin 5, PWM Channel Outputs

Page 19: GSM CONTROLLED ROBOTIC VEHICLE

19

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

.

PIN20

: (ICP), I/O Pin 6, Timer/Counter1 Input Capture Pin

PIN21

: (OC2),I/O Pin 7,Timer/Counter2 Output Compare Match Output

PIN22

: (SCL),I/O Pin 0,TWI Interface

PIN23

: (SDA),I/O Pin 1,TWI Interface

PIN24-

PIN27

:

JTAG INTERFACE

PIN28

: (TOSC1),I/O Pin 6,Timer Oscillator Pin 1

PIN29

: (TOSC2),I/O Pin 7,Timer Oscillator Pin 2

PIN30

: AVCC (for ADC)

PIN31

: GND (for ADC)

PIN33

PIN40

PAx: I/O,ADCx (Where x is 7 – 0)

Page 20: GSM CONTROLLED ROBOTIC VEHICLE

20

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

CHAPTER 4

CIRCUIT DIAGRAM

Fig 4.1- Circuit diagram

4.1 Description of Circuit Diagram

The important components of this robot are a DTMF decoder, AT mega 16

microcontroller and motor driver. A 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 of pre-filtering.

Page 21: GSM CONTROLLED ROBOTIC VEHICLE

21

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

Table 4.1 Showing Binary Equivalent Output from the DTMF Decoder IC

KEY

PRESSED

Q4(PIN 14) Q3(PIN13) Q2(PIN 12) Q1(PIN 11)

1 LOW LOW LOW HIGH

2 LOW LOW HIGH LOW

3 LOW LOW HIGH HIGH

4 LOW HIGH LOW LOW

5 LOW HIGH LOW HIGH

6 LOW HIGH HIGH LOW

7 LOW HIGH HIGH HIGH

8

HIGH

LOW

LOW

LOW

9

HIGH

LOW

LOW

HIGH

Page 22: GSM CONTROLLED ROBOTIC VEHICLE

22

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

When the input signals are given at pins 1(IN+) & 2(IN-), a differential input

configuration is recognized to be effective, the correct 4-bit decode signal of the DTMF

tone is transferred to (pin11) through (pin14) outputs. The pin11 to pin14 of DTMF decoder

are connected to the pins of at mega 16(Pin 19, Pin 20, Pin 21, and Pin 22).

At mega 16 belongs to one among the advanced Microcontrollers from the

microchip technology. It is an 8 bit microcontroller, i.e. the data bus is of width 8 bit. It is

having a maximum clock frequency of 48 MHz. The Data RAM size is 2048 bytes. No. of

timers is 4.Here the input is given to port D specifically to Pin 19, Pin 20, Pin 21, Pin

22.The output from At mega 16 is obtained from Port B specifically from Pin 33, Pin 34,

Pin 35, Pin 35.The output is given as the input to the Motor Driver Pin 2, Pin7, Pin 10,

Pin15. Switch S1 is used for manual reset. The microcontroller output is not sufficient

to drive the dc motors, so current drivers are required for motor rotation.

The L293D is a quad, high-current, half-H driver designed to provide

bidirectional drive currents of up to 600mA at voltages from 4.5V to 36V. It makes it

easier to drive the dc motors. The L293D consists of four drivers. Pins IN1 through

IN4 (Pin 2, Pin 7, Pin 10, Pin 15) and OUT1 through OUT4 (Pin 3, Pin 6, Pin 11, Pin 14)

are the input and output pins, respectively of driver 1 through driver 4. Drivers 1

and 2, and driver 3 and 4 are enabled by enable pin 1(EN1) and pin 9 (EN2),

respectively. When enable input EN1 (pin1) is high, drivers 1 and 2 are enabled and

the outputs corresponding to their inputs are active. Similarly, enable input EN2

(pin9) enables drivers 3 and 4.

The motors are rotated according to the status of IN1 to IN4 pins of L293D

which in turn are depending on output pins of ATMEGA 16(Pin 33, Pin 34, Pin 35, Pin

36).

Page 23: GSM CONTROLLED ROBOTIC VEHICLE

23

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

4.2 HT9170 DTMF RECEIVER

The HT9170 is a Dual Tone Multi Frequency (DTMF) receiver integrating

a digital decoder and band split filter functions in one IC. The HT9170B and HT9170D

devices can enter the power down mode. The HT9170 series all use the digital counting

techniques to detect and decode the 16 kinds of DTMF input into a 4-bit code output.

Highly accurate filter circuits are implemented to divide tone signals into high frequency

and low frequency signal. A built-in dial tone rejection circuit is provided to eliminate the

need for pre-filtering. The features of DTMF receiver is given below.

Operating voltage: 2.5V~5.5V

Minimal external components

No external filter is required

Low standby current (on power down mode)

Excellent performance

Tristate data output for _C interface

3.58MHz crystal or ceramic resonator

1633Hz can be inhibited by the INH pin

Supply power-down mode

Inhibit mode operations

Digital counting techniques to detect and decode all the 16 DTMF tone pairs into a

4-bit code output

Supplied in DIP-18 package (HT9170B) and SOP-18 (HT9170D)

4.2.1 FUNCTIONAL DESCRIPTION

The HT9170 series consist of three band pass filters and two digital decoder

circuits to convert a tone DTMF signal into some signal output. It has a built-in amplifier

circuit to adjust the input signal. The pre-filter circuit may filter out the dialing tone of

350Hz to 400Hz signal, and then use the high-pass and low-pass filters to split into high

and low frequency signals.

Page 24: GSM CONTROLLED ROBOTIC VEHICLE

24

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

When the HT9170 receives an effective tone (DTMF) signal, the DV pin goes high and the

tone code (DTMF) signal is transferred to its internal circuitry for decoding. After setting,

the OE pin goes high, the DTMF decoder will appear on pins D0~D3.

Fig 4.2 pin diagram HT9170

Page 25: GSM CONTROLLED ROBOTIC VEHICLE

25

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

Table 4.2 pin description

Page 26: GSM CONTROLLED ROBOTIC VEHICLE

26

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

4.3 MOTOR DRIVER (L293D)

The L293D are quadruple high-current half-H drivers. It is designed to

provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. These

devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar

stepping motors, as well as other high-current/high-voltage loads in positive-supply

applications. All inputs are TTL compatible.

Each output is a complete totem-pole drive circuit, with a Darlington transistor

sink and a pseudo-Darlington source. Drivers are enabled in pairs, with drivers 1 and 2

enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN.

When an enable input is high, the associated drivers are enabled, and their outputs

are active and are in phase with their inputs. When the enable input is low, those drivers

are disabled, and their outputs are off and in the high-impedance state.

4.3.1 Pin Description

Fig 4.3- L293D pin diagram

Page 27: GSM CONTROLLED ROBOTIC VEHICLE

27

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

Supply voltage (Vss) is the Voltage at which we wish to drive the motor.

Generally we prefer 6V for dc motor and 6 to 12V for gear motor, depending upon the

rating of motor, logical supply voltage will decide what value of input voltage should be

considered as high or low. So if we consider logical supply voltage as +5V, then -0.3V to

1.5V will be considered as input low voltage and 2.3V to 5V be considered as input high

voltage.

Enable pin is used to enable or to make a channel active. Enable pin is also called

a chip inhibit pin. If enable pin is low, the output will be 0 always. If its high, output depend

on input. 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 is a typical Motor driver or Motor driver IC which allows DC motor to drive

on either direction. L293D is a 16-pin IC which can control a set of two DC motors

simultaneously in any direction. It means that you can control two DC motors with a single

L293D IC. Dual H-bridge Motor Driver integrated circuit. The L293D can drive small and

quite big motors as well.

4.3.2 Working of Motor Driver IC L293D

It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage

to be flown in either direction. As you know voltage need to change it’s direction for being

able to rotate the motor in clockwise or anticlockwise direction, Hence H-bridge IC are

ideal for driving a DC motor. In a single L293D chip there are two H-bridge circuit inside

the IC which can rotate two DC motors independently. Due to it’s size it is very much used

in robotic application for controlling DC motors. Given below is the pin diagram of a

L293D motor controller.

There are two Enable pins on L293D. Pin 1 and Pin 9, for being able to drive the

motor, the pin 1 and pin 9 need to be high. For driving the motor with left H-bridge you

need to enable pin 1 to high. And for right H-bridge you need to make the pin 9 to high. If

anyone of the either pin 1 or pin 9 goes low then the motor in the corresponding section

will suspend working. It’s like a switch.

Page 28: GSM CONTROLLED ROBOTIC VEHICLE

28

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

There are 4 input pins for this L293D, pin 2, pin 7 on the left and pin 10, pin 15 on

the right as shown in the pin diagram (Fig 4.4)

Left input pins will regulate the rotation of motor connected across left side and

right input for motor on the right hand side. The motors are rotated on the basis of the

inputs provided across the input pins as Logic 0 or Logic 1. In simple you need to provide

Logic 0 or Logic 1 across the input pins for rotating the motor.

Fig 4.4 Pin Diagram of Motor Driver ICL293D

4.3.3 L293D Logic Description

Let’s consider a motor connected on left side output pins (pin 3, pin 6). For rotating

the motor in clockwise direction the input pins has to be provided with Logic 1 and Logic

0.

Pin 2 = Logic 1, Pin 7 = Logic 0 – CLOCKWISE DIRECTION

Page 29: GSM CONTROLLED ROBOTIC VEHICLE

29

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

Pin 2 = Logic 0, Pin 7 = Logic 1 – ANTICLOCKWISE DIRECTION

Pin 2 = Logic,0 Pin 7 = Logic 0 – IDLE ( NO ROTATION ) (HIGH

IMPEDENCE STATE)

Pin 2 = Logic 1,Pin 7 = Logic 1 – IDLE (NO ROTATION) (HIGH

IMPEDENCESTATE)

In a very similar manner the motor can also operate across input pin 15, 10 for

motor on the right hand side.

4.3.4 Circuit Diagram for L293D Motor Driver IC Controller

Fig 4.5 Circuit Diagram for L293D Motor Driver IC Controller

This circuit simply shows the working of the motor driver IC L293D. Here we

consider only single H-bridge. For enabling one of the H-bridge we give high input to pin

1. Pin 8 and 16 are to be connected to Vcc. Pin 4, 5, 12 and 13 are to be grounded. To

control one motor, here input is given to pin 2 and 7. In this case the output given to motor

Page 30: GSM CONTROLLED ROBOTIC VEHICLE

30

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

is to be taken across pin 3 and 6.We can also take the output across pin 11 and 14 provided

the input has to be given at pin 10 and 15.

4.4 RESISTORS

The resistor’s function is to reduce the flow of electric current. Resistance value

is designed in units called the “ohms”. A 1000ohms resistor is typically shown a 1Kohmand

1000Kohm is written as 1Mohm. There are two classes of resistor namely fixed resistor

and variable resistor. They are also classified according to the material from which they

are made. The typical resistor is made of either carbon film or metal film. There are other

types as well.

But these are the most common used resistors. The electrical functionality of a

resistor is specified by its resistance: common commercial resistors are manufactured over

a range of more than nine orders of magnitude. When specifying that resistance in an

electronic design, the required precision of the resistance may require attention to

the manufacturing tolerance of the chosen resistor, according to its specific application.

Fig 4.6- Resistors

The temperature coefficient of the resistance may also be of concern in some

precision applications. Practical resistors are also specified as having a maximum power

rating which must exceed the anticipated power dissipation of that resistor in a particular

circuit: this is mainly of concern in power electronics applications.

Resistors with higher power ratings are physically larger and may require heat

sinks. In a high-voltage circuit, attention must sometimes be paid to the rated maximum

working voltage of the resistor. While there is no minimum working voltage for a given

Page 31: GSM CONTROLLED ROBOTIC VEHICLE

31

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

resistor, failure to account for a resistor's maximum rating may cause the resistor to

incinerate when current is run through it.

4.5 CAPACITORS

A capacitor (originally known as a condenser) is a passive two-terminal electrical

component used to store energy electro statically in an electric field. The forms of practical

capacitors vary widely, but all contain at least two electrical conductors (plates) separated

by a dielectric (i.e., insulator).

The conductors can be thin films of metal, aluminum foil or disks, etc. The 'non

conducting' dielectric acts to increase the capacitor's charge capacity. A dielectric can be

glass, ceramic, plastic film, air, paper, mica, etc. Unlike resistors, a capacitor does not

dissipate energy. Instead, a capacitor stores energy in the form of an electrostatic

field between its plates.

Fig 4.7- Capacitors

An ideal capacitor is characterized by a single constant value for its capacitance.

Capacitance is expressed as the ratio of the electric charge (Q) on each conductor to the

potential difference (V) between them. The SI unit of capacitance is the farad (F), which is

equal to one coulomb per volt (1 C/V).

Typical capacitance values range from about 1 pF (10−12 F) to about 1 mF (10−3 F).

Capacitors are used in electronic circuits for blocking direct current while

Page 32: GSM CONTROLLED ROBOTIC VEHICLE

32

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

allowing alternating current to pass. In analog filter networks, they smooth the output

of power supplies.

4.6 OSCILLATORS

An electronic oscillator is an electronic circuit that produces a

repetitive, oscillating electronic signal, often a sine wave or a square wave. Oscillators

convert direct current (DC) from a power supply to an alternating current signal.

They are widely used in many electronic devices. Common examples of signals

generated by oscillators include signals broadcast by radio and television transmitters,

clock signals that regulate computers and quartz clocks, and the sounds produced by

electronic beepers and video games.

Oscillators are often characterized by the frequency of their output signal:

An audio oscillator produces frequencies in the audio range, about 16 Hz to 20 kHz.

An RF oscillator produces signals in the radio frequency (RF) range of about 100 kHz

to 100 GHz.

A low-frequency oscillator (LFO) is an electronic oscillator that generates a frequency

below ≈20 Hz. This term is typically used in the field of audio synthesizers, to

distinguish it from an audio frequency oscillator.

Fig 4.8- 12MHz oscillator

Page 33: GSM CONTROLLED ROBOTIC VEHICLE

33

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

CHAPTER 5

FLOW CHART

Fig 5.1 Flow chart of the program to move the forward, reverse, left, right.

READ THE INPUT

FROM DTMF

DECODER

START

IF INPUT=2

IF INPUT=8

IF INPUT=4

IF INPUT=6

IF INPUT=5

M1=FWD

M2=FWD

CALL

APPROPRIATE

DELAY

M1=REV

M2=REV

M1=REV

M2=FWD

M1=FWD

M2=REV

M1=STOP

M2=STOP

CALL

APPROPRIATE

DELAY

CALL

APPROPRIATE

DELAY

CALL

APPROPRIATE

DELAY

CALL

APPROPRIATE

DELAY

Page 34: GSM CONTROLLED ROBOTIC VEHICLE

34

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

CHAPTER 6

PCB FABRICATION

6.1 INTRODUCTION

A printed circuit board (PCB) mechanically supports and electrically

connects electronic components using conductive tracks, pads and other

features etched from copper sheets laminated onto a non-conductive substrate. PCBs can

be single sided (one copper layer), double sided (two copper layers) or multi-layer.

Conductors on different layers are connected with plated-through holes called vias.

Advanced PCBs may contain components - capacitors, resistors or active devices -

embedded in the substrate. Printed circuit boards are used in all but the simplest electronic

products. Alternatives to PCBs include wire wrap and point-to-point construction. PCBs

require the additional design effort to lay out the circuit but manufacturing and assembly

can be automated.

Manufacturing circuits with PCBs is cheaper and faster than with other wiring

methods as component are mounted and wired with one single part. Furthermore, operator

wiring errors are eliminated. When the board has only copper connections and no

embedded components it is more correctly called a printed wiring board (PWB) or etched

wiring board.

Although more accurate, the term printed wiring board has fallen into disuse. A

PCB populated with electronic components is called a printed circuit

assembly (PCA), printed circuit board assembly or PCB assembly (PCBA).

The IPC preferred term for assembled boards is circuit card assembly (CCA), for

assembled backplanes it is backplane assemblies. The term PCB is used informally both

for bare and assembled boards.

Page 35: GSM CONTROLLED ROBOTIC VEHICLE

35

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

6.2 BASIC STEPS

Our Circuit Wizard PCB circuit board layout program is a snap to learn and use.

Laying out PCBs is easy even for first user. Given below are the steps done to fabricate a

design on PCB.

6.2.1 SELECT THE COMPONENTS

Bring your layout by adding the components. Select the parts from gallery

provided. Many components include digit-key numbers to make ordering easy.

6.2.2 POSITIONING COMPONENTS

Drag each component to the desired position n the board. The snap to grip features

make ordering much easy.

6.2.3 ADD THE TRACES

Now add the trace by clicking on the pin of a component and dragging the trace to

another pin. If you link your schematic file to the PCB, then the express PCB program

highlights the pins that should be wired together in blue.

6.2.4 EDIT THE LAYOUT

Making changes is simple such as copy, cut or paste. Rearrange the parts by dragging

them with the mouse. Traces always stays connected to the pins, even when you move

things around. You can set the properties of the items in your lay-out by double-clicking

on them.

6.2.5 DESIGN OF PCB

Designing for 2 or 4 layer boards using the express PCB is simple by inserting the

component footprints, then drag then into position. Next connect the pins by drawing the

traces.

Page 36: GSM CONTROLLED ROBOTIC VEHICLE

36

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

6.3 DRAWING A SCHEMATIC

Drawing a schematic with circuit wizard is simple as placing the components on

the page and wiring the pins together. The schematic then be linked to your PCB file so

that the PCB knows what needs to be connected together generally it is best to place parts

only to the top side of the board. First place all the components that need to be in specific

locations this include connectors, switches, LED holes, heat sinks etc. give careful thought

when placing components to minimize trace lengths.

Put parts next to each other that connect to each other. Doing a good job here will

make laying traces much easier. Arrange IC’s only in one or two orientation: up or down

and right or left. Align each IC so that pin1 is in same place for each orientation, usually

on the top or left side. Position polarized parts with the positive leads all have the same

orientation. Also use a square pad to make the positive leads of these components..

Page 37: GSM CONTROLLED ROBOTIC VEHICLE

37

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

CHAPTER 7

RESULTS AND DISCUSSIONS

7.1 PROBLEMS FACED

Although the concept & design of the project seemed perfect, there were

some problems faced while the actual implementation:

7.1.1. Selection of Mobile Phone:

Initially latest cell phone like Galaxy S3, iPhone 4S etc. were tried. But

they couldn’t give any output. Several cell phones were tested with their

respective Hands free cords.

Solution: The older version phone like Nokia C101 is found to be more

suitable for the purpose. Thus we have solved the problem of improper results

in the DTMF decoding section.

7.1.2. Selection of Microcontroller:

Initially we have designed the circuit diagram with the PIC. But we have

encountered some problems with getting proper output. We have checked every

aspects of the circuit and still didn’t get the output.

Solution: Due to time constraints we decided to switch to the

microcontroller which is Atmega16. Using Atmega16 is found to be easier than

using at PIC in case of testing and running the program.

Page 38: GSM CONTROLLED ROBOTIC VEHICLE

38

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

7.2 ADVANTAGES

1. Wireless control

2. Surveillance system

3. Vehicle navigation with the use of 3G technology

4. Takes in use of mobile technology which is almost available anywhere and can be

used cheaply.

5. This wireless device has no range restriction and can be controlled as far as network

of cell phone

6. Compared to transmitters of other technology which are very costly (eg: RC

transmitters),here an old version of mobile phone is used as a transmitter which is

comparatively economical.

7. It is very good to use as an explorer in areas where man is unable to reach due to

safety measures

7.3 DISADVANTAGES

1. Cell phone bill.

2. Mobile batteries drain out early so charging problem occurs.

3. Cost of project increases if cell phone cost is included.

4. Not flexible with all cell phones, older versions of cell phones can only be used

reliably. In other cases there arises the problem of not receiving the DTMF tone

properly.

5. The presence of service provider is inevitable for the working of this device.

6. In our project there is a limitation that anybody can operate this vehicle, but this

can be overcome in the future design by having security code.

7.4 FURTHER IMPROVEMENTS & FUTURE SCOPE

1. IR Sensors:

IR sensors can be used to automatically detect & avoid obstacles i f the

r o b o t g o e s beyond l i n e of sight. This avoids damage to the vehicle if we are

maneuvering it from a distant place.

Page 39: GSM CONTROLLED ROBOTIC VEHICLE

39

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

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 MT8870 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.

Page 40: GSM CONTROLLED ROBOTIC VEHICLE

40

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

CONCLUSION

Our sincere effort and hard work made the project into a successful one and we are

greatly indebted to our faculties and lab staffs. The system has worked in the manner as we

have expected. Although the design seems to be simple in nature, it has generated a lot of

self-confidence by creating such a mobile phone controlled device.

We are now witnessing a large production and usage of mobile phones. Their

applications adds a great momentum in our daily life. In nearby future almost many of the

applications will be based on mobile controlled ones. We consider our project Mobile

Phone Controlled Robotic Vehicle as a stepping stone to achieve such a thing. We also

believe that our project will be an inspiring one for the next batch to pursue their project

on mobile controlled application based device.

Page 41: GSM CONTROLLED ROBOTIC VEHICLE

41

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.

REFERENCES

1] Steven F.Barett, “Atmel AVR Microcontroller Primer” , Morgan & Claypol

Publishers 2008

2] http://www.alldatasheet.com/datasheet-pdf/pdf/78532/ATMEL/ATMEGA16.html

3] http://www.engineersgarage.com

4] http://m.instructables.com

5] http://www.rakeshmondal.in

6] http://www.freedatasheets.com

Page 42: GSM CONTROLLED ROBOTIC VEHICLE

42

GSM controlled robotic vehicle

RCET, Akkikavu AEI Dept.