Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering

Surveillance Car Controlled via DTMF

By Varun Kumar

I made this project in order to build a surveillance car which can be controlled over Internet or any private network. My objective was to do something easily and cost effectively that could be used for security purposes.
My car uses DTMF module which takes its input from mobile phone attached to the car., That mobile is not only used to generate DTMF tones but also for the surveillance by providing Live Footage from  its camera, over the network using AirDroid.
Conventionally, any project using DTMF requires call from another cell phone to the one attached to the project, which is not cost effective, but in case of my project I used an android app DTMF Tone Generator which generates DTMF tone. Now for this to work, I shared my phone’s screen over the network using VNC server, which was quite cost effective.
To make this idea more effective I mounted the phone on a servo motor.This gave my camera one degree of freedom, i.e. I could move it left and right without moving the bot.
One more security problem involved with DTMF that I took care of was that anyone  could control the bot by calling the mobile phone attached to the bot. A simple solution to this problem was to apply a PIN using DTMF tones. I demonstrated this concept in the video and for the inner working which you can check in the source code.

Advantages:

1. Far more cheap than the  Bluetooth and Wifi, modules, with almost identical working.
2. Can be controlled via Internet using VPN.

Utilities:

1. One can efficiently keep track on activities in his/her house when there are no occupants.
2. It can be used for surveillance purposes in dangerous areas where there is any kind of threat to human life.

Prototype of DTMF controlled Arduino Robot

 Fig. 1: Prototype of DTMF controlled Arduino Robot

Image showing mechanical body of DTMF controlled Arduino Robot

Fig. 2: Image showing mechanical body of DTMF controlled Arduino Robot

Image showing DTMF controlled Arduino Robot in Action

Fig. 3: Image showing DTMF controlled Arduino Robot in Action

Requirements:

1. DTMF decoder module
2. 3.5mm audio cable (for connecting mobile to DTMF module)
3. Arduino Uno
4. Chaise
5. Servo motor (7 kg/cm)
6. Android Phone (In my case Galaxy Ace Duos)
7. Laptop (can be desktop or any android device supporting multi windows)
8. Geared DC motors with Wheels
9. L298 motor driver module

10. Android apps  AirDroid, DTMF Tone Generator, VNC server

11. Applications on laptop  VNC client and Browser

An extension of this project

I tethered wifi from the phone mounted on the vehicle, thereby creating a local network. Now I was able to control my vehicle without the need of an external router or internet. Although I wasn’t able to get the live feed as Airdroid needs internet connection to initialize.

Description:

Explanation of circuit and hardware components:

I used DTMF decoder module using MT8870DE and connected it to  Arduino as shown in circuit diagram. I pulled up pin13 permanently so as to provide +5v to the module. As can be seen D1-D4 are connected to pin12-pin9 respectively, here D1 represents least significant bit and D4 represents most significant bit. Pin8 of  Arduino is connected to STD pin of DTMF  module; it becomes high whenever a new signal (valid tone) is given to the module.
Tones were generated via mobile phone and were fed as input to DTMF decoder module using 3.5mm audio jack.
For motor driver I used L298D module. Here M11, M12 and M21, M22 are connection for LEFT and RIGHT motor respectively. When the car is seen from back to front, M11=M21=HIGH and M12=M22=LOW car will move forward. With this information you can easily use my source code directly by changing your connection respectively.
PWM1 and PWM2 are the pins which can be used to control left and right motor’s speed. I set both of them HIGH in order to attain maximum speed. EN1 and EN2 enable left and right motor when set high, so I shorted them with +5v supply from Arduino.
Vcc for DC motors was connected from a +12v supply.
Phone was mounted on servo motor. Data pin of servo was connected to pin5 and +5v was taken from +5v supply and not from Arduino as the current drawn by servo motor that I used exceeded the maximum current that could have been drawn from Arduino.

Explanation and working of peripheral applications used:

First of all I connected my laptop and my mobile phone to the same network.
I used DTMF Tone Generator to generate DTMF tones. This application was running on my mobile phone.
Now in order to share the display and gain control over my mobile phone from my laptop I created a VNC server by running VNC server application on my phone in background and using VNC client on my laptop. Now I was able to view my mobile phone’s screen and simulated touches from my laptop.
At this point I was able to generate DTMF tones from my mobile phone using my laptop, therefore I was able to control my car using  the laptop.
To get the live feed from my phone’s camera I used AirDroid application, which was running in background alongside VNC server and using a browser(preferably Chrome) on my laptop I was able to use the camera of my phone.
Source code is well documented therefore all the required explanation is given as comments.

