How to Make Gesture Controlled Robot:
Have a look at the video to view the Robot in action.......
Have a look at the video to view the Robot in action.......
Now you would be curious to know how to make one yourself. So here we will tell you step by step guide to make one such robot yourself.
STEP 1:
To begin with, you need to collect the components required to make the robot. The desired components are listed below. You can buy the components buy visiting the links given infront of them:
1. Arduino Mega: Arduino Mega
2. Accelerometer: Accelerometer
3. L293D Motor Driver or Motor Driver Shield: Motor Driver Shield
4. Robot Car Chassis. Robot Chassis
5. Connecting Wires. Connecting Wires
6. Nuts and Bolts: Nuts and Bolts
7. Battery. 9V Battery
8. RF Module: RF Module RF Module Circuit
9. Potentiometer. Potentiometer
10. LM324N IC. LM324N IC
STEP 2:
After collecting the components, Assemble the robot chassis firmly. The robot chassis should be rigid enough so that the robot car follows the straight line path while in motion.
STEP 3:
after assembling the chassis you need to connect the circuit of the motor driver as well as the RF Module together. The pin diagram for L293D is given here. Connect the wires accordingly to make the circuit.
The sample circuit is shown here:
Now connect the RF Module circuit together so that it helps to transfer the data from the accelerometer to the arduino.
The completed circuit is shown here:
To connect accelerometer, you need LM324N IC and potentiometers to tune the output. The circuit is shown below:
Now all the circuits are completed. Now we need to connect the input received by receiver to the arduino.
STEP 4:
Now connect the pins to the arduino. I selected the following pins for Connections:
Arduino Pin 2 L293D Input 1
Arduino Pin 3 L293D Input 2
Arduino Pin 4 L293D Input 4
Arduino Pin 5 L293D Input 5
Arduino Pin 8 RF Receiver Pin 1
Arduino Pin 9 RF Receiver Pin 2
Arduino Pin 10 RF Receiver Pin 3
Arduino Pin 11 RF Receiver Pin 4
After the connections are made, power the circuit with 9V batteries. Thus your electrical arrangement for the robot is complete.
STEP 5:
Arduino Coding:
void forward() // function to move the bot forward
{
digitalWrite(2,150);
analogWrite(3,0);
analogWrite(4,0);
analogWrite(5,150);
}
void backward() // function to move the bot backward
{
analogWrite(2,0);
analogWrite(3,150);
analogWrite(4,150);
analogWrite(5,0);
}
void left()
{
analogWrite(2,0); // function to move the bot left
analogWrite(3,0);
analogWrite(4,150);
analogWrite(5,0);
}
void right() // function to move the bot right
{
analogWrite(2,0);
analogWrite(3,150);
analogWrite(4,0);
analogWrite(5,0);
}
void stopp() // function to stop the bot
{
analogWrite(2,0);
analogWrite(3,0);
analogWrite(4,0);
analogWrite(5,0);
}
void setup() {
pinMode(8,INPUT); // reading input from the rf receiver
pinMode(9,INPUT);
pinMode(10,INPUT);
pinMode(11,INPUT);
digitalWrite(8,LOW); // writing low on the input pins.
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,LOW);
pinMode(2,OUTPUT); // output pins for motors
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
}
void loop() {
if(digitalRead(8)==0 && digitalRead(9)==1 && digitalRead(10)==1 && digitalRead(11)==1)
{
while(digitalRead(8)==0 && digitalRead(9)==1 && digitalRead(10)==1 && digitalRead(11)==1)
{
left();// moves bot left till the input is received
}
}
else if(digitalRead(8)==1 && digitalRead(9)==0 && digitalRead(10)==1 && digitalRead(11)==1)
{
while(digitalRead(8)==1 && digitalRead(9)==0 && digitalRead(10)==1 && digitalRead(11)==1)
{
right();//same as above
}
}
else if(digitalRead(8)==1 && digitalRead(9)==1 && digitalRead(10)==0 && digitalRead(11)==1)
{
while(digitalRead(8)==1 && digitalRead(9)==1 && digitalRead(10)==0 && digitalRead(11)==1)
{
forward(); // same as above
}
}
else if(digitalRead(8)==1 && digitalRead(9)==1 && digitalRead(10)==1 && digitalRead(11)==0)
{
while(digitalRead(8)==1 && digitalRead(9)==1 && digitalRead(10)==1 && digitalRead(11)==0)
{
backward(); // same as above
}
}
else if(digitalRead(8)==1 && digitalRead(9)==1 && digitalRead(10)==1 && digitalRead(11)==1)
{
while(digitalRead(8)==1 && digitalRead(9)==1 && digitalRead(10)==1 && digitalRead(11)==1)
{
stopp(); // same as above
}
}
}// loop ends
Upload the above given code onto your Arduino board and your Robot is ready to Run.
Enjoy making your own robot and Happy Learning. Do share the video is it was helpful to you. :)








Comments
Post a Comment