Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Skype-controlled robot using smartphone and DTMF tones
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Skype-controlled robot using smartphone and DTMF tones
[attachment=19153]
A new trend in robotics is smartphones that have a lot of sensors, camera, GPS. One of
problems, however, is how to interface phone with custom electronics. It can be done over
Bluetooth, but audio interfacing using dual tone modulation frequency DTMF is simpler. That
is enough to control a simple robot described here.
It is a simple moving platform containing mobile phone that is remote-controlled over Internet
via Skype using DTMF tones. Wireless connection is done by WLAN that is free of charge or
mobile phone network that can be done over large distance.
Here is a video where Skype video call is started from a PC to iPhone. A dial pad is opened
in Skype to generate DTMF tones. Video at
http://www.youtubewatch?v=2-mUVKr5XLI
Dual frequency DTMF method is quite reliable and there exists a specialized decoder chip.
DTMF chip is read out by Arduino board that controls servos.
A very similar robot controlled over mobile phone, but with motors instead for servos, is very
well described in Instructable:
http://www.instructablesid/Cellphone-Ope...FCELLPHONE-
OPERATED-LANDROVER/
Here are some robotics sites using smartphones:
http://www.cellbots
http://code.googlep/cellbots/
https://githubmleone/broadcast
http://www.razorconceptsdtmf.html
Construction
Mechanical construction is nothing particular and can be found by searching google for
simple robots:
http://www.instructablesid/How-to-Make-a...Robot-SER/
Servos are like used in radio-controlled models but are modified for continuous rotation:
http://www.instructablesid/Modify-A-Serv...-Rotation/
I will concentrate on electronics here.
When a button is pressed in Skype, a dual-tone audio signal is generated that is sent by a
wireless connection to a phone that plays it. DTMF decoder chip MT8870 input is connected
to headphone output of iPhone, or some other smart(phone). In principle a microphone could
be used to skip the audio cable.
Each number is coded by two frequencies. DTMF chip decodes frequencies and sets lines Q1-
Q4 according to the table in manufacturer datasheet. Decoding is easy as the code is actually
the binary representation of the number. LEDs can be connected to the DTMF chip pins for
visual checking.
StD goes High when valid digit is detected. It is used for checking that a command has been
sent and is connected to Arduino pin 8.
Lines Q1, Q2, Q3 are connected directly to Arduino digital input pins 9, 10, 11. This is
Arduino port B that can be read out by a single command “PINB”, see programm code in
appendix. Arduino boards have very good documentation from developer and in forums. The
pin numbers of Arduino are not the pin numbers of Atmega chip. Arduino programming
software usees Arduino pin numbers and not the chip pin numbers.
Arduino board reads a byte form Port B input lines and if a correct combination exists, then
executes a subroutine for servo move. For Arduino exists a ready-made servo control library.
Wheel servos are modified for continuous rotation. Arduino code also allows to steer robot
over a COM-port interface by sending numbers from PC keyboard.
Below is a Skype dial pad and buttons that are used to steer the robot.
Alternatively, one could make all commands endless in time and introduce stop button as nr 5
.
Remarks after testing
The Skype robot project was quite fun and it would be nice to have it online all the time. For
that one would need to solve power supply problem. May be a solar panel, and put it in low
consumption sleep mode when nobody controls it.
Android smartphones at the moment of writing did not have video in Skype. Need visual
contact or an app Droidcam to see video in WLAN.
For a Skype call from an iPhones no dial tone pad was available at the moment of writing.
DTMF commands are ca 200 ms long, so do not expect to be able to control the robot rapidly.
//Arduino board programm. DTMF
//robot_runs_dtmf.pde
#include <Servo.h>
Servo myservol, myservor, myservoh;
int c, pos = 90;
const int frPin = 10;
long frequency = 0;
void setup()
{
pinMode(frPin, INPUT);
DDRB = B00000000; // sets Arduino pins 1 to 7 as inputs
myservol.attach(7);
myservor.attach(6);
myservoh.attach(5);
Serial.begin(9600);
while(Serial.available())
Serial.read();
turnright();
delay(200);
turnleft();
delay(200);
stopp();
}
void turnright()
{myservol.write(10);
myservor.write(10);
delay(100);
}
void turnleft()
{myservol.write(170);
myservor.write(170);
delay(100);
}
void turnup()
{pos=pos+3;
Serial.println(pos,DEC);
if (pos>180){pos=180;}
myservoh.write(pos);
delay(300);
}
void turndown()
{pos=pos-3;
Serial.println(pos,DEC);
if(pos<90){pos=90;}
myservoh.write(pos);
delay(300);
}
void forward()
{myservol.write(10);
myservor.write(170);
delay(1000);
}
void backward()
{myservol.write(170);
myservor.write(10);
delay(1000);}
void stopp()
{myservol.write(90);
myservor.write(90);}
long getFrequency(int pin)
{ // is not used here was only for testing with single tone control
#define SAMPLES 512
long freq = 0;
for(unsigned int j=0; j<SAMPLES/2; j++) freq+= 500000/pulseIn(pin, HIGH, 250000);
for(unsigned int j=0; j<SAMPLES/2; j++) freq+= 500000/pulseIn(pin, LOW, 250000);
return freq / SAMPLES;
}
void loop()
{
if (Serial.available())
{
c = Serial.read();
if (c==49)
{
forward();
Serial.write©;
}
if (c==50)
{
backward();
Serial.write©;
}
if (c==51)
{
turnleft();
Serial.write©;
}
if (c==52)
{
turnright();
Serial.write©;
}
stopp();
}
frequency=PINB;
if(frequency==5)
{backward();}
if(frequency==1)
{forward();}
if(frequency==9)
{turnleft();}
if(frequency==13)
{turnright();}
if(frequency==3)
{turnup();}
if(frequency==15)
{turndown();}
stopp();
}