Gesture Controlled Robot Using Arduino

This gesture controlled robot uses Arduino,ADXL335 accelerometer and RF transmitter-receiver pair.

We will divide the entire robot into 3 parts the transmitter,the receiver and the robot.

The different gestures that have been mapped to the direction of the bot are-

Hand parallel to the ground-stationary

Hand tilted forward-forward

Hand tilted backward-backward

Hand tilted right-right

Hand tilted left-left

I've made the transmitter on thermocol though it can also be made on a glove.

All the code, schematics and other pictures in one place are available here.

Step 1: Materials Required

For transmitter-

  1. Arduino Uno
  2. ADXL335 accelerometer
  3. 433 MHz RF transmitter
  4. Breadboard

For receiver and robot-

  1. Arduino Uno
  2. 433 MHz RF receiver
  3. L293D motor driver IC
  4. Chassis and wheels
  5. 2 DC motors
  6. Breadboard

Of course you will also need jumper wires and 9V batteries

Instead of using the Arduino and breadboard in transmitter like I did ,you may instead use an ATMega328p, which can be programmed from the Arduino board and solder it along with RF transmitter and ADXL335 on a perfboard.

The perfboard can then be attached to a glove.However here I've used a remote controller like setup with the gestures the same

Step 2: Assembling the Robot

Fix the wheels on the chassis.

Mount the DC motors on the back wheels and use dummy wheels for the front.

Mount the L293D IC on the breadboard and place it on the chassis

Place the Arduino on the chassis and make the connections of L293D as follows

4,5,12,13 to GND

1,9,16 to VCC(5V)

3,6 to left motor(output)

11,14 to right motor(output)

2,7,10,15 to pins 8,9,10,7 of Arduino(inputs)

8 to 9V battery

Step 3: Determining the Direction of Robot

You can learn more about L293D from internet.

Basically ,the motor rotates when the inputs supplied are opposite.

For example high,low may rotate the motor in clockwise while low,high in anti clockwise.

If both inputs are same then motor does not rotate.

The sketch in test.ino will help to determine for what inputs for the 2 motors will the robot move forward. Copy and paste the code in test.ino it in Arduino IDE

In my case it was observed that the bot will move forward pin 9 of Arduino is high,pin 8 is low(for left motor),pin 10 is high,pin 7 is low(for right motor).Try different combinations till you get desired direction. Similarly for moving back the combination is high,low,low,high.The bot will go right if left motor is moving and right is stopped by giving same inputs.Similarly for left.

Step 4: Interfacing ADXL335 With Arduino

Mount the ADXL335 and on the breadboard.

The connections to Arduino should be as follows.The Arduino should be different from the one used in step 2

ADXL335 ARDUINO

VCC 3.3 V

GND GND

X A0

Y A1

Z open

ST open

Now copy and paste the code in adxl335interface.ino and determine the threshold values for different gestures.

The code gives 2 values xval and yval which will have unique values for different gestures.

Determine the range of values of xval and yval when the hand is tilted forward,backward etc.

Step 5: Interfacing RF Transmitter With Arduino

Mount the RF transmitter on the breadboard in previous step and make connections as follows.

RF transmitter Arduino

GND GND

DATA D12

VCC 5V

Now download the VirtualWire library from the following link

http://www.pjrc.com/teensy/td_libs_VirtualWire.htm...

Extract the VirtualWire folder from the downloaded folder and paste it in arduino-1.6.1>libraries

Now program the arduino of the transmitter with the code given in transmitter.ino.

Basically what the code does is to map the different threshold values (for gestures) obtained in step 4 to different letters (stationary-'s' forward -'f' etc) which are then transmitted through the RF transmitter.

This step completes the construction of the transmitter

Step 6: The Receiver

Mount the RF receiver on the breadboard of step 2.The connections to the Arduino used in step 2 are

RF receiver Arduino

VCC 5V

DATA D11

GND GND

Now program the Arduino with the code given in receiver.ino.

