You are on page 1of 9

Microprocessor and Computer

Architecture (Lab Project Report)


Project Title:
DTMF Controlled Robot Using Arduino

Report By:
Hamza Khalid

13-EE-119

Muhammad Imran

13-EE-135

Hamza Khan

13-EE-139

Group:
C2

Department of Electrical Engineering


UNIVERSITY OF ENGINEERING &
TECHNOLOGY TAXILA

Introduction:
In present time almost all the people are familiar with robots.
Robots play a very important role in human life. Robots are a machine which
reduces the human efforts in heavy works in industries, building etc. and makes
life easy. We are here with our next robot that is Mobile or DTMF Controlled
Robot. DTMF controlled Robot runs over mobile DTMF technology that exists in
Dial tone. DTMF stands for Dual Tone Multiple Frequency. There are some
frequencies that we use to create DTMF tone. In simple words by adding or
mixing two or more frequencies generates DTMF tone. These frequencies are
given below:

In given figure we can see two groups of different frequencies. When one
upper and one lower frequencies mixed then tone is created, that tone we call
Dual Tone Multiple Frequency.

Components:

Arduino UNO

DTMF decoder Module

DC Motor

Motor Driver L293D

Mobile Phone

9 Volt Battery

DTMF decoder Module

Battery Connector

Motor Driver L293

IR Sensor

Arduino UNO

Robot Chassis with wheel

DC Motor

Connecting wires

Mobile Phone

What is DTMF?
DTMF is a Dual Tone Multiple Frequency decoder module which has
a MT8870 DTMF decoder IC which decodes DTMF tone signal to digital signal
that are acceptable for Arduino digitally. Here an aux wire is needed for
connecting DTMF module to phone.

Block Diagram for DTMF Controlled Robot using


Arduino:

Remote section:
This sections main component is DTMF. Here we get a tone from our cell
phone by using aux wire to DTMF Decoder IC namely MT8870 which decodes
the tone into digital signal of 4bit.

Control Section:
Arduino UNO is used for controlling whole the process of robot. Arduino
reads commands sent by DTMF Decoder and compare with define code or

pattern. If commands are match Arduino 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 Arduino 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 Arduino motor driver drive
motor according to commands.

Circuit Diagram:
Circuit diagram for Arduino based DTMF Controlled Robot is very
similar with our other robot like PC controlled robot, Line Follower, Gesture
Controlled Robot, etc.. Here one motor driver is connected to arduino for
driving robot. Motor drivers input pin 2, 7, 10 and 15 is connected at arduino
digital pin number 6, 5, 4 and 3 respectively. Here we have used two DC motors
to driver 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 attached
with this circuit and this decoder is plugged into a mobile using an aux wire for
receiving command or DTMF Tone. DTMF decoder pin D0-D3 is directly
connected with Arduinos pin number 19,18,17,16. 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 another battery is connected to power the
remaining circuit.

Working of DTMF Controlled Robot:


DTMF 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 Robots
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 DTMF controlled
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. Similarly when we presses
8 by remote phone, robot change his state and start moving in backward direction
until other command comes.

When we press 4, Robot get turn left and when we press 6, robot turned to
right till next command executed.

And for stopping robot we pass5.

Programming Explanation:
In program first of all we have defined output pins for motors and Input
pins for DTMF decoder output as in INPUT for Arduino.

Then in setup set motor pin as OUTPUT and DTMF decoder output pins as
INPUT.

After that we read DTMF decoder output and then compare with defined
values by using if statement and perform relative operation.

There are five conditions in this DTMF controlled Robot that are giving
below:

We write program according to above table conditions.

Code:
#define m11 3
#define m12 4
#define m21 5
#define m22 6
#define D0 13
#define D1 12
#define D2 11
#define D3 10
#define ir 2
void forward()
{
digitalWrite(m11, HIGH);
digitalWrite(m12, LOW);
digitalWrite(m21, HIGH);
digitalWrite(m22, LOW);
}
void backward()
{
digitalWrite(m11, LOW);
digitalWrite(m12, HIGH);

digitalWrite(m21, LOW);
digitalWrite(m22, HIGH);
}
void left()
{
digitalWrite(m11, LOW);
digitalWrite(m12, LOW);
digitalWrite(m21, HIGH);
digitalWrite(m22, LOW);
}
void right()
{
digitalWrite(m11, HIGH);
delay(500);
digitalWrite(m12, LOW);
digitalWrite(m21, LOW);
digitalWrite(m22, LOW);
}
void Stop()
{
digitalWrite(m11, LOW);
digitalWrite(m12, LOW);
digitalWrite(m21, LOW);
digitalWrite(m22, LOW);
}
void setup()
{
pinMode(D0, INPUT);
pinMode(D1, INPUT);
pinMode(D2, INPUT);
pinMode(D3, INPUT);
pinMode(ir, INPUT);
pinMode(m11, OUTPUT);
pinMode(m12, OUTPUT);
pinMode(m21, OUTPUT);
pinMode(m22, OUTPUT);
}

void loop()
{
int temp1=digitalRead(D0);
int temp2=digitalRead(D1);
int temp3=digitalRead(D2);
int temp4=digitalRead(D3);
int temp5=digitalRead(ir);
if(temp5==0)
{ Stop();}
else
{
if(temp1==0 && temp2==1 && temp3==0 && temp4==0)
forward();
else if(temp1==0 && temp2==0 && temp3==1 && temp4==0)
left();
else if(temp1==0 && temp2==1 && temp3==1 && temp4==0)
right();
else if(temp1==0 && temp2==0 && temp3==0 && temp4==1)
backward();
else if(temp1==1 && temp2==0 && temp3==1 && temp4==0)
Stop();}
}

You might also like