Our mobile keypad generate a DTMF (dual tone multi frequency) signal. These dual tone multi frequencies can be transferred via headphone to the microcontroller with the help of DTMF decoder IC(HT9170). This IC decode the DTMF signal into 4-bit binary data which can be further processed by microcontroller.
This project can be made wireless using two mobiles. Just connect the a mobile on robot using headphone and make a call on the mobile on the robot, receive the call once and operate the robot wirelessly with infinite range.
This DTMF decoder IC decodes the DTMF signal into 4-bit binary data which can be further processed by microcontroller for making decisions for motors and LCD.
1. Pin 15(DV data valid): The data valid pin is become high when the dtmf decoder receive a valid data or this pin hold's the 5v when the key is pressed.
2. Pin 10(OE output enable): This pin is use to enable the output when this pin is high the data pin are active and the decoded output is sent to the decoded pin.
3. Pin 11-14(D0-D3 data pins): These are the data pins which makes the 4 bit data after pressing a key on the mobile such as 0001 for pressing the key 1 and other are shown into the picture shown.
4. Pin X1 or X2: These pin's are use for providing the oscillation to the ic basically a xtal of 3.579 MHz is used here. for more details download the HT9170 datasheet..
Motor driver circuit :- The IC-l293d is well known as motor driver this is 12v motor driver we use the motor driver IC because our micro-controller is work on 5v and the motor have different operating voltage. So to meet with these parameter we use these driver IC there are so many other IC available for different configuration.
LCD Interfacing :-
We interface the The lcd here for showing that what operation is performed on actuators. Know about lcd interfacing click here
8051 :-
Horn :-
We also connect a horn(speaker) here for make the feeling like a car.
Headphone :-
Buy a headphone/earphone of 3.5 mm jack. Now cut the speaker(only one ) of earphone. Now burn the small length of wire head at the speaker end you found 2 wires at inner side of headphone wire. Scrub the wires for remove the coating. Now connect that wires as shown in circuit diagram :-
cut only one speaker |
use only one wire or ground another |
Circuit Diagram :-
open or download this image, zoom in the circuit then you can see clearly
blue lines - data lines
red lines - +5v line
black lines - ground line
pink line - +12 v line
CODE IS GIVEN BELOW
Components Required :-
330 0HM RESISTANCE - 3
10K OHM RESISTANCE - 1
10K OHM VARIABLE RESISTANCE - 1
300K OHM RESISTANCE - 1
100k OHM RESISTANCE - 2
0.1UF CAPACITOR - 2
33PF CAPACITOR - 4
10UF CAPACITOR - 1
100UF CAPACITOR - 2 (ON MOTORS FOR CONTINUITY)
1000UF CAPACITOR - 1
3.579 MHZ CRYSTAL OSCILLATOR - 1
11.0592 MHZ CRYSTAL OSCILLATOR - 1
RED LED - 2
GREEN LED - 1
SPEAKER(SMALL) - 1
16X2 LCD - 1
12 volt battery upto 1.5 amp. -1
P89V51RD2 MICROCONTROLLER - 1
PUSH BUTTON - 1
HT9170 IC - 1
L293D IC - 1
100 RPM 12V DC MOTORS - 2
7805 IC - 1
HEADPHONE WITH 3.5MM JACK - 1
MOBILES (atleast one support 3.5mm jack) - 1
MALE AND FEMALE CONNECTORS LINES
CONNECTING WIRES.
CODE :-
----------------------------------------------------------------------------------------------------------------------------------
#include<reg51.h>
int i,j,k,l,m,n,o; //declaration of variables
sbit RS=P1^4; //port 1 pins as indvidual switches
sbit RW=P1^5;
sbit EN=P1^6;
sbit i1=P1^0;
sbit i2=P1^1;
sbit i3=P1^2;
sbit i4=P1^3;
void lcd_cmd(unsigned char value); //declation of command function of lcd
void lcd_data(unsigned char value); //declation of data function of lcd
void delay();
char a[7]="forward";
char b[8]="backward";
char c[5]="right"; //declaring string arrays for lcd
char d[4]="left";
char e[4]="horn";
char f[9]="headlight";
void main()
{
P1=P2=P3=0x00; //initialisation of ports
while(1)
{
lcd_cmd(0x38); //
delay();
lcd_cmd(0x0e); //
delay(); //intializing lcd
lcd_cmd(0x06);
delay(); //
lcd_cmd(0x01);
delay();
if(i2==1&&i1==0&&i3==0&&i4==0) //conditions for motors
{
P2=0x0a;
}
else if(i3==1&&i1==0&&i2==0&&i4==0)
{
P2=0x08;
}
else if(i2==1&&i3==1&&i1==0&&i4==0)
{
P2=0x02;
}
else if(i4==1&&i1==0&&i2==0&&i3==0)
{
P2=0X25;
}
else if(i1==1&&i3==1&&i2==0&&i4==0)
{
P2=0X40;
}
else if(i1==1&&i2==0&&i3==0&&i4==0)
{
P2=0x10;
}
else
{
P2=0x00;
}
if(i2==1&&i1==0&&i3==0&&i4==0) //condition for lcd
{
for(i=0;i<7;i++)
{
lcd_data(a[i]);
}
}
if(i3==1&&i1==0&&i2==0&&i4==0)
{
for(j=0;j<4;j++)
{
lcd_data(d[j]);
}
}
if(i2==1&&i3==1&&i1==0&&i4==0)
{
for(k=0;k<5;k++)
{
lcd_data(c[k]);
}
}
if(i4==1&&i1==0&&i2==0&&i3==0)
{
for(l=0;l<8;l++)
{
lcd_data(b[l]);
}
}
if(i1==1&&i3==1&&i2==0&&i4==0)
{
for(m=0;m<4;m++)
{
lcd_data(e[m]);
}
}
if(i1==1&&i2==0&&i3==0&&i4==0)
{
for(o=0;o<9;o++)
{
lcd_data(f[o]);
}
}
}
}
void lcd_cmd(unsigned char value) //definition of command function
{
RS=0;
RW=0;
P3=value;
EN=1;
delay();
EN=0;
}
void lcd_data(unsigned char value) //definition of data function
{
RS=1;
RW=0;
P3=value;
EN=1;
delay();
EN=0;
}
void delay()
{ //definition of delay function
for(n=0;n<2;n++)
{
TMOD=0X01;
TH0=0X4B;
TL0=0XFD;
TR0=1;
while(TF0==0);
TF0=0;
TR0=0;
}
}
----------------------------------------------------------------------------------------------------------------------------------
Pictures :-
Videos :-
IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.