Arduino Robotic Arm Controlled By Xbox 360 Wireless Controller

It is often said that robots may rule the world one day. And with the convenience and ease of making robots today within our private homes, we may not be too far away. In essence, each robotic project adds a new insight into the world of mechatronics. As such, the following article presents a simple way to control a robotic arm with an XBOX 360 wireless controller. This project was inspired by Barrett Anderies’ RC car controlled by a PS3 controller.

Requirements

To build this project you will need:

  • Arduino Uno ($23.25)
  • USB host shield for Arduino Uno ($15.99)
  • XBOX 360 controller ($16.00)
  • XBOX 360 Wireless adapter ($17.49)

If you do not have a robotic arm already:

SOFTWARE:

  • Autodesk Inventor 2014
  • Arduino IDE
  • USB Host Shield Library
  • Final Code uses XBOXRECV

Optional software: Fritzing: circuit drawing software

MECHANICAL:

  • Breadboard [400 pt]
  • Standard Servo

ELECTRICAL:

  • Jumper wires
  • Power source : 3000 mAh or higher, 7Volts or higher : preferably a NiMH Venom battery as shown in the photos
  • Jumper Wires
  • Electrical Tape

STEP 1 :Important parts to buy first

Xbox controller with adapter, Arduino UNO (with cable), USB host shield for Arduino UNO, a servo and wires are the core parts you should order right away. The reasoning; you want to make sure your Xbox controller, adapter, USB host shield, and Arduino all talk to each other nicely.

STEP 2 : Putting everything together

Buy the core material. The arrival date for some of these parts can vary; there is a joke in the engineering design community in which you buy what you need first and then you design later.

1. Connect Arduino USB host shield to Arduino UNO

2. Xbox 360 adapter to USB jack on the shield

Warning: Make sure to not force the pins down, gently wiggle USB host shield until pins are completely covered
NOTE: make sure it’s a Microsoft adapter

3. Yellow/ White wire of servo to digital pin 2
NOTE: The pins on the shield are the same as the Arduino pins that are directly below

4. Black/ Brown wire of servo to GND

5. Red / Orange wire of servo to 5V

6. GND from Arduino to GND rail

7. V_in from Arduino to Red rail

Your wiring should look like this:

8. Connect Out + [ of Regulator] to Red Rail

9. Connect Out – [of Regulator] to GND rail

10. Strip the other end of alligator clip (that came with battery charger) like so:

WARNING: make sure the wires cannot touch when in the terminal as shown (I used electrical tape).

VERY IMPORTANT:
The Regulator steps down the voltage so that the Arduino board and servos can work.The “Out” side of the regulator should read 4.8 – 6 Volts (depending on your servo). I have mine set at 5.5 V and it works well. – Do not just connect the regulator without turning the golden potentiometer (gold circle with arrow above it) to this voltage.

a. Connect red alligator clip to battery
b. Connect other end to In +
c. Connect black alligator clip to black battery
d. Connect other end to In –

If you wired everything right you should see the following:

STEP 3: Code

In order for your Xbox controller and adapter to talk to the USB shield and the Arduino, you will need to download the USB host shield library found here: https://github.com/felis/USB_Host_Shield_2.0 simply click “download zip” on right hand side.
NOTE : you can probably find other websites with the similar examples, just make sure you get the XBOXRECV, as this is the Xbox 360 wireless library needed.

Don’t know how to place new libraries in the Arduino IDE? Go here: Libraries
I have included many versions of the code as well as the final code. Barrett Anderies helped develop a PS3 code that has much smoother controls than that previous attempts. The previous attempts are to illustrate other possible routes to accomplish the same task; it’s a good idea to look over the commenting and approaches to broaden your perspective.

Six servo controller(Xbox360 Wireless)

Incremental control of Servo(s) Using Xbox 360 Controller

The code, by default, will output:
NOTE: you must press A to start the robot by the default code

Start-Stop Functions
A Starts Robot
B Safety Stop
Button Digital Pin
LT, RT 2
Right Hat Y 3
Left Hat Y 4
Left Hat Y 5
Left Hat X 6
Right Hat X 7

STEP 4 [Optional]: Build Complete AXIOM ARM or your own robotic arm

If you want to design a robotic arm from start to finish, then the following mechanical parts may be mechanical parts useful: download mechanical parts

1. Download Autodesk Inventor 2014

  • Go to: Autodesk to create a free profile
  • NOTE: When prompted, the material content library is useful but not necessary

2. Download AXIOM ARM Inventor Parts
3. The claws are ready to be 3D printed as is

However: the servo brackets may need adjustments. Amazon has a great servo bracket kit for $90, if you do not plan on designing and modifying the brackets parts;

Parts:

  • Polycase
  • Toggle Switch w/ Blue Light
  • 3D printed Parts
    • Buy SainSmart 17DOF Biped Black Educational Robot Kit
    • Or : 3D print parts (parts available below)
  • Rubber bands

Everything stays the same, the only difference is your circuit will look something like this:

ABOUT SERGEI DINES:
Sergei Dines is a mechanical engineer senior at USF, in FL. His interests include product design and robotics. He states, “going through the design process from scratch is very rewarding; it makes you think how everything is associated and forces you to ask help and connect with like-minded robotic enthusiasts”.
He would like to personally thank Barrett Anderies, Dr. Schlaf [USF], and Anthony Rose [USF] for their expertise.

Share:

Related Posts

Don't Miss Out!

Get the latest news, tutorials, reviews and more direct to your inbox when you subscribe!