The R&D Club of NIT Trichy
DTMF Controlled Robot
This project is similar to the functioning of an ordinary remote control system which consists of, a transmitter and a receiver. Therefore two mobile phones are required for effective transmission and reception by DTMF .The robot is controlled by the mobile phone held by the user, which communicates with the mobile phone attached to the robot. In the course of a phone call, if any button is pressed, a tone corresponding to the button pressed is heard at the receiver end, which is called ‘Dual Tone Multiple frequency’ (DTMF) tone. The robot receives these tones via the receiver mobile phone which is on board. The received tone is processed by the microcontroller with the help of DTMF decoder IC CM8870DE . This IC communicates with the motor driver IC l293d through the microcontroller interface which drives the motor in forward, reverse, right and left directions according to the user’s key press. The microcontroller featuring in this project will be the AVR microcontroller,ATmega8.
Why build a DTMF ROBOT?
Conventionally, robots controlled by wireless communication employ radio frequency(RF), which have the drawbacks of limited working range, limited frequency range and the limited control. Use of a mobile phone for robotic control can overcome these limitations. It provides the advantage of robust control, working range as large as the coverage area of the service provider, no interference with other controllers and up to twelve controllers.
Although the appearance and the capabilities of robots vary vastly, all robots share the feature of a mechanical, movable structure under some form of control. The control of the robot involves three distinct phases: perception, processing and action. Generally, the preceptors are sensors mounted on the robot , processing is done by the on-board microcontroller or processor, and the action is performed using motors or with some other actuators.
Here the robot is controlled by the mobile phone that makes the call to the mobile phone attached to the robot.During the course of the call, if any button is pressed, control corresponding to the button pressed is heard at the other end of the call. This unique tone is received by the mobile on the robot, and is decoded with the help of the CM8870 IC.
The received tone is then processed by the Atmega8 microcontroller into its equivalent binary digit, according to which it is pre-programmed to take a decision for any given input and outputs its decision to the motor driver, in order to drive the motors forward, backward or for rotatory motion.
The mobile that makes a call to the mobile phone kept in the robot acts as a remote. So this simple robotic project does not require the construction of receiver and transmitter units.
This project can be sub divieded into 3 parts
1.The input (DTMF decoder IC-CM8870)
2. Controller (ATMega8 microcontroller)
3.Output (The motor driver IC and motors)
Now lets us look into each aspect in detail.
1.Input: (DTMF decoder circuit)
When you press the buttons on the keypad, a connection is made that generates two tones at the same time. A “Row” tone and a “Column” tone. These two tones help in identifying the that key you pressed to any equipment you are controlling. If the keypad is on your phone, the telephone company’s “Central Office” equipment knows what numbers you are dialing by these tones, and will switch your call accordingly. If you are using a DTMF keypad to remotely control equipment, the tones can identify what unit you want to control, as well as which unique function you want it to perform.
When you press the digit 1 on the keypad, you generate the tones 1209 Hz and 697 Hz.
Pressing the digit 2 will generate the tones 1336 Hz and 697 Hz.
Sure, the tone 697 is the same for both digits, but it take two tones to make a digit and the decoding equipment knows the difference between the 1209 Hz that would complete the digit 1, and a 1336 Hz that completes a digit 2.
Thus each key in the keypad gives different 4 bit binary number in the output(pin no 14,13,12,11).This binary no is processed by the microcontroller to give specific output to the motor.
L293D is a dual H-bridge motor driver integrated circuit (IC). The current from the microcontroller is only of the order of 1µA which is not sufficient to drive the motors. Therefore motor drivers are used which act as current amplifiers since they take a low-current control signal and provide a higher-current signal which is used to drive the motors.
L293D contains two inbuilt H-bridge driver circuits. In its common mode of operation, two DC motors can be driven simultaneously, both in forward and reverse direction. The motor operations of two motors can be controlled by input logic at pins 2 & 7 and 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in clockwise and anticlockwise directions, respectively.
Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start operating. When an enable input is high, the associated driver gets enabled. As a result, the outputs become active and work in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and their outputs are off and in the high-impedance state.
Control with MCUs
The AtMega8 microcontroller used in this project has 8Kb of flash memory with 20 general purpose input/output pins. These input/output pins can be used to receive input from the DTMF Decoder as well as to send output signals to control the motors. However the MCUs PORT outputs are not powerful enough to drive DC motors directly, we need some kind of drivers to facilitate this. A very easy and safe is to use popular L293D ICs. It is a 16 PIN chip. The pin configuration is as follows.This chip is designed to control 2 DC motors. There are 2 Input and 2 Output pins for each of the motors. The connections are as follows:
The behavior of motor for various input conditions are as follows
If we want to rotate the motor clockwise, we make the left upper switch and right lower switch closed (which corresponds to A low and B high above) and if it has to rotate in anticlockwise direction, we close the right upper switch and the left lower switch which corresponds to A high and B low. Also for the forward motion of the vehicle we make both motors rotate in clockwise sense (say) and for backward motion, both motors should rotate anticlockwise. For right turn, right motor should stop and left motor should rotate in clockwise direction and for sharp right turn right motor rotates in clockwise direction and left motor in the anticlockwise direction. A similar technique is followed for left turn and sharp left turn which you can easily guess.So you saw you just need to set appropriate levels at two PINs of the microcontroller to control the motor. Since this chip controls two DC motors there are two more output pins (output3 and output4) and two more input pins(input3 and input4). The INPUT3 and INPUT4 controls second motor in the same way as listed above for input A and B. There are also two ENABLE pins they must be high (+5v) for operation, if they are pulled low (GND) motors will stop.
DTMF Controlled Robot
PORTD pin 0,1,2,3 goes to motor driver l293d
PORTB pin 0,1,2,3 is connected to output of CM8870 DTMF decoder IC
case 0b0010://Key 2
PORTD=0x0A ; //1010 both motor front
case 0b0100://Key 4
PORTD=0x02; //0010 right motor front
case 0b0101://Key 5
PORTD=0x0F;//1111 SUDDEN STOP
case 0b0110://Key 6
PORTD=0x08; //1000 left motor front
case 0b1000://Key 8
}//end of switch