Robot controlled using XBOX controller and keyboard
Project for the ECE4180 course at Georgia Tech. By Nicole Henry, Andrew Ross and Guillaume Mourozeau.
Picture of the project & Descriptive chart
Description
This project allows a user to control a robot using an XBOX controller and a keyboard. A windows GUI developed in C# with Visual Studio also permits to drive the robot. The GUI includes a VLC plug-in that allows to connect a camera via WI-FI, and IR sensors information.
This notebook details the equipment, wiring, and code to create this project.
Presentation of the parts & Wiring
In this section we present the different parts we are using for this project. The overall schematic is shown on the next figure.
DC motors & H-bridge
Two DC motors an a Toshiba’s TB6612FNG dual H-bridge are used.
mbed | Dual H-Bridge | DC motors | Battery |
---|---|---|---|
Vin | Vmot | + (5V) | |
GND | GND | - | |
Vout (3.3V) | Vcc | ||
p17 | AIN2 | ||
p18 | AIN1 | ||
p19 | BIN2 | ||
p20 | BIN1 | ||
p24 | PWMA | ||
p25 | PWMB | ||
Vout (3.3V) | /STBY | ||
A01 | Left-red | ||
A02 | Left-black | ||
B01 | Right-red | ||
B02 | Right-black |
IR sensors
Sharp GP2Y0A21YK IR proximity distance sensors are used to avoid obstacle in automatic mode.
mbed | Sensor Right | Sensor Left |
---|---|---|
VU (5V) | red | red |
GND | Black | Black |
P15 | Yellow | |
P16 | Yellow |
Xbee chips
Two S2 Xbee chips from Digi International (with Sparkfun breakout) are used to communicate from the computer to the robot, using therefore two MBEDs. Both are connected the same way. In order to be able to communicate, the chips need to be programmed using the software XCTU from Digi International.
Xbee chip from Digi International
mbed | Xbee Chip |
---|---|
Vout (3.3V) | Vin |
GND | GND |
P8 | RTS |
P9 (serial TX) | DIN |
P10 (serial RX) | DOUT |
XBOX controller
One of the key part of the project is to drive the robot with a XBOX controller via USB. To do that, we have used the Microsoft XNA Framework. This framework is a set of tools with a managed runtime enviroment made by Microsoft for video game development. XNA is based on the .NET framework. It includes a large collection of class libraries that are specific to game development including sensing controller input. To be able to use this framework in visual studio we followed the instructions at the website below.
rbwhitaker.wikidot.com/setting-up-xna
GUI
The GUI made with Visual Studio in C# allows you to control the robot. The project does not work without it as the GUI gets the information from the XBOX controller. Here are the few steps to use it:
1. Download the Visual Studio project LiveXboxRobot.
2. Connect the mbed_PC to your PC.
3. Launch the GUI.
4. Select the correct COM port and click on "Open COM port".
Hello World
Here are the steps for the demo:
1. Run the application XLiveRobot to access the GUI.
2. In the GUI: choose the correct COM port too communicate and enter the URL of your camera to access the video.
3. Download and Compile the programs: one for the mbed connected to the computer and the other one for the mbed connected to the robot.
4. Connect your Xbox controller to your computer and have fun!
Import programProject_mbedPC
1st Version of LiveXboxRobot. Mbed connected to PC.
Import programProject_mbedRobot
1st Version of LiveXboxRobot project. Robot side.
Please log in to post comments.