Friday, December 19, 2014

How to Make Master and Slave Robot control

If you are thinking to make a Master and slave robot or planning to create a  swarm robot or copying robot, If you don't have any idea of how to make this robot and a novice like me. This is a perfect example to get start with. A cool robot to make at home without much effort. As these robots does not share any intelligence between these two but a Master robot ( controlled by the human) will control the another robot (slave robot). We can add some intelligence and makes these robots to complete a task by cooperating each other during work course. 

I've used One Master and a Slave bot, there is no limitation as we can extend many number of slaves as we want and make the robot to move in a synchronized motion. 

Components Required.

1x Arduino uno
1x Bluetooth Module (I used HC-05)
2x Chasis
2x Breadboard
1x RF transmitter Module
1x RF receiver module
4x Wheels
4x Motors
2x 9v batteries
2x L293D (Motor driver)
connecting wires

The Master Robot is going to control from a Android device. we need a android device and an app to control our master robot. we don't need to rely on 3rd party apps to control our robot lets make our own app to control our robot. check the step by step video to know how to make android app using MIT app inventor.  You can also download the app from the link here



Robot circuit Diagram:

Master Robot Circuit:


Master Robot Program:

____________________________________________________________________________________

#include <SoftwareSerial.h>

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

void setup() {
 BT.begin(9600);
 Serial.begin(9600);
  pinMode (2, OUTPUT);
  pinMode (3, OUTPUT);
  pinMode (4, OUTPUT);
  pinMode (5, OUTPUT);
  pinMode (6, OUTPUT);
  pinMode (7, OUTPUT);
  pinMode (8, OUTPUT);
  pinMode (9, 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(8, HIGH);
    digitalWrite (9, HIGH);
    digitalWrite(6,LOW);
    digitalWrite(7,LOW);
    digitalWrite(2, HIGH);
    digitalWrite (3, HIGH);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    delay(100);
  } 
  
  else if(readvoice == "reverse") 
  {
    digitalWrite(8, LOW);
    digitalWrite (9, LOW);
    digitalWrite(6,HIGH);
    digitalWrite(7,HIGH);
    digitalWrite(2, LOW);
    digitalWrite (3, LOW);
    digitalWrite(4,HIGH);
    digitalWrite(5,HIGH);
    delay(100);
  }
  
  else if (readvoice == "right")
  {
    digitalWrite(8, LOW);
    digitalWrite (9, HIGH);
    digitalWrite(6,LOW);
    digitalWrite(7,LOW);
    digitalWrite(2, LOW);
    digitalWrite (3, HIGH);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    delay (100);
    
  }
  
 else if ( readvoice == "left")
 {
   digitalWrite(8, HIGH);
    digitalWrite (9, LOW);
    digitalWrite(6,LOW);
    digitalWrite(7,LOW);
    digitalWrite(2, HIGH);
    digitalWrite (3, LOW);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
   delay (100);
 }

 else if (readvoice == "stop")
 {
digitalWrite(8, LOW);
    digitalWrite (9, LOW);
    digitalWrite(6,LOW);
    digitalWrite(7,LOW);
    digitalWrite(2, LOW);
    digitalWrite (3, LOW);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
   delay (100);
 }

   

readvoice="";}} //Reset the variable

_____________________________________________________________________________________


Slave Robot Circuit:



No program Required for slave robot.

check out the wireless robot without microcontroller to know about RF Circuits here

PS: use same chassis, RPM motor, Battery rating, as I had different chassis and motor the robot movement was not synchronized. 

22 comments:

  1. what kind of Radio frequency i need ??

    ReplyDelete
  2. whats the voltage of the motors?

    ReplyDelete
  3. i need master slave code of avr microcontroller plz help me

    ReplyDelete
  4. I like the way you have presented about making Master and Slave Robot control. The work you done in this blog is really fantastic. I wish you luck and success for future and thank you for sharing with us.

    Robot installation

    ReplyDelete
  5. Good topic, this is going to help a lot of people get the whole concept
    castor wheel

    ReplyDelete
  6. with out human interference can a master robot control itself and do it's task on it's own

    ReplyDelete
  7. please post it back I need your help in my project

    ReplyDelete
  8. Thanks for sharing this informative article. I am an engineering student who wants to submit my project as this is my final year, but after reading your post I thought of making a robot as my project.
    Gadgetsupersite

    ReplyDelete
  9. What type of transmitter and reciever did u use, my reciever has 4 pins and those pins have 2 data pins, one vcc and one gnd, but for urs u had enough for power and analog pins and my transmitter has 3 pins which say atad, vcc and gnd, how come?

    can u please help me?

    ReplyDelete
  10. i would like to know the name of the rf transmitter and receiver

    ReplyDelete
  11. Really excellent information regarding the making of master and slave robot control given in this blog. It was really amazing.
    robotics courses

    ReplyDelete
  12. which RF did u use? Mine is completely different!

    ReplyDelete
  13. which RF Transmitter Reciever model did you use

    ReplyDelete
  14. what kind of RF TX and RX do you used?

    ReplyDelete
  15. Really excellent information regarding the making of master and slave robot control given in this blog. It was really amazing.Share Your Thoughts on Different technology guest post

    ReplyDelete
  16. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.
    5g

    ReplyDelete
  17. Great post i must say and thanks for the information on Robotics Education .

    ReplyDelete
  18. Can anyone tell me which app is used to design , the circuit diagram

    ReplyDelete