Cell Phone Controlled Robot using 8051 Microcontroller

embedded

BySaddam 16

Cell Phone Controlled Robot using 8051 Microcontroller

In this project we are going to build a cell phone controlled robot using 8051 microcontroller. Cell phone controlled robot runs over mobile DTMF technology. DTMF stands for Dual Tone Multiple Frequency. There are some frequencies that we use to create DTMF tones. In simple words by adding or mixing two or more frequencies we generate DTMF tone. These frequencies are given below:

DTMF Frequency Group

In given figure we can see two groups of different frequencies. When one upper and one lower frequencies mix together then a tone is created which is called Dual Tone Multiple Frequency. 

 

​Required Components

  1. 8051 microcontroller
  2. DC Motors
  3. Mobile Phone
  4. Motor Driver L293D
  5. 7404
  6. 8870
  7. .1 Uf Capacitor
  8. 330K resistors
  9. 100K resistors
  10. 11.0592 MHz xtal
  11. 3.57 MHz xtal
  12. 22pF capacitors
  13. 1K resistors
  14. 10K resistor
  15. 10K resistor pack
  16. 33 pF capacitors
  17. Push button
  18. LEDs
  19. 7805
  20. 1000uF capacitor
  21. 10uF capacitors
  22. Copper Clad
  23. 9 Volt Battery
  24. Battery Connector
  25. Aux wire
  26. Robot Chasis with wheel
  27. Connecting wires

 

Working of Cell Phone Controlled Robot

We can divide the complete cell phone controlled robot into different sections, which are shown in the below figure.

Block Diagram for Cell phone controlled robot

Remote Section: This section’s main component is DTMF. Here we get a tone from the cellphone by using aux wire to DTMF Decoder IC namely HT8870 which decodes the tone into digital signal of 4bit.

 

Control Section: 8051 is used for controlling the complete process of this mobile phone controlled robot. 8051 reads commands sent by DTMF Decoder and compare with defined code or pattern. If commands match, the microcontroller sends respective command to driver section.

 

Driver Section: Driver section consists motor driver and two DC motors. Motor driver is used for driving motors because microcontroller does not supply enough voltage and current to motor. So we add a motor driver circuit to get enough voltage and current for motor. By collecting commands from 8051, motor driver drive motor according to commands.

 

Circuit Diagram and Explanation

Cell Phone Controlled Robot Circuit Diagram

Circuit Diagram of Cell Phone Controlled Robot is very similar with our other robotics projects like PC Controlled Robot, Line Follower, Gesture Controlled Robot, etc. Here one motor driver is connected to 8051 microcontroller for driving robot. Motor driver’s input pin 2, 7, 10 and 15 are connected at 8051’s pin number P2.6, P2.3, P2.0 and P2.7 respectively. Here we have used two DC motors to drive robot in which one motor is connected at output pin of motor driver 3 and 6 and another motor is connected at 11 and 14. A 9 volt Battery is also used to power the motor driver for driving motors. A DTMF decoder is added with this circuit to fulfil our aim to control the robot with cell phone, and this decoder is plugged into a mobile phone using an aux wire for receiving command or DTMF Tone. DTMF decoder pins D0-D3 are connected with 8051’s pin number P0.0, P0.1, P0.2, P0.3 through NOT gate IC namely 7404. So 8051 will get inverted input from DTMF decoder like if we will press button ‘5’ from mobile keypad the output of DTMF decoder will be 0010 but 8051 will get 1101. Two 9 Volt batteries are used to power the circuit in which one is used for power the motors, connected at motor driver IC pin number 8, and other battery is connected to power the remaining circuit.

 

Cell phone controlled robot run by some commands that are send via mobile phone. We are here using DTMF function of mobile phone. Here we have used the mobile phone to show working of project. One is user mobile phone that we will call ‘remote phone’ and second one that are connected with Robot’s circuit using aux wire. This mobile phone we will call ‘Receiver Phone’.   

First we make a call by using remote phone to receiver phone and then attend the call by manually or automatic answer mode. Now here is how this robot is controlled by cell phone:

 

When we presses ‘2’ by remote phone, robot start to moving forward and moving continues forward until next command comes.

Moving forward DTMF Controlled Robot

When we presses ‘8’ by remote phone, robot change his state and start moving in backward direction until other command comes.

Moving Backward the DTMF Controlled Robot

When we press ‘4’, Robot get turn left till next command exicuted.

Turning left to DTMF controlled robot

When we press ‘6’, robot turned to right.

turning right to dtmf controlled robot

And for stopping robot we pass‘5’.

stop dtmf controlled robot

 

PCB Layout

Here is the PCB layout for cell phone controlled robot using 8051 microcontroller. Here you can find a tutorial to design a PCB at home with easy steps: How to make a PCB at home

Cell Phone Controlled Robot PCB Layout

 

Code

#include<reg51.h>

#define key P0
#define key2 0x0d
#define key4 0x0b
#define key6 0x09
#define key8 0x07
#define key5 0x0a

#define direction P2
#define forward 0x09             //  00xx 1xx1 
#define backward 0xc0
#define left 0x01
#define right 0x08
#define stop 0x00