Possible Modifications:

1. Instead of being on the same network one can control it via internet from any part of the world using VPN.
2. One can use any tablet or phone which supports multi window instead of laptop, as the only required application on my laptop were VNC client and a web browser. Both of them are available for android,  iOS, windows and Linux.
3. One can control the speed of vehicle by connecting PWM1 and PWM2 to pwm pins of Arduino and by making necessary         changes in source code.
4. If only maximum speed is required L293D can be used instead of L298, which might in turn save some bucks.

Project Source Code

/*

m11 and m12 are for Left Motor and m21 and m22 are for Right Motor when viewing your car from the back.

To have forward motion set m11=m21=HIGH and m12=m22=LOW.

 
a,s,d,f defines four digits of Security PIN.

One can change it by changing their values in "Loop for Security PIN" section

Default PIN -> 1234

*/


#include 

Servo myservo;

int servo=5;

int angle=180; // 180 is the initial angle and mobile phone should be placed with camera facing front

int d1=12;

int d2=11;

int d3=10;

int d4=9;

int st=8;

int vccdtmf=13;

int a=0,s=0,d=0,f=0,flag=0;

int m11=19;

int m12=18;

int m21=17;

int m22=16;

int p1=15;

int p2=14;

void setup()

{

  myservo.attach(5);     // Defines Pin 5 for Servo

  myservo.write(angle);

  pinMode(d1,INPUT);

  pinMode(d2,INPUT);

  pinMode(d3,INPUT);

  pinMode(d4,INPUT);

  pinMode(st,INPUT);

  pinMode(vccdtmf,OUTPUT);

  pinMode(m11,OUTPUT);

  pinMode(m12,OUTPUT);

  pinMode(m21,OUTPUT);

  pinMode(m22,OUTPUT);

  pinMode(p1,OUTPUT);

  pinMode(p2,OUTPUT);

  pinMode(servo,OUTPUT);

} 

void loop()

