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...

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.

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.) <br>
<p>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.</p>
hey <br>i also wannna do a similar stuff. i want to design a robot for surveillance where the robot will be fully autonomous and it wil move for point A to point B autonomously. <br>i want u to help me in designing the autonomous motion planning system to go form one given place to the other using sensors n stuff...i m stuck pls help <br> <br>i have bought the rover system from here just for making prototype of the actual system since i got it at a good price... <br>http://danuc.com/index.php?main_page=index&amp;cPath=6 <br>http://danuc.com/index.php?main_page=index&amp;cPath=4 <br>http://danuc.com/index.php?main_page=index&amp;cPath=1 <br>http://danuc.com/index.php?main_page=index&amp;cPath=7 <br>http://danuc.com/index.php?main_page=product_info&amp;cPath=8&amp;products_id=52 <br> <br>pls reply
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?<br><br>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
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
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: <a href="http://rhyduino.codeplex.com" rel="nofollow">http://rhyduino.codeplex.com</a>.
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.
&nbsp;Nice instructable &nbsp;! But I can't see the links for the PC program on step 3 :( &nbsp;<br /> Could you please re-upload it ? Thanks !
To be honest I&nbsp;never really finished this Instructable, it still needs some work and I never got around to uploading the code.&nbsp; I'll post a zip file with the code soon.&nbsp; 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)&nbsp;using another PC.&nbsp; Streaming a video feed isn't covered in my code, you just run a streaming program like VLC&nbsp;alongside the drive code to get video.<br />
Thanks !&nbsp;

About This Instructable


42 favorites

Bio: I finally graduated from Missouri University of Science and Technology (Missouri S&T, formerly University of Missouri Rolla) with a computer engineering degree. Originally from ... More »
More by CalcProgrammer1: Cheap and Easy Tachometer (RPM Sensor) for Brushed DC Motors Cheap Home Automation using Wireless Outlet Modules ATTiny USI I2C Introduction - A powerful, fast, and convenient communication interface for your ATTiny projects!
Add instructable to: