In this project we are going to control a manual robot through our cellphone using DTMF module and Arduino.
By: Ankit Negi, Kanishk Godiyal and Navneet Singh sajwan
In this project two cell phones, one for calling and one for receiving the call are used. The phone receiving the call is connected to the robot via audio jack.
The person who is calling can control the robot just by pressing the dial pad keys. (i.e. the robot can be operated from any corner of the world).
1 - Arduino UNO
2 – Manual robot
3 - 4 motors (here we used 300 r.p.m each)
4 - DTMF module
5 - Motor driver
6 – 12 volt Battery
7 - Switch
8 - Headphone Jack
9 – Two Cell Phones
10 – Connecting wires
ABOUT MANUAL ROBOT
A manual robot consists of chassis (body) in which three or four motors (which are screwed with tyres) can be attached depending on requirement.
Motors to be used depend on our requirement i.e. they can either provide high speed or high torque or a good combination of both. Applications like quad copter requires very high speed motors to lift against gravity while application like moving a mechanical arm or climbing a steep slope requires high torque motors.
Both motors on left and right side of robot are connected in parallel separately. Usually they are connected to a 12volt battery via DPDT(double pin double throw) switches.
But in this project we will use mobile phone instead of DPDTs to control the bot.
ABOUT MOTOR DRIVER
Arduino gives maximum current of 40mA using GPIO (general purpose input output) pins, while it gives 200mA using Vcc and ground.
Motors require large current to operate. We can’t use arduino directly to power our motors so we use a motor driver.
Motor driver contains H Bridge (which is a combination of transistors). The IC (L298) of motor driver is driven by 5v which is supplied by arduino.
To power the motors, it takes 12v input from arduino which is ultimately supplied by a 12 v battery. So the arduino just takes power from battery and gives to the motor driver.
It allows us to control the speed and direction of motors by giving maximum current of 2 amperes.
INTRODUCTION TO DTMF MODULE
DTMF stands for Dual tone multi frequency. Our dial pad is a two toner multiple frequency i.e. one button gives a mixture of two tones having different frequency.
One tone is generated from a high frequency group of tones while other from a low frequency group. It is done so that any type of voice can’t imitate the tones.
So, it simply decodes the phone keypad’s input into four bit binary code. The frequencies of keypad numbers which we have used in our project is shown in the table below
|Digit||Low frequency(hertz)||High frequency(hertz)|
The binary decoded sequence of the dial pad’s digits is shown in the table below.
Motor driver –
- Pin ‘A’ and ‘B’ controls left side motor while Pin ‘C’ and ‘D’ controls right side of motor. These four pins are connected to the four motors.
- Pin ‘E’ is to power IC(L298) which is taken from arduino (5v).
- pin ‘F’ is ground.
- Pin ‘G’ takes 12 volt power from battery via Vin pin of arduino.
- Pins ‘H’, ‘I’, ‘J’ and ‘K’ receives logic from arduino.
- pin ‘a’ is connected to 3.5 volt of arduino to power the IC (SC9270D).
- Pin ‘b’ is connected to ground.
- The input of DTMF is taken from phone via jack.
- The output in the form of binary data via (D0 – D3) pins goes to arduino.
- the output of DTMF from (D0 – D3) pins comes to digital pins of arduino. We can connect this output to any of the four digital pins varying from (2 – 13) in arduino. Here we used pins 8, 9, 10 and 11.
- Digital pins 2 and 3 of arduino are connected to pin number ‘H’ and ‘I’ of motor driver while pins 12 and 13 of arduino are connected to ‘J’ and ’K’.
- The arduino is connected to a 12 volt battery.
- First of all, we initialise all variables before void setup.
- In void setup, all pins to be used are assigned as input or output according to their purpose.
- A new function “void decoding()” is made. In this function all the binary input that we get from DTMF is decoded to decimal by arduino. And variable assigned for this decimal value is a.
- Another function “void printing()” is made. This function is used to print input values from DTMF pins.
- Similarly, five functions are required functions are required to perform the required task. These functions are:
void move_left(); // robot turns left
void move_right() ; // robot turns right
void move_forward(); // robot moves forward
void move_backward() ; // robot moves backward
void halt() ; // robot stops
- Now these functions are used in void loop function to do their task whenever they are called according to input from dialpad of cellphone.
hence when button 2 is pressed or 0010 is received on input pins, arduino decodes this and thus these functions do their work : move_forward();
The controls which we have used in our project are as follows –
2 – To move forward
4 – To turn left
6 – To turn right
8 – To move backwards
0 – to stop
After making a call to the phone connected to the robot, the person opens his dial pad.
- If ‘2’ is pressed. The DTMF receives the input, decodes it in its binary equivalent number i.e. ‘0010’ and sends it to digital pins of arduino. The arduino then sends this code to the motor driver as we have programmed when the code will be ’0010’, the motors will rotate in clockwise direction and hence our robot will move forward.
- If ‘4’ is pressed then its equivalent code is ‘0100’ and according to the programming the left side motors will stop and only right side motors will rotate clockwise and hence our robot will turn left.
- If ‘6’ is pressed then the right side motor will stop and only left side motors will rotate clockwise and hence our robot will turn right.
- If ‘8’ is pressed then our motors will rotate in anticlockwise direction and thus our robot will move backward.
- If ‘0’ is pressed then all our motors will stop and robot will not move.
In this project we have assigned a function to five dial pad numbers only. We can add any type of other mechanism and assign a dial pad number to that mechanism to make an upgraded version of this project.
POINTS TO KEEP IN MIND
1 – The jack should not be loose.
2 – Phone keypad tones should be maximum.
3 – Internet/ Wi-Fi of receiving phone should be closed to avoid interference effects.
4 – Left pin (i.e. pin ‘b’) of DTMF is ground and right pin (i.e. pin ‘a’) is connected to 3.3v.
Prototype images of the cellphone controlled robot car circuit using DTMF
Video Demonstration of Cellphone controlled RC Car using DTMF