Angry Robot

by daniel187 in Circuits > Robots

2492 Views, 6 Favorites, 0 Comments

Angry Robot

WP_20150414_12_36_26_Pro.jpg

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.

Parts List

  • 4xDC motors
  • 1xArduino Uno
  • 2xArduino Motor R3 Shields
  • Materials to build chassis and eyeballs (screws/bolts/tools/plastic/metal/wood etc..)
  • 2x red LEDs
  • Wires
  • 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

Disassembly of Old Robot

WP_20150414_12_51_46_Pro.jpg
WP_20150414_12_55_51_Pro.jpg
WP_20150414_12_56_01_Rich.jpg
WP_20150414_12_28_50_Rich.jpg

  1. Acquire 2 old robots with DC motors attached.
  2. Remove all circuitry and sensors leaving only DC motors and tires.
  3. Keep all screws, nuts and bolts for later use.

Chassis and Eyeball Assembly

WP_20150414_12_52_28_Pro.jpg
WP_20150414_12_28_02_Rich.jpg

  1. Use the two white rollers to attach the two robot platforms (drilling holes may be required).
  2. Securely attach using bolts from previous step
  3. Glue on two 5v red LEDs and twisted electrical tape to use as angry eyebrows on the two rollers

Attach Arduino, Ultrasonic Sensor, Switch, and Voltage Buses.

WP_20150414_12_29_28_Rich.jpg
WP_20150414_13_34_41_Pro.jpg
WP_20150414_12_26_20_Rich.jpg
WP_20150414_12_28_19_Rich.jpg
WP_20150414_12_27_45_Rich.jpg
  1. Attach an Arduino Uno on the back of the robot using standoffs (drilling may be required)
  2. Glue on Ultrasonic sensor to the front of the robot. (SRF-05)
  3. Drill a hole and screw on the toggle switch in a convenient position
  4. 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.
  5. Attach a wire from the 9v from the switch directly into the "Vin" pin on the Arduino
  6. From the switch create an 18v bus and a separate 5v bus (copper tape was used in this case) which will be used later.
  7. Create a ground bus in this step as well.

Attach 2xMotor Shields and DC Motors

552d61c2d535cfff8c000007.jpeg
WP_20150414_12_27_24_Rich.jpg
  1. Stack two Arduino Motor R3 shields onto the Arduino Uno
  2. Bend or cut the "Vin" pins on the motor shield such that they do not connect into the Arduino
  3. Attach a wire from the 18v bus to the "Vin" pin on each of the motor shields
  4. 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.
  5. Repeat step 4 above for the left side motors attaching to "B+" and "B-" pins instead on each motor shield.
  6. Attach the "GND" pin on each motor shield to the ground bus created in step 3 of the instructable.

Attach the Arduino Wireless SD Shield

WP_20150414_14_09_37_Rich.jpg
552d64d5d535cf3ef8000090.jpeg
  1. Directly stack the Arduino Wireless SD Shield onto the stack of the motor shields.
  2. Attach a wire from the "5V" pin on the wireless shield to the 5v bus created in step 3 of the instructable.
  3. Attach a wire from the ground bus created in step 3 of the instructable to the "GND" pin on the wireless shield.

Other Wiring

  1. Attach the negative of the 2 eyeball LEDs the the ground bus and the positive to the 5v bus with a 33ohm resistor.
  2. 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.

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.

Downloads

Xbox Controller Setup

WP_20150414_14_34_54_Rich.jpg
  1. Connect an XBee to a XBee Stamp and plug into your computer through USB
  2. Connect your Xbox One controller through a micro USB cable to your computer.
  3. Download attached program and run the program using Visual Studio.

Driving the Angry Robot

Angry Robot!
  1. Cut a hole in a box (jk).... lol
  2. Toggle switch on the robot to on.
  3. Wait for communication lights on XBee Stamp
  4. Use Xbox controls to drive robot

Xbox Controls

  • RT - Forward Speed Control
  • LT - Reverse Speed Control
  • A - Brake
  • Left Analog Stick - Direction Control