Thursday, November 6, 2014

This post is about making a simple Android voice control Arduino Bot


Required Components:

Arduino Uno 
Bluetooth Module
L293D Motor Driver
2x Gear Motor
2x Wheel
1x Chasis
A breadboard 
Connecting wires






Arduino Program for voice control robot.
_________________________________________________________________________________

#include <SoftwareSerial.h>

SoftwareSerial BT(10, 11); //TX, RX respetively
String readvoice;

void setup() {
 BT.begin(9600);
 Serial.begin(9600);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);

}
//-----------------------------------------------------------------------//
void loop() {
  while (BT.available()){  //Check if there is an available byte to read
  delay(10); //Delay added to make thing stable
  char c = BT.read(); //Conduct a serial read
  readvoice += c; //build the string- "forward", "reverse", "left" and "right"
  }
  if (readvoice.length() > 0) {
    Serial.println(readvoice);

  if(readvoice == "forward")
  {
    digitalWrite(3, HIGH);
    digitalWrite (4, HIGH);
    digitalWrite(5,LOW);
    digitalWrite(6,LOW);
    delay(100);
  }

  else if(readvoice == "reverse")
  {
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    digitalWrite(5, HIGH);
    digitalWrite(6,HIGH);
    delay(100);
  }

  else if (readvoice == "right")
  {
    digitalWrite (3,HIGH);
    digitalWrite (4,LOW);
    digitalWrite (5,LOW);
    digitalWrite (6,LOW);
    delay (100);
 
  }

 else if ( readvoice == "left")
 {
   digitalWrite (3, LOW);
   digitalWrite (4, HIGH);
   digitalWrite (5, LOW);
   digitalWrite (6, LOW);
   delay (100);
 }

 else if (readvoice == "stop")
 {
   digitalWrite (3, LOW);
   digitalWrite (4, LOW);
   digitalWrite (5, LOW);
   digitalWrite (6, LOW);
   delay (100);
 }
readvoice="";}} //Reset the variable

_________________________________________________________________________________



A step by step video tutorial for making your own android app using MIT app Inventor

Click here to download Android app

This is a simplified version of any other voice control robot, No complex coding easy to understand coding with easy algorithm.

The app is developed in such a way that it convert the voice command to text and transfer the text to the connected Bluetooth device.

The bluetooth connected on the Arduino board receives text from the Android app as characters and stored them as string to the assigned String.

There are words pre-programmed  (forward, reverse, right , left and stop) to the arduino , whenever the received text matches with the pre-programmed words ,the arduino executes the command that assigned to the words.

Arduino can connect to Laptop to monitor serial communication and check the working process and the words received by the Bluetooth.

click here to know how to make android app for voice control robot and other devices

22 comments:

  1. nice project.....I think I can do it very easily

    ReplyDelete
  2. someone help me please :( i had made it same like that.. but the wheels couldn't spin sunch as in those video.. i used dc motor 12 volt for wheels.. i don't know am i wrong? or is that need another dc motor? if dc motor, what dc motor should i buy?

    nb : the word is detected well in serial monitor when i'm talk...

    ReplyDelete
  3. excellent bro. it is very important. thanks

    ReplyDelete

  4. Error message:
    Sketch uses 6,554 bytes (20%) of program storage space. Maximum is 32,256 bytes.
    Global variables use 344 bytes (16%) of dynamic memory, leaving 1,704 bytes for local variables. Maximum is 2,048 bytes

    ReplyDelete
  5. sketch_may18a:18: error: 'class SoftwareSerial' has no member named 'available'
    why happened this kind of issue ?

    ReplyDelete
  6. I want the contact number inorder to make contact about the details of this project.

    ReplyDelete
  7. I really enjoyed reading this post, big fan. Keep up the good work andplease tell me when can you publish more articles or where can I read more on the subject? ai magazine

    ReplyDelete
  8. coding not working give working code

    ReplyDelete
  9. bro..what are the specifications of your motor..please reply me in two days..not having much time to complete this...

    ReplyDelete
  10. Brother I got some error like error 516 broken pipe...What I do now please help me...And send me the answer to my mail
    ravikumarmanuri9@gmail.com

    ReplyDelete
  11. can you give me the source code for the android App

    ReplyDelete
  12. I together with my buddies have already been examining the good solutions found on your website and then all of a sudden I had an awful feeling I never expressed respect to the blog owner for those tips. All of the young boys are actually excited to learn them and now have very much been loving them. Thanks for genuinely simply helpful and then for deciding upon certain tremendous topics millions of individuals are really desirous to understand about. Our own honest apologies for not expressing gratitude to earlier. speech recognition software

    ReplyDelete
  13. Nice information thanks for sharing | Now use these amazing extend kits to add voice control to other robots. Presenting this educational Robot Kits for Kids that can be easily used with Hexbugs, Lego Robotics, Vex Robotics, racing cars, toys and more.

    ReplyDelete
  14. Nice information thanks for sharing | Now use these amazing extend kits to add voice control to other robots. Presenting this top educational Robot Kits for Kids that can be easily used with Hexbugs, Lego Robotics, Vex Robotics, racing cars, toys and more. Educational robots for kids

    ReplyDelete