Let's Make Robots!

My Arduino + CMUcam indoor rover.

Navigates around and indoor environment using a CMUcam and Arduino (for now)
Test code for running a dual H-Bridge from an Arduino1.31 KB
The current code as of 20/09/2008 - basic turn-left obstacle avoidance4.41 KB

Update 20/09/2008: A major milestone has been reached! The robot can navigate around a otterman, two shoes, my leg and a kitten using just the CMUcam's averaging function and some Arduino clevers. The latest video is the top one. The code for the robot is attached as well.

Update 18/09/2008: I have installed a pair of Solarbotics "Secret" L293D Motor Drivers in the Rogue Blue's servo casings and have added a video showing a test of them in action. I have also uploaded the Arduino code used for the demo video. The motor drivers replaced the pair of TIP122 power transistors that were providing the original stop/go functionality.

Brief Overview

This is my first real robot. It is an "never-ending" project, started a year ago, that is intended to be a test bed for any ideas/projects I think of over the next couple of years. Currently it is handling the interfacing between an RS232 CMUcam1 and an Arduino (Stickduino).

This LMR entry is a little basic at the moment as I created it on impulse, to accompany my main blog at (http://thisismyrobot.blogspot.com). I will replace the following with more detail shortly, and in the meantime there is a stack of info on my blog.

To summarise, the platform is based on a Rogue Blue chassis from Trossen Robotics (http://www.trossenrobotics.com/store/p/3166-Rogue-Blue-ERS.aspx), which I have expanded vertically using very thin hollow aluminium tubing and some large diameter bolts that (just) thread into it. The base seems to be able to handle a couple of battery-packs and a microcontroller or two thanks to the servo gearing.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

some more info would be nice :)

why did you made it so tall? I'd like to have a cmucam too, they are awsome

Hi Nicola,

Thank you for your comment. I have now added a touch more info above and, as I stated there, more is on my blog and I will fill this in with more as I progress from here onwards.

As for the height, that height seems to work best for the camera, giving a good balance between keeping the robot small and allowing the robot to see enough of the ground (carpet) to be able to judge distances in a basic fashion. I don't intend to carry much of a payload at the top, just small cameras and IR sensors etc.

The CMUcam is Awesome! Even the basic CMUcam1 is great, and an excellent introduction to machine vision. That, combined with the simple Arduino serial libraries make programming for it incredibly easy.



Very interesting - I found a link and video regarding the CMUCam here http://www.cs.cmu.edu/~cmucam/ with some amusing videos.
I briefly went over the manual - it appears they have a rs-232 connectionwhich feeds the RGB data to your Arduino Decimila.  Do they have a variety of uProcessor code which will do all the Tracking and Blob centering functions? 

What does your code do - stop on black centered blob?

What do you think of it?  

I noticed they had 2 other versions CMUCam2 & 3 - do you know what was improved? 

What are it's Pros & Cons?

I also notices a Java interface - What would run the Java, not a uProcessor?

I am interested because I am working on a cheap webcam java/robotic library for stereopsis ranging, color tracking, object identification and other functions.  I was wondering what other items exists, would be applicable, or coud be interfaced with ...

Keep up the great work,



Hi GroG,

Cheers for your comment, I will try to reply to as many of your points as possible, in order.

Yes, the camera is RS232, and I have hooked the Arduino's 1+2 pins up to the CMUcam's TTL RS232 pins (removing the MAX232 chip), and I am using the Arduino's serial library to talk to the camera. From the manual, I am using these commands to track the shoe.

PM 1 <- this sets the camera into pulsed mode, only returning a single item of data per request

SW 1 1 80 70 <- this sets the working area of the camera to the top half of the view

GM <- this returns the average R,G,B and the Standard Deviations of the R,G,B (6 values in total), for the top half

SW 1 70 80 143 <- this sets the working area of the camera to the bottom half of the view

GM <- again, for the bottom half

I then compare the two averages, and if more that three (between the two sets) are different by 20 (of a range 0-240), the robot stops.

So, it is not overly difficult to obtain cool results quickly. I have done more since then, but I have not taken any vids yet. I would recommend the basic CMUcam to anyone on a budget (like myself) who wants to play with video on their robots.

I have not played with the other CMUcams, but I believe they add higher levels of processing to that of the basic version. I never really looked at them, when I purchased the camera I was wondering about $$$ not functionality :)

The Java interface is a demo program parcelled with the camera, allowing for the testing of commands, and for displaying an image – useful for setting focus etc. It would run on a PC usually.

As for the Java library, with the CMUcam most of the processing is done on-board, and based on my experience with Java and the CMUcam (when testing on my main PC), Java’s IO can be incredibly difficult to get working. To be honest, I am not sure how I would proceed in that development.

I hope this helps a little bit, and I will put up some code examples as soon as they are fit for public consumption! :D

What are these Arduino 1+2 pins that is being referred to in the above comment? Can we use RS232 shield ?

From memory I was using Software Serial through pins 1 and 2 (TX and RX) - so, yes, you should be able to use an RS232 shield and whatever pins you like.

I am trying to use the CMUcam1 with my Picaxe 28x1 board, am I to connect the TTL recieve pin from the camera board to the digital input on my Picaxe? And the transmit pin from the camboard to the Direct output pin on my picaxe, if so, I need help with the code :/


Hi Robert, 

Could I get some information on Arduino and CMUcam interfacing? Which Arduino did you use for this project? Do you see any limitations if Arduino Uno is used.





Hi Shital,

The CMUcam was interfaced to the Arduino via TTL-level RS232. This involved 3 wires for RX, TX and GND.

The Arduino I used was a StickDuino (http://spiffie.org/kits/stickduino/) - but you should be able to use any Arduino that has RS232 (which they all do I think).



Hi Robert

Thanks for your post. Could you be able to share the schematics for the interface?