Thursday, 14 March 2013

CELLPHONE OPERATED ROBOT


Description :-
                            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.


DTMF Decoder(HT9170) :-
     

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 :-



1N4007 diode - 1
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.      
                                                            GOOD LUCK

More embedded projects >>....                                                More MAT LAB projects>>...




Monday, 4 February 2013

ANALOG TO DIGITAL CONVERTERS

Theory :-
As you all know that in the world of electronics all the microcontrollers and microprocessors works on DIGITAL SIGNAL, but from the sources like battery we get a ANALOG SIGNAL. So in embedded systems it is mandatory to convert the analog signal into digital signal.

So for converting the analog signal into digital signal we use operational amplifiers(OP-AMP). We use operational amplifiers as a voltage comparator . A op-amp is shown in figure below :-

We fix a voltage at negative input with the help of variable resistor of 10k ohm and at the positive input we give our analog signal. If the analog signal is grater than the fix voltage at negative input then we get 1 in output(means +5V) and if the analog signal voltage is less than the voltage at negative input then we get 0 at output(means 0V).

Note :-
             Set the negative input voltage with the help of variable resistor according to your requirement.

you can see a A to D converter in below fig.

There are several OP-AMP ICs are available like :- lm358, 741, lm324 etc.
Here we use LM324 which have 4 op-amps in it.


Now we construct a A TO D converter. With the help of above circuit and pin out diagram of lm324 we construct a A TO D CONVERTER in INVERTING & NON-INVERTING mode.

Schematic :-

                        
this is the schematic for NON-INVERTING configuration.
take the outputs from output pins. Give your analog input signal to pin 3,5,10,12.

For INVERTING configurations connect the variable resistors ant negative inputs and give give analog input at positive terminal.

THE PCB LAYOUTS ARE THE MIXED OF BOTH INVERTING AND NON INVERTING CONFIGURATION.

DOWNLOAD THIS PICTURE AND ZOOM IN SO YOU CAN SEE CLEARLY ALL COMPONENTS.


Pcb layouts :-
top/component view
bottom view


This is the layout of original size pcb. In the above layout the upper lm324 ic is configured in non-inverting mode and lower lm324 ic is configured in inverting mode.


Photos :-


bottom view of my pcb

top view or component mount 
           



IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                                                More MAT LAB projects>>...