void main()
{
 P0=0x0f;
 P2=0x00;

while(1)
{
   if(key==key2)
   direction=forward;

   else if(key==key4)
   direction=left;

   else if(key==key6)
   direction=right;

   else if(key==key8)
   direction=backward;

   else if(key==key5)
   direction=stop;
 }
}

Video

Get Our Weekly Newsletter!

Subscribe below to receive most popular news, articles and DIY projects from Circuit Digest

Comments

  • sumit kumar roy's picture
    sumit kumar roy
    Dec 15, 2015

    Give me some idea........

  • Usha l's picture
    Usha l
    Mar 21, 2016

    Thanx for ur project

  • Ayush's picture
    Ayush
    Jun 19, 2016

    plz.. can you send me this code in assembly language on my email id

  • Labonee's picture
    Labonee
    Oct 28, 2016

    Please send me this code in assembly language on my email.
    Thanks

  • ADITI's picture
    ADITI
    Nov 10, 2016

    i wanted to know if the code is right or not. It is not working. Can you help, we have to submit it tomorrow.

  • Sumit's picture
    Sumit
    Feb 05, 2017

    Is that assembly language code or c language.??

  • Aryan Onkar's picture
    Aryan Onkar
    Oct 17, 2017

    This code is written in c language,

  • Rasyid's picture
    Rasyid
    Mar 23, 2017

    can u also send the coding to me and every step to do it please..im lacking of ways to do my semestral project..tskk

  • subham das's picture
    subham das
    Mar 30, 2017

    what will be the maxim range of Bluetooth device?

  • Manan's picture
    Manan
    Apr 15, 2017

    How did you execute hex file into this controller..?? I cant see any port to connect to computer as there is in dev board.

  • shekhar's picture
    shekhar
    Apr 20, 2017

    PROGRAM

    #include<reg52.h> sbit D0 = P1^0; sbit D1 = P1^1; sbit D2 = P1^2; sbit D3 = P1^3; sbit sen1=P3^6; sbit sen2=P3^7;

    sbit M1_ CW =P2^0; sbit M1_ CCW = P2^1; sbit M2_ CW = P2^2; sbit M2_ CCW =P2^3; void msDelay(unsigned int x)

    {

    unsigned int i,j; for(i=0;i<x;i++) for(j=0;j<1275;j++);

    }

    void main()

    {

    sen1=0; sen2=0;

    D0=0; D1=0; D2=0; D3=0; M1_ CW=1; M1_ CCW=1; M2_ CW=1; M2_ CCW=1; msDelay(500);

    while(1)

    {

    if( D3==1&&D0==0&&D1==0&&D2==0&&sen1==0&&sen2==0)

    {

    M1_ CW=0;

    M1_ CCW=1; M2_ CW=1;

    M2_ CCW=0;

    }

    else if(D3==0&&D0==0&&D1==0&&D2==1&&sen1==0&&sen2==0)
    {

    M1_ CCW=0;

    M1_ CW=1;

    M2_ CW=0;
    M2_ CCW=1;

    }

    else if(D3==1&&D0==0&&D1==0&&D2==1&&sen1==0&&sen2==0)

    {

    M1_ CCW=1;

    M1_ CW=0;

    M2_ CW=0; M2_ CCW=0;

    }

    else if(D3==0&&D0==0&&D1==1&&D2==0&&sen1==0&&sen2==0)

    {

    M1_ CCW=0; M1_ CW=0;

    M2_ CW=1; M2_ CCW=0;

    }

    else if (sen1==1&&sen2==0)

    {

    M1_ CCW=1;

    M1_ CW=0;

    M2_ CW=0; M2_ CCW=0;

    }

    else if (sen1==0&&sen2==1)

    {

    M1_ CCW=0;

    M1_ CW=0;

    M2_ CW=1; M2_ CCW=0;

    }

    else if(sen1==1&&sen2==1)

    {

    M1_ CCW=1;

    M1_ CW=1;

    M2_ CW=1; M2_ CCW=1;

    }

    else

    {

    M1_ CCW=1; M1_ CW=1;

    M2_ CW=1; M2_ CCW=1;

    }

    }

  • Sivasakthi's picture
    Sivasakthi
    May 17, 2017

    i want how to connect from Beginning to end with connection

  • Atyanna's picture
    Atyanna
    Apr 13, 2018

    Did u complete ur project ...please help us if u have done it....we should submit it after 2 days...plz

  • Talib 's picture
    Talib
    Oct 15, 2017

    can you send me .brd file or .sch file plzzzzzzzzzz

  • Aryan Onkar's picture
    Aryan Onkar
    Oct 17, 2017

    I noticed that the c program here says that Pin 7 or the input 2 of L293D motor driver should be connected to Port 2.3 or pin 24 of the microcontroller but In the given circuit it seems to be connected to Port 2.1 or pin 22 of the microcontroller.Please correct this fault as soon as possible.
    Thanks.

  • Sana ali's picture
    Sana ali
    Jan 11, 2018

    This program contain many much error plz send tha correct program

Log in or register to post Comment