DTMF Controlled Robot

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

DTMF based Mobile Controlled Robot

In general, wireless-controlled robots use RF circuits, which have the drawbacks of limited frequency range, limited working range and the limited control.

Use of mobile phone in robot control can overcome these limitations. It provides an advantage of working range as large as coverage area of the service provider, robust control, no interference with other controllers.


Working

In DTMF based mobile/cellphone controlled robot the AVR ATmega16 microcontroller is used with keypad as the input device to drive robot in various directions.

In this project two mobiles are used, one will be connected with the DTMF circuit and another will be used for calling the mobile attached with DTMF circuit.

The ATmega16 microcontroller read the 4-bit output signal of DTMF decoder and it will process the signal for determining which key of mobile keypad is pressed, the ATmega16 microcontroller send the control signal to the DC motor driver (L293D) of the robot for driving the robot in desired direction.

The table showing different control keys with their equivalent robot direction is:-

Robot Direction Control Keys
Forward 2
Left 4
Right 6
Backward 8
Stop 5

Block Diagram:

Block Diagram1

Consider the table showing Dual Tone Multiple Frequency (DTMF) for different keys of keypad are:-

Block Diagram2


Hardware Required:

  • 12V, 1A DC Adapter-1 piece
  • DTMF Decoder-1 piece
  • AVR Microcontroller Board-1 piece
  • DC Motor Driver-1 piece
  • AVR USB Programmer-1 piece
  • Ear Phone with Connector-1 piece
  • 1 to 1 Connector-15 piece
  • 10 to 10 FRC Female Connector-3 piece
  • Robot-1 piece

Software Required

  • BASCOM-AVR Integrated Development Environment (IDE)
  • AVRDUDE-GUI
  • WinAVR-2010
  • USBasp Driver

Circuit Diagram

Block Diagram3


Construction

Block Diagram4

Source Code:

  1. $regfile = "m16def.dat".  
  2. $crystal = 1000000  
  3. Config Lcd = 16 * 2  
  4. Config Lcdpin = Pin , Rs = Portb.2 , E = Portb.3 , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7  
  5. Config Adc = Single , Prescaler = Auto , Reference = Avcc  
  6. Start Adc  
  7. Config Timer1 = Pwm , Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down  
  8. Start Timer1  
  9. Dim A As Bit , B As Bit , C As Bit , D As Bit  
  10. Do  
  11. Cls  
  12. A = Pinc.0  
  13. B = Pinc.1  
  14. C = Pinc.2  
  15. D = Pinc.3  
  16. Lcd A ; B ; C ; D  
  17. Lowerline  
  18. If A = 0 And B = 0 And C = 1 And D = 0 Then  
  19. Pwm1a = 100  
  20. Portd.6 = 0  
  21. Pwm1b = 100  
  22. Portd.3 = 0  
  23. Elseif A = 0 And B = 1 And C = 0 And D = 0 Then  
  24. Pwm1a = 100  
  25. Portd.6 = 0  
  26. Pwm1b = 0  
  27. Portd.3 = 0  
  28. Elseif A = 0 And B = 1 And C = 1 And D = 0 Then  
  29. Pwm1a = 0  
  30. Portd.6 = 0  
  31. Pwm1b = 100  
  32. Portd.3 = 0  
  33. Elseif A = 1 And B = 0 And C = 0 And D = 0 Then  
  34. Pwm1a = 55  
  35. Portd.6 = 1  
  36. Pwm1b = 55  
  37. Portd.3 = 1  
  38. End If  
  39. Wait 1  
  40.   Loop  
  41.   
  42. End  

The screenshot of source code used in hand gesture control robot using BASCOM-AVR Integrated Development Environment (IDE) is shown below:

Block Diagram5