{

  digitalWrite(vccdtmf,HIGH); // +5V for DTMF Module

  digitalWrite(p1,HIGH);      // For Max. speed

  digitalWrite(p2,HIGH);      // For Max. speed


/////////////////////////////////////////////// Loop for Security PIN ///


  while(flag==0)

  {

    if(a!=1 && digitalRead(d1)==1 && digitalRead(d2)==0 && digitalRead(d3)==0 
          && digitalRead(d4)==0 && digitalRead(st)==1)

    {

      a=1;

    }

    if(a==1 && s!=2 && digitalRead(d1)==0 && digitalRead(d2)==1 && digitalRead(d3)==0 && 
digitalRead(d4)==0 && digitalRead(st)==1)

    {

      s=2;

    }

    if(s==2 && d!=3 && digitalRead(d1)==1 && digitalRead(d2)==1 && digitalRead(d3)==0 && 
digitalRead(d4)==0 && digitalRead(st)==1)

    {

      d=3;

    }

    if(d==3 && f!=4 && digitalRead(d1)==0 && digitalRead(d2)==0 && digitalRead(d3)==1 && 
digitalRead(d4)==0 && digitalRead(st)==1)

    {

      f=4;

    }

    if(a==1 && s==2 && d==3 && f==4)

    {

      flag=1;

    }

  }


/////////////////////////////////////////////////////////////////////////


///////////////////////////////////////// Movement of Car ///////////////


  while(digitalRead(st)==0)  // RESET the value when no valid tone is given

  {

    digitalWrite(m11,LOW);

    digitalWrite(m12,LOW);

    digitalWrite(m21,LOW);

    digitalWrite(m22,LOW);   

  }


  while(digitalRead(d1)==0 && digitalRead(d2)==1 && digitalRead(d3)==0 && digitalRead(d4)==0 
&& digitalRead(st)==1) // Press 2 for Forward Direction

  {

    digitalWrite(m11,HIGH);

    digitalWrite(m12,LOW);

    digitalWrite(m21,HIGH);

    digitalWrite(m22,LOW);

  }

  while(digitalRead(d1)==1 && digitalRead(d2)==0 && digitalRead(d3)==0 && digitalRead(d4)==0 
 && digitalRead(st)==1) // Press 1 for Right Forward Direction

  {

    digitalWrite(m11,HIGH);

    digitalWrite(m12,LOW);

    digitalWrite(m21,LOW);

    digitalWrite(m22,LOW);

  }


  while(digitalRead(d1)==1 && digitalRead(d2)==1 && digitalRead(d3)==0 && digitalRead(d4)==0 
 && digitalRead(st)==1) // Press 3 for Left Forward Direction

  {

    digitalWrite(m11,LOW);

    digitalWrite(m12,LOW);

    digitalWrite(m21,HIGH);

    digitalWrite(m22,LOW);

  }


  while(digitalRead(d1)==1 && digitalRead(d2)==0 && digitalRead(d3)==1 && digitalRead(d4)==0 
 && digitalRead(st)==1) // Press 5 for Backward Direction

  {

    digitalWrite(m11,LOW);

    digitalWrite(m12,HIGH);

    digitalWrite(m21,LOW);

    digitalWrite(m22,HIGH);

  }


  while(digitalRead(d1)==0 && digitalRead(d2)==0 && digitalRead(d3)==1 && digitalRead(d4)==0
  && digitalRead(st)==1) // Press 4 for Right Backward Direction

  {

    digitalWrite(m11,LOW);

    digitalWrite(m12,HIGH);

    digitalWrite(m21,LOW);

    digitalWrite(m22,LOW);

  }


  while(digitalRead(d1)==0 && digitalRead(d2)==1 && digitalRead(d3)==1 &&   
digitalRead(d4)==0 && digitalRead(st)==1) // Press 5 for Left Backward Direction

  {

    digitalWrite(m11,LOW);

    digitalWrite(m12,LOW);

    digitalWrite(m21,LOW);

    digitalWrite(m22,HIGH);

  }


/////////////////////////////////////////////////////////////////////////

////////////////////////////////////// Movement of Servo ////////////////

     
  if(digitalRead(d1)==1 && digitalRead(d2)==1 && digitalRead(d3)==1 && digitalRead(d4)==0 && 
 digitalRead(st)==1) // Press 7 to turn servo in anti-clockwise direction

  {

    if(angle>0)

    {

      angle=angle-45;

      myservo.write(angle);

      delay(500);

    }

  }


  if(digitalRead(d1)==0 && digitalRead(d2)==0 && digitalRead(d3)==0 && digitalRead(d4)==1 && 
digitalRead(st)==1) // Press 8 to turn servo in clockwise direction

  {

    if(angle<180)

    {

      angle=angle+45;

      myservo.write(angle);

      delay(500);

    }

  }


/////////////////////////////////////////////////////////////////////////


/////////////////////////////////// You Have to Enter Password again ////

 

  while(digitalRead(d1)==1 && digitalRead(d2)==0 && digitalRead(d3)==1 && digitalRead(d4)==1 && 
 digitalRead(st)==1) //Press A to reset the PIN

  {

    flag=1;

  }

/////////////////////////////////////////////////////////////////////////

}


/*********************  END *********************/

Circuit Diagrams

Image-Showing-DTMF-Controlled-Arduino-Robot-Action

Project Video

 

An extension of this project

I tethered wifi from the phone mounted on the vehicle, thereby creating a local network.Now I was able to control my vehicle without the need of an external router or internet. Although I wasn’t able to get the live feed as Airdroid need internet connection to initialize.


Filed Under: Electronic Projects
Tagged With: Arduino, dtmf
 

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Designing Gate Driver Circuit and Switching Mechanism for Modified Sine Wave Inverter – (Part 9/17)
  • Completing Modified Sine Wave Inverter Design with Full Bridge Circuit and Step Up Transformer – (Part 10/17)
  • Designing an Offline UPS – Part (12 /17)
  • How to reduce Switching Time of a Relay – (Part 15/17)
  • Testing MOSFET – (Part 16/17)
  • Driving High Side MOSFET using Bootstrap Circuitry – (Part 17/17)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • Infineon offers DC-DC controller for full LED headlamps without a microcontroller
  • Vishay launches new high-precision, thin-film wraparound chip resistor
  • STMicroelectronics’ common-mode filters ensure signal integrity in serial interfaces
  • Renesas’ RA Family microcontrollers earn CAVP certification for cryptographic algorithms
  • MicroPython: Serial data communication in ESP8266 and ESP32 using UART

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd ldr led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics Research robot samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Simulation of resonator in HFSS
  • IRF450 MoSFET
  • HV Relays - Power Capacity
  • Switching frequency data not available
  • Voltage reference level - how to choose?

RSS Electro-Tech-Online.com Discussions

  • Adding Current Limit Feature to a Buck Converter
  • Background of Members Here
  • Passthrough charging-simple but impossible to achieve?
  • Opamp ciruit
  • DIY Mini 12v Router UPS malfunction
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering