This instuctable will show you how to build an angry robot. This robot is controlled using an xbox one controller, connected to a pc, transmitting using XBee transceivers allowing for a 3km range.
- 4xDC motors
- 1xArduino Uno
- 2xArduino Motor R3 Shields
- Materials to build chassis and eyeballs (screws/bolts/tools/plastic/metal/wood etc..)
- 2x red LEDs
- 1xUltrasonic Sensor (SRF-05)
- 3x 9v Battery clips
- 1xArduino SD wireless Shield
- 2xXBee Pro S2B Transceivers
- 1xMaxStream XBIB-U Rev 3 Stamp
- 3x9V Batteries
- Copper Tape
- 2x33ohm resistors
- 1x DoubleToggle Switch
- 1xXbox One Controller
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Disassembly of Old Robot
- Acquire 2 old robots with DC motors attached.
- Remove all circuitry and sensors leaving only DC motors and tires.
- Keep all screws, nuts and bolts for later use.
Step 2: Chassis and Eyeball Assembly
- Use the two white rollers to attach the two robot platforms (drilling holes may be required).
- Securely attach using bolts from previous step
- Glue on two 5v red LEDs and twisted electrical tape to use as angry eyebrows on the two rollers
Step 3: Attach Arduino, Ultrasonic Sensor, Switch, and Voltage Buses.
- Attach an Arduino Uno on the back of the robot using standoffs (drilling may be required)
- Glue on Ultrasonic sensor to the front of the robot. (SRF-05)
- Drill a hole and screw on the toggle switch in a convenient position
- Solder one 9v battery clip to the first connectors on the switch, and 2x9v battery clips in series to the other connectors on the switch such that when the switch is turned on the 9v and 18v power supplies are turned on.
- Attach a wire from the 9v from the switch directly into the "Vin" pin on the Arduino
- From the switch create an 18v bus and a separate 5v bus (copper tape was used in this case) which will be used later.
- Create a ground bus in this step as well.
Step 4: Attach 2xMotor Shields and DC Motors
- Stack two Arduino Motor R3 shields onto the Arduino Uno
- Bend or cut the "Vin" pins on the motor shield such that they do not connect into the Arduino
- Attach a wire from the 18v bus to the "Vin" pin on each of the motor shields
- Attach the front right DC motor to the "A+" and "A-" pins on the bottom motor shield, and the rear right DC motor to the "A+" and "A-" on the top motor shield.
- Repeat step 4 above for the left side motors attaching to "B+" and "B-" pins instead on each motor shield.
- Attach the "GND" pin on each motor shield to the ground bus created in step 3 of the instructable.
Step 5: Attach the Arduino Wireless SD Shield
- Directly stack the Arduino Wireless SD Shield onto the stack of the motor shields.
- Attach a wire from the "5V" pin on the wireless shield to the 5v bus created in step 3 of the instructable.
- Attach a wire from the ground bus created in step 3 of the instructable to the "GND" pin on the wireless shield.
Step 6: Other Wiring
- Attach the negative of the 2 eyeball LEDs the the ground bus and the positive to the 5v bus with a 33ohm resistor.
- From the Ultrasonic sensor pins attach "Vcc" to the 5v bus. Attach "TRIG" to pin "7" on the wireless shield. Attach "ECHO" to pin "8" on the wireless shield. Attach "GND" to the ground bus.
Step 7: Arduino Code
1. Remove XBee transceiver as the Arduino will not upload code with it plugged in
2. Download the attached Arduino code and upload the code to the Arduino Uno.
3. Reattach Xbee transceiver.
Step 8: Xbox Controller Setup
- Connect an XBee to a XBee Stamp and plug into your computer through USB
- Connect your Xbox One controller through a micro USB cable to your computer.
- Download attached program and run the program using Visual Studio.
Step 9: Driving the Angry Robot
- Cut a hole in a box (jk).... lol
- Toggle switch on the robot to on.
- Wait for communication lights on XBee Stamp
- Use Xbox controls to drive robot
- RT - Forward Speed Control
- LT - Reverse Speed Control
- A - Brake
- Left Analog Stick - Direction Control