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 RobotLine FollowerGesture 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;
 }
}