Introduction: Accelerometer Controlled, Head Tracking Rover



This project was a combination of multiple ideas that have all come together to create one awesome rover.   The Rover is controlled using a watch equipped with an accelerometer to track the movements and tilting of the wrist.  The rover will move forward if the wrist is tilted forward, backward when tilted backwards and so fourth.  This rover is also equipped with a camera mounted on a pan and tilt servo that will move based on the head movements of the user.  Finally there is a heads up display unit for the person controlling the rover that will have a live camera feed from the rover.   

Parts List:
- 1x    3-axis accelerometer (https://www.sparkfun.com/products/9836)
- 2x   Arduino Uno (https://www.sparkfun.com/products/11021)
- 1x   Traxxer Rover Platform
- 1x   Seeedstudio Motor Driver Board
- 2x  12V Lipo Battery (Look on HobbyKing.com for good options)
- 2x   xBee Transmitter/Receiver (https://www.sparkfun.com/products/8665)
- 1x   9DOF module (We got ours off of eBay)
- 1x   MyVu Personal Video Glasses
- 1x   Mini Wireless Color Camera
- 1x   Pan/Tilt Servo Mount (http://www.amazon.com/SparkFun-Pan-Tilt-Bracket/dp/B007R9TSIC/)
- 2x   Generic Servo (https://www.sparkfun.com/products/9065)
- 1x   Ultrasonic sensor (http://www.maxbotix.com/Ultrasonic_Sensors/MB1403.htm)
- 1x   Push Button
- Solid Core Wrap Wire (https://www.sparkfun.com/products/8031)

Total Budget: $458

Step 1:

Step 2: Assemble Rover Platform



The first thing you need to build this rover is a functioning rover itself.  To do this use the Rover kit described above(or a similar rover kit) and program your Arduino and motor shield to drive the motors (See tutorial on http://www.adafruit.com/products/81).  Once you can control your rovers motions (front, back, left, light, bank left and right) via serial commands you can move on to the next step.

Step 3: Accelerometer Control

After you have the working rover the next step will be to use your 3 axis accelerometer to control it.  To do this you can follow the tutorial on the Sparkfun page listed on the parts list.  Once you receive correct values from the accelerometer you have to map them to commands that your rover can understand.  How we did this was to have different coordinates map to the 6 different commands.  For example anything between 0 and 10 for x and y was a dead zone(no movement) and if x > 10 and y < 10 then the rover receives the forward command and so on. 

Step 4: Ultrasonic Sensor Stop





Next you mount an ultrasonic sensor to the front of the rover and give it a threshold value that it will stop the motors.  This sensor will prevent the rover form crashing into anything head on.  

Step 5: Wireless Communication

Using two Arduinos, The one on the rover and one hooked up to the accelerometer.  For the wireless transmission we used XBee transmitter and receiver to send the same commands over serial, just through the XBee. 

Step 6: Pan and Tilt

Next assemble your pan and tilt servo and make sure that your servos are zeroed in a position that you want.  The next battle is getting the 9DOF chip to control the servo's movements for head tracking.  We used this (https://github.com/ptrbrtz/razor-9dof-ahrs/wiki/Tutorial) tutorial to get the 9DOF chip programmed to track head motion correctly, then mapped the values from the -180 to 180 range to vales between 20 and 160.

Step 7: Sending 9DOF Commands

After you have head control working, the next step is to integrate the head tracking into the XBee transmission.  A good way to do this is to create a string to send over serial that contains characters that encode values from the accelerometer and 9DOF to go to the motors and servos.  Then simply write a parsing function for Arduino on the rover to take in the command and execute them. 

Step 8: Video Transmission

The last piece to this puzzle is to add the video camera, transmitter, and receiver.  For this, mount your webcam on the pan and tilt servos and connect it to the transmitter.  On the other end hook up your receiver's composite feed to your video glasses.  Once they are on the same channel you should receive a video feed. 

Step 9: Battery Power

Finally you must giver everything a battery power supply.   Once the rover is independently powered you are good to go! Have fun exploring the surface of the earth with your wrist controlled, head tracking rover! 

Final Notes:  We created our own breakout board on the rover to make wiring all of the different components easier and more reliable, we strongly recommend this.  Also we soldered our own wiring harness for the user side to create a very reliable and durable wiring platform. 

How To Document:  https://docs.google.com/a/smcm.edu/document/d/12z4w0K8nnj2-5Rq2PT8j_Pr3ynnmg9kSMhDgQTcwlm0/edit
Code:

     -User Side:
          - http://pastebin.com/vXf161WS
          - http://pastebin.com/dFL2tVeG
          - http://pastebin.com/YSNkYDWQ
          - http://pastebin.com/cmDaB5nv
          - http://pastebin.com/yUbTDyiS
          - http://pastebin.com/7f8UiRbe
          - http://pastebin.com/B3yexxpS
          - http://pastebin.com/0ezGYuDF

     - Rover Side: 
          -http://pastebin.com/U25nVFN1

Supercharged Contest

Participated in the
Supercharged Contest