Picture of Simple Arduino Robotics Platform!
I just got an Arduino after playing around with some AVR microcontrollers during Robotics team meetings.  I liked the idea of a really cheap programmable chip that could run just about anything from a simple computer interface so I got an Arduino because it already has a nice board and USB interface.  For my first Arduino project, I dug up a Vex Robotics kit I had laying around from some competitions I did in high school.  I had always wanted to make a computer driven robotics platform but the Vex microcontroller requires a programming cable that I didn't have.  I decided to use my new Arduino (and maybe later a bare AVR chip if I get it working) to drive the platform.  Eventually I want to get a netbook and then I can drive the robot using WiFi and view its webcam remotely.

I managed to get a decent serial protocol and a simple example that drives the robot using an Xbox 360 controller connected to a Linux PC.

Step 1: What it can do...

Picture of What it can do...
The Arduino is a very versatile platform.  My basic goal was just to get the Arduino to interface two Vex motors to the PC, but I had a lot of leftover input/output pins and decided to add some extra stuff.  Right now I have an RGB LED for serial port status (green if packets are good, red if they are bad) and a PC fan driven by a transistor.  I can also add switches and sensors but I didn't put any of those on it yet.

The best thing about it is that you can add whatever you want to an Arduino robot.  It only takes a little bit of interface code to control extra stuff and get input to the computer.

Gelfling63 years ago
Very nice! I've been tinkering with a VEX tank robot I converted to Arduino myself.. (Since (a) the VEX 1.0 programmer software went crassh with an old laptop, and (b) Innovation-FIRST doesn't seem to want to activate 1.0 anymore, and 2.0 costs $99 still.) Someone out there posted a hack of the VEX RC receiver, which shows the wave pattern, and how it can be decoded.. (timing, via a.. Yep! Arduino.) The VEX parts have a slightly different timing, compared to standard servos or constant-rotation servos, but the servo.h library is easily modifiable. (not too far off, but a servo.Write 90, seems to leave a little movement on the motor modules.) I powered my servos and motors through a 7805 regulator, from a +12V battery (which also powers the Arduino via the coaxial socket.. Word of the wise, NEVER draw +12V through the v-In pin of the arduino. a short circuit could fry the trace.)

Adding a new note.. The protocol used by the RF module, from the RC remote, is a serial PWM stream. Someone found that there is a 'Start' time, followed by 0-255 ms pulses for each of the joystick positions, and either a solid or no signal points for the buttons on the back.. Wish I could find the page, someone posted on how to decode with a Oscilloscope.

techboy4113 years ago
You could use a USB hub, they are el chepo very most.
Very interesting. I might be able to get hold of an EeePC 701 cheap, which I think should be sufficient for this project. It has built in webcam, and runs linux. I would love to see an update to this project. I am a total noob though. Anyone got any suggestions on where I should go to read up on Arduinos?

PS - any chance of putting some code in there that causes the robot to stop when wifi drops out?
btw nice dr pepper can on step 4
great guide! Im gonna get an arduino for christmas probbably. I cant wait for that
paradox1164 years ago
Wow... Literally about 5 minutes ago I read your comment about that breadboard on SparkFun then stumbled upon this. I love crazy coincidences like this
rhymed5 years ago
When I started playing with Arduinos I did the same thing as you - I devised a control protocol for serial communication and then controlled everything from my PC. It worked well, but eventually someone told me about the Firmata protocol. A library for it ships with the the Arduino IDE. The Firmata protocol is intended to be a standard for this type of device-to-device communication. I found the Firmata to be a little difficult to use at first so ended up building a library of my own that implemented the PC-side of the protocol. I prefer to do my PC coding with C# so the library is Windows-only at the moment, but I'll create a Mono-compatible version soon so that it'll work on Linux as well. Check it out if you're interested: http://rhyduino.codeplex.com.
CalcProgrammer1 (author)  rhymed5 years ago
I've heard of Firmata before but it seems fairly complex for something this simple. It is designed to be able to control any part of the Arduino's I/O system from the PC and has lots of different commands. A simple protocol like this is easier to code for if you just need to drive motors. Plus, I don't know if Firmata supports configuring the Arduino's PWM outputs for servos. As for Linux programming, I like pure C++, it is a bit more work but doesn't rely on any proprietary systems and the code is fairly portable. I like GTK+ for graphical interfaces because it is cross-platform, it did not take long to port a graphical interface I wrote in Linux for my fan controller project to Windows and it worked great on both platforms.
nawook5 years ago
 Nice instructable  ! But I can't see the links for the PC program on step 3 :(  
Could you please re-upload it ? Thanks !
CalcProgrammer1 (author)  nawook5 years ago
To be honest I never really finished this Instructable, it still needs some work and I never got around to uploading the code.  I'll post a zip file with the code soon.  There are a few things, there's the Arduino code, a program to drive it in Linux using a joystick, and a client/server set of applications (also for Linux) that let you drive the robot (controlled by a netbook) using another PC.  Streaming a video feed isn't covered in my code, you just run a streaming program like VLC alongside the drive code to get video.
Thanks !