Tuesday, 14 July 2015

DTMF based wireless robot



Source Code for DTMF based wireless robot :

#include<avr/io.h>
#include<util/delay.h>
void main(void)
{
unsigned int k, h;
DDRA=0x00;

DDRD=0XFF;
while (1)
{
k =PINA;
//h=k & 0x0F;
switch (k)
{
case 0x20: //if I/P is 0x02
{
PORTD=0x89;//O/P 0x89 ie Forward
break;
}
case 0x80: //if I/P is 0x08
{
PORTD=0x86; //O/P 0x86 ie Backward
break;
}
case 0x40:
{
PORTD=0x85; // Left turn
break;
}
case 0x60:
{
PORTD=0x8A; // Right turn
break;
}
case 0x50:
{
PORTD=0x00; // Stop
break;
}
}
}
}

IDE Used : AVRStudio4

Compiler Used: AVR-GCC

Schematics of  DTMF based wireless robot




 Instead of switch, in actual project we will use DTMF module which will give four bit output which will be input for the microcontroller (ATMega16). And using these input we can drive motor using driver ic L293D.



Bill of materials:

ATMega16 with ic base
If you are using AT89S52 then use crystal anf pf capacitor else not required
          11.0592 MHz Xtal
          22pf cap - 2
because in ATMega16 we have option of using Internal calibrated RC Oscillator
9 v battery (HiWatt)
7805 voltage regulator
DTMF MODULE with 3.5 mm audio jack (male)
L293d ic with ic base
Dc geared motor 2
1 Chasis
2 Tyres
1 castor wheel
Perfboard/Zero PCB  (Silver coated big size)
Jumper wire for soldering
Solder Wire
Soldering Iron
Soldering iron stand
Lm 35 temp sensor
lm 358 with ic base

You can download Source code and proteus  simulation from https://drive.google.com/file/d/0B4Px6Drl6Zz_VGJxUVNyYWpfUms/view?usp=sharing


No comments:

Post a Comment