Professional Documents
Culture Documents
OperatedLandRover
Raghavendra,Rahul
www.raghu.co.nr
raghavendraprasadp2004@vit.ac.in
obotics is an interesting field where every engineer can showcase his creative and technical
skills.Pleasingaspectofroboticsisthatarobotcanbemadeindigenouslybyanyone.Inthis
competitiveworldthereisneedforeveryenthusiastic,fromamateurtoprofessional,tomakea
simplerobothavinginnovatedapplicationsandwithrobustcontrol.
Mobilephonestodaybecameanessentialentityforoneandallandso,foranymobilebasedapplication
there is great reception. In this scenario making a mobile phone operated land rover is a good idea.
Conventionally wireless controlled robots utilize RF circuits, which had limitations like limited range,
limited frequency ranges and controls. But a mobile phone controlled robot can hold up these
limitations.Ithasarobustcontrol,unlimitedrange (coverageareaoftheserviceprovider),nofearof
interferingwithothercontrollersandwecanhaveasmuchas12controls.
Although the appearance and capabilities of robots vary vastly, all robots share the features of a
mechanical,movablestructureundersomeformofcontrol.Thiscontrolofrobotinvolvesthreedistinct
phases perception, processing and action. In common the preceptors are sensors mounted on the
robot,processingisdonebyonboardmicrocontrollerorprocessorandtask(action)isperformedusing
motorsorwithsomeotheractuators.
ProjectOverview
Inthepresentprojecttherobotiscontrolledbyamobilephonewhichmakesacalltothemobilephone
attachedtotherobot.Inthecourseofacallifanybuttonispressedatonecorrespondingtothebutton
pressed is heard at the other end of the call. This tone is called DTMF tone. The robot perceives this
DTMFtonewiththehelpofaphonestackedintherobot.Theprocessingofthereceivedtoneisdoneby
Atmega 32 microcontroller with the help of DTMF decoder, HT9170. The decoder decodes the DTMF
tone in to its equivalent binary digit and this binary number is sent to the microcontroller. The
microcontrollerispreprogrammedtotakeadecisionforanygiveninput.Themicrocontrolleroutputsits
decisiontomotordriverstodrivethemotorsinordertohaveforwardorbackwardmotionoraturn.
Anymobilewhichmakesacalltothemobilephonestackedintherobotwillactasremote.So,thisisa
simpleroboticprojectwhichevendoesnotrequiretheconstructionofreceiverandtransmitterkits,but
hasaninnovatedapplicationofcellphoneandrobustcontrol.
Dualtone multifrequency (DTMF) signaling is used for telephone signaling over the line in the voice
frequency band to the call switching center. The version of DTMF used for telephone tone dialing is
known by the trademarked term TouchTone. DTMF assigns a specific frequency (consisting of two
separatetones)toeachkeysothatitcaneasilybeidentifiedbyamicroprocessor.Thesignalgenerated
byaDTMFencoderisadirectalgebraicsummation,inrealtime,oftheamplitudesoftwosine(cosine)
wavesofdifferentfrequencies,i.e.pressing'5'willsendatonemadebyadding1336Hzand770Hzto
theotherendoftheline.
InDTMFsystemthetonesandassignmentsareasfollows:
frequencies
1209Hz
1336Hz
1477Hz
1633Hz
697Hz
770Hz
852Hz
941Hz
1
4
7
*
2
5
8
0
3
6
9
#
A
B
C
D
CircuitDescription
Figure1showstheblockdiagramofthemobileoperatedlandrover.Theimportantcomponentsofthis
projectareDTMFdecoder,Microcontrolleranddriver.
Robot
Headset
Mobileusedas
Remote
Motordriver
HT9170
DTMF
decoder
MICROCONTROLLER
ATmega32
L
2
9
3
D
Left
motor
Right
motor
Figure1,Blockdiagram
TheHT9170seriesareDualToneMultiFrequencyreceivers(DTMFdecoders).All
typesoftheHT9170seriesusedigitalcountingtechniquestodetectanddecode
allthe16DTMFtonepairsintoa4bitcodeoutput.Abuiltindialtonerejection
circuit is provided to eliminate the need for prefiltering. When input signals
givenatVP(1)andVN(2)pinsarerecognizedtobeeffective,DV(15)becomes
high,andthecorrect4bitcodeofthetone(DTMF)istransferredtotheoutput
pins,D0(11)D3(14).Figure2showstheICspinassignment.Figure3showsthe
Figure2,PinAssignment
DTMFdataoutputtableofHT9170series.
The microcontroller output is not sufficient to drive the DC motors, a highvoltage and high current
drivers are required. The L293D is a quadruple high current half H driver designed to provide
bidirectionaldrivecurrentsofupto600mAatvoltagesfrom4.5Vto36V.Itwillbecomeeasiertodrive
dcmotorswithsuchdrivers.Refertothelogicaldiagramandthefunctionaltableofthedrivershown
below. Drivers are enabled in pairs with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 are
enabledby3,4EN.Whenanenableinputishigh,theassociateddriversareenabled,theiroutputsare
active and in phase with their inputs. External highspeed output clamp diodes should be used for
inductivetransientsuppression.
Figure3DTMFDataOutputTable
Figure4LogicaldiagramofL293D
Figure5 FunctionalTableofL293D
MicrocontrollerusedinthisprojectisATmega32.ItisalowpowerCMOS8bitAVRmicrocontrollerwith
32K bytes in system programmable Flash. It has EEPROM of 1024 bytes, 8 channel 10 bit ADC, 32
programmableI/Olines,Speedgradesof016MHzitisbasedontheAVRenhancedRISCarchitecture.
ThecompilerusedforprojectisICCAVRcompiler.Thisisacrosscompileranditstrialversioncanbe
downloadedfromtheImagecraftcompilerwebsite.Compilationandburningofthecodewillbeeasier
foramateurswiththissoftware.ThecircuitforprogrammingthemicrocontrollerandtheISPcablefor
parallelportisshownbelow.
Figure6Circuitformicrocontrollerprogramming
Figure7ISPcableforparallelport
SoftwareDescription
Withefficientsoftware,eveniftherearelimitedcontrols,wecanhaveanewcontrolwithcombination
oftwoormoreavailablecontrols.ThecrosscompilerusedinthisprojectsupportsCprogramming.The
Ccodeoftheprojectisgivenbelow.TheCprogramcodeiscrosscompiledintohexcodeandburnedin
tothemicrocontrollerusingtheparallelportISP.
Working
Theuserinordertocontroltherobotshouldmakeacalltothecellphoneattachedintherobot,from
anyphone,whichcansendDTMFtunesonpressingthenumericbuttons.Thecellphoneintherobot
will be kept in auto answer mode. So, after a ring the cell phone accepts the call. Now the user may
pressanybuttononhis mobile.The DTMF tones thusproducedarereceivedbythecell phonein the
robot.Thesetonesarefedtothecircuitbyheadsetofthecellphone.HT9170decodesthereceived
tone and sends equivalent binary number to the micro controller. According to the program in the
microcontroller,therobotstartsmoving.
Asshowninthecircuit,theinputtothecircuitfromtherobotscellphoneisgiventhroughheadsetat
the2nd&3rdpinsofHT9170.ThedecodeddigitaldatawillbegivenoutbytheHT9170at11,12,13&14
pins. These digits are negated using 4 not gates of a 7404 HEX INVERTER. This inverted input will be
given to the port A of micro controller at 37, 38, 39 and 40 pins which are PA3, PA2, PA1 and PA0
respectively.ThemicrocontrollerisprogrammedtogiveoutputatportD,tocontrolthemotordriver.
Asexplainedpreviously,themotordriverL293DcandriveaDCmotorwithanenableandtwocontrol
inputs.So,inputsat1A(2),2A(7)andenableat1,2EN(1)candriveaDCmotorconnectedat1Y(3)and
2Y(6).ThePD0(14),PD1(15)andPD7(21)pinsofportDofmicrocontrollerareconnectedto1A,2A
and1,2ENpinsrespectively.So,with1,2ENpinenabledandif1A,2Apinsareprovidedwith1,0asinput
respectively,themotorrotatesinadirectionand0,1inputmakesthemotortoruninviceversa.And
theinput1,1causeselectricalbrake.Themicrocontrollerisprogrammedinsuchawaythatwhenthe
user presses (for ex.) 2 button, both the drivers will be activated to make their motors to make a
forwardmotion.Adetailedtableisgivenbelow,delineatingeverystepindatatransferwhenadigitis
pressed.
No.pressed
byuser
2
O/pofHT9170
DTMFdecoder
I/ptothe
microcontroller
0x02
00000010
0x04
00000100
0xFD
11111101
o/pfrom
microcontroller
0x09
00001001
ActionPerformed
0x05
00000101
Leftturn
Rightmotorforwarded
Leftmotorbackwarded
Rightturn
Rightmotorbackwarded
Leftmotorforwarded
Backwardmotion
0x06
00000110
0XFB
11111011
0XF9
11111001
0x08
00001000
0XF7
11110111
0x06
00000110
0x05
00000101
0XFA
11111010
0x00
00000000
0x0A
00001010
Forwardmotion
Brake
Figure8Detaileddataofeverystep
Applicationdevelopment
The generic purpose land rover delineated in this project can be further improved to have specific
purposes. For a land rover we need to have 4 controls, to make it roam around. The remaining 8
controls can be configured for other purposes, by some modifications in the software code of
microcontroller.
Letsnowupgradeourlandrovertoasumorobot,whichhastofightordefenditselfinagivenarena.
Thebasicmovementofforward,backward,turnrightandturnleftcanbeassignedto2,8,4and6.For5
wecanhaveabreak.Nowweshouldaddsomeweapontomaketherobotcapableofattacking.Lets
take some long wooden ruler and a dc motor. A hole is made at the center of wooden ruler and is
pivotedtightlytotheaxleofmotor,suchthattheaxlewillbecomeperpendiculartothesurfaceofruler.
Withthisarrangementtherulerwillrotatealongaverticalaxispassingthroughitscenter,sothatitcan
attackanyrobotcomingwithinthisarea.Anadditionalmotordrivershouldbeemployedtodrivethis
motor.Andnowweshouldengagetwomorekeys(*,#)tocontroltherotationofthisruler.Forthiswe
needtoprogramthemicrocontrollertodrivethemotorsinonedirectionif*ispressedonceandstop
therotationifthesame*ispressedagain;if#ispressedthemotorshoulddriveinotherdirectionand
shouldbestoppedifpressedagain.
Inthisfashiononecaninnovativethelandroverinanywaytheapplicationdemands.Wecanaddsome
ball holding mechanism to make a ball picking and dropping robot. If we add some ball pushing
mechanism,thenthelandroverwillbecomeasoccerrobot.Likethiswecangoonimprovingtheland
roverfordifferentapplications.
MechanicalConstruction
For construction of any robot, the important mechanical constraint is the number of motors we are
goingtousing.Onecanhaveeithertwowheeldriveorafourwheeldrive.Fourwheeldriveeventhough
is complex than two wheel drive will provide more torque and good control. Two wheel drive is very
easytoconstruct.
Topandbottomviewsofalandrover,fourwheeldriven,isshowninthefigurefIg10.Thechassisused
inthatmodelisasheetmadeupofparaxandisofsize9x20cm.Motorsarefixedtothebottomofthis
sheetandcircuitisplacedabovethissheetanditisaffixedfirmly.Acellphoneisalsoplacedoverthe
sheetasshowninthefigure.
Figure10topviewoftherover
Inthefourwheeldrivesystemthetwomotorsinasidearecontrolledparallel.SoasingleL293Ddriver
IC can drive the rover. But in two wheel drive the pair of motors on a side is replaced with a single
motor. Some supporting wheels like castor wheels are used to support the robot in two wheel drive
mechanism. A two wheel driven land rover is displayed in the figure 10, 11. For this robot beads are
affixedwithglue,willactassupportwheels.
Figure12.frontviewofthechassisandalandrover.
Figure11.landroverwitha2wheeldrive
Thecircuit,whichisusedintheproject,isshownbelow.Aschematicofthecircuitisalsoshown,to
haveaclearidea.
I/pfromheadsetto
decoder
HT9170,DTMFdecoder
IC7404hexinverter
Atmega32,microcontroller
L293D,motordriver
Inputtomotorfromdriver.
i/pfromheadset
Figure13.Theentireschematicofthecircuit
CProgramcode
#include<iom32v.h>
#include<macros.h>
void delay(unsigned int i)
{unsigned int j;
while(i--)
for(j=0;j<=1000;j++);
}
void main()
{unsigned int k,h;
DDRA=0x00;
DDRD=0xFF;
DDRB=0xFF;
while(1)
{k =~PINA;
h=k & 0x0F;
PORTB=h;
switch(h)
{case 0x02: {PORTD=0x09; // if the i/p is 0x02, then give
break;
// the o/p 0x09 i.e. to move forward
}
case 0x08: {PORTD=0x06;
break;
}
case 0x04: {PORTD=0x05;
break;
}
case 0x06: {PORTD=0x0A;
break;
}
case 0x05: {PORTD=0x00;
break;
}
}
}
}