The code maps the different letters obtained from the receiver to the inputs for directions.

For instance if the receiver receives the letter "f" corresponding to the bot moving forward,it maps the letter "f" with the inputs low,high,high,low which are the required inputs for the bot to move forward.

Step 7: Run the Robot

Go to this repository to download the code and schematics.Click on the "Clone or Download" button (green in color on the right side) and select "Download ZIP" to download the zip file.Now extract the contents on your computer to get the code and schematics(in the schematics folder).

The gesture controlled robot is now complete.

Connect 9V batteries to both the Arduinos and the L293D motor supply and run the robot.

I've also added functionality by which the on board led on pin 13 of both the Arduinos is on when the bot is moving and off when it's stationary.You may add more such functionality.

Any doubts and connections be clarified by seeing the comments in the given code.

I've posted a video of the robot below.

5 People Made This Project!

Recommendations

  • Big and Small Contest

    Big and Small Contest
  • First Time Author

    First Time Author
  • Toys Contest

    Toys Contest

73 Discussions

0
None
FarooqA30

7 months ago

Thank You

0
None
RagavK1

Question 8 months ago on Introduction

How to connect the batteries in the receiver part?

1
None
vishalvermamupparapu1

Question 10 months ago

Able to transmit but at the reviever module no result.....any help is admirable.

0
None
lourdur2

11 months ago

When trying to upload the code onto the arduino board, it is asking to enter "teensy board" manually. If anyone has completed using the same process, kindly provide some information regarding this.

Do we need to buy a teensy board to complete by this procedure?

Do

0
None
RupinderS3

1 year ago

anyone intrested in making this project i will help you contact at rupindersi234@outlook.com

1 reply
0
None
DivyamYRupinderS3

Reply 1 year ago

bro when i am uploading the receiver and transmitter code ,, errors are coming as ...exit status1... pls help me ... i have to present it by tomorrow ... pls help bro

0
None
mayank gupta

1 year ago

hello sir i m facing problem in compling transmission and receiver.. it says virtualwire library not found. how to fix this plz help me asap i have to submit my project tomorrow in colllege.

0
None
BhuvanG2

1 year ago

i am doing with l298n, can the same code be used?? please answer fast..thanks

0
None
WihangaD

1 year ago

plz bro give me quick

0
None
WihangaD

1 year ago

i want all receiver and transmitter code personally on wihangadeshan2001@gmail.com
plz give me quick

0
None
WihangaD

1 year ago

i want all the receiver and transmitter code personally on wihangadeshan2001@gmail.com
plz give me qui

0
None
Abidarian

1 year ago

i tried a lot but its not working.....................................plz help i am quite frustated

contact me at sayyad.abid16@gmail.com

0
None
rojar4

1 year ago

hai! can ypu please explain me why did you take 0x73,0x66,0x72,0x63 etc in the receiver code

0
None
Ibtehaj Ali

1 year ago

I am trying my best to make this project
But finally when I try to burn the given code on uno then there was an error about code.
So basically the given code is not correct
Please send me the receiver and transmitter code personally on ibtehajali6@gmail.com

0
None
Ibtehaj Ali

1 year ago

I am trying my best to make this project
But finally when I try to burn the given code on uno then there was an error about code.
So basically the given code is not correct
Please send me the receiver and transmitter code personally on ibtehajali6@gmail.com

0
None
mitchellecreado

1 year ago

i need a code for this ardino connection make .... please send it as soon as possible

0
None
vasanth123

1 year ago

please send me a code and circuit connection vasanthock12@gmail.com

0
None
vasanth123

1 year ago

I NEED CODE VERY URGENT FOR TRANSMITTER AND RECEIVER AND CONNECTION DIAGRAM WITH EACH AND EVERY STEP

0
None
Abidarian

1 year ago

Dry it's sayyad.abid16@gmail.com

0
None
Abidarian

1 year ago

Plz can I get the complete code plzplzplz on sayyad.abid@gmail.com
Plz send it me on given e mail