Let's Make Robots!

Making AVRcam (was CMUcam) clones

I've been looking for some video processing to go with my simple PICAXE robots and came across the CMUcam from the Seattle Robotics Society awile back. They have three versions but the one I'm interested in is the most primitive CMUcam v1. It's not its laundry list of amazing features I'm attracted to but its simplicity. It speaks standard serial to chips like the PICAXE, BS2, Ardu, etc. and can be programmed from a PC through a relatively cheap "SX Blitz" USB programmer. Not a lot of wizardry involved.

Per marketing vomit:


CMUcam v1.0

At 17 frames per second, CMUcam can do the following:

  • track the position and size of a colorful or bright object
  • measure the RGB or YUV statistics of an image region
  • automatically acquire and track the first object it sees
  • physically track using a directly connected servo
  • dump a complete image over the serial port
  • dump a bitmap showing the shape of the tracked object

 

At the bottom of the users manual it gives a components list (with Digi-key part numbers) and a schematic of the board. I took the time to look up the parts and their current prices as well as finding some replacements (most noteably, the 75MHz oscillator is only available in an SMD package). I also substituted in some lesser priced components (mostly the expensive gold plated connectors were replaced with cheap tin plated).

The CMUcam can be purchased fully assembled for $109 from Seattle Robotics themselves. What sport is that though? To build your own, it would cost ~$75 for a single component kit with everything listed on the spec sheet with my modifications. The price would drop to ~$65 per component kit if 10 of each part was bought. A Parallax SX Blitz programmer would have to be procurred to get the CMUcam HEX file on the chip but I'm willing to eat that cost and program the chips pro bono.

You would need to make the PCB but that isn't a terrible task with the schematic being provided and PCB services from places like Sparkfun making one-off custom boards for reasonable rates. Perhaps we could draw up a decent PCB of our own and use Seedstudio or something like that for all 10 PCBs.

Just seeing if anyone would want to buy a component kit like this. Sooner or later I think I'm going to do it, by myself or not. I might try to grab ten of everything if there's nine other people interested.

Comment viewing options

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

Just wanted to say I've gotten over the hump of yet another learning curve and am receiving what I believe to be the final components I need for an AVRcam v1.4.

Essentially I stuck to the BOM as listed in the users manual. The Mega8 is the ATMega8A-PU and the Tiny12 (almost impossible to find) was replaced with the ATTiny13A-PU. I'm a rank noob with Atmel chips but it seems to have the same functionally as the Tiny12, just faster. If I'm wrong, please go ahead and wave the flag.

I also have downloaded the ASM files for the Tiny13, all the code for the Mega8,  the AVRcam software suite, and AVRstudio 4.18. I bought an AVRISP mkII clone off ebay for the programming and cleared a breadboard for the project.

Even with the additional cost of the programmer and needing to buy almost every bit listed on the BOM, the cam is still very cheap. Thanks to this project I got my butt in gear and I made a spreadsheet with EVERY COMPONENT listed on the shipping invoices I've kept (I believe I have every last one). I intend on documenting the cost of this project down to the peso. FWIW, off the top of my head I think it's added up to around $40-50 so far. Right on track.

I got the ancient Ezonics webcam (made in the year 2001!) the other day and took it apart. Sure enough it has an OV6620 inside. Its design won't let me tap into it the way I want to but I got the important parts pried off for my plans. I'll have to recreate the C3088 board but that should be no problem. I have the schematic of the C3038 board and it looks identical to the '88s except for OV6620s pin 5. It uses a 10uF bypass cap instead of a 0.1uF cap. Big difference.

 I got some pics and captions of the webcam disassembly posted on the botton of my Peltier Pal page if anyone is interested.

I also found a couple sources for the old C3088 if somebody is looking for a drop-in replacement for their CMUcam or AVRcam or whatever. Price is~ $30 no S&H.

Wow - Look at this !   

  • USB • USB 2.0, 
  • 1280 x 1024 
  • 30 frames per second
  • And a Built In Microphone !

Alright ... I'll be quiet now.....

 

 

 

I can't even count to 30 let alone use something that advanced. I'm just a video recognition n00b armed with a bag of PICAXEs.

I could commit (for sure) to a kit if it's under $80 and has open source firmware.  I would not mind a 1206/805/SOIC-sized SMT kit either.  What's your schedule like for putting this kit together?  If I had the holiday season to play with it I'd be happy to give you feedback on the kit.  The CMUCam and AVRCam were appealing to me except for the age and lack of recent development.

I'd love if the kit would use the newer non-obsolete 3.3V part.  For the conversion from 3.3V --> 5V, Sparkfun has a logic level shifter design that I'm playing around with -- I'm trying to build my own with 2N7002 mosfets and a new reflow soldering hot plate.

Does the CMUCam HEX file have open source firmware? Answer: "The compiler for the cmucam1 is not available anymore, so it is very difficult to update that image anymore."

The AVR cam is open-source firmware, right?  so you could update it for new cameras?  Answer: http://www.jrobot.net/Download.html

-John

It looks like maybe with some inline resistors/diodes and using a low-voltage ATMega8L the old 5V and newer 3.3V generations could get along.

For a few reasons I'm leaning towards the 5V 6620. Namely, there would be no need for voltage conversion and the 6620 camera parts can be found for less money than the 6630. I'm not entirely against putting something together to ease the collection of parts for an AVRcam though. Maybe a kit w/o camera would be something I could do. I was thinking that if the PCB had a circuit for an additional 3.3V regulator with the appropriate jumpers one could use either camera.

I'm probably going to get one of those Ezonic cameras and get the ATMega components to see if I can even make it work. No need to go off the deep end before I get one to even act right.

I'm trying to build my own one of these: http://www.sparkfun.com/products/8745

The components are cheap: http://www.taydaelectronics.com/servlet/the-1388/mosfet-SMALL-SIGNAL-MOSFET/Detail

Unfortunately I'm working on my first reflow solder project and the logic level converter is only one part of my circut.  Things have gone wrong in other parts of the circuit.  Eventually I'd like to test with an oscilloscope to see how well the converter works in both directions.  According to the Sparkfun comments (Dale), these are bi-directional.

The logic part of my circuit looks kind of like the above figure.   The SOT-23 bits are the 2N7002 MOSFETs.  Testing still needed.

Just mentioning it in case it's useful.  The resistors you mentioned should work fine for stepping down, but not stepping up.  I think the communication is bidirectional, right?  Otherwise the camera wouldn't get input from the microcontroller.

-John

The cam talks to the Mega8 for all the video processing. The chip that's normally used has a 4.5-5.5V range but there's one that operates from 2.7-5.5V (the Mega8L). I should look before shooting my mouth off but usually low-voltage chips like that take signals >1V as logic high, eliminating the need to step-up from a 3.3V setup.

I have an original AVRcam. I suggest to drop the old MAX232 level shifter and the RS232 interface and supply only the TTL serial interface. If you're up to, perhaps the I2C interface. The NXTcam made by Mindsensors is a AVRcam clone, but uses the I2C interface to communicate with the NXT. Perhaps they already use the 3.3V camera, have a look at their page here: http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=78

Also, it would be nice to have directly on the Mega8 some code to drive the pan/tilt sensors to center the blob in the image and forward the servo angles to the robot's brain.

I will resume the work on the AVRcam library for Arduino. There already is a .h file, but I'm having problems with it. More work needs to be done and I'm not the perfect person for this job. Oh well...

I'm all for eliminating unneeded components but without the MAX232 I wouldn't be able to use AVRcamView would I?