Posts Tagged ‘battery pack’

Friday Night Robotics – CMUcam2

Posted by Erin, the RobotGrrl on Friday, February 5th, 2010

The CMUcam2 is a really cool camera for robotics made by CMU. The version that we’re using for this Matlab project (that I mentioned before) was actually used in FIRST competitions a long time ago.

CMUcam2

The first problem we faced with this was that it requires 7.2V, in a range of 5.2V – 8.6V. What gives 7.2V?! Crazy! If you take 6 AA rechargeable batteries together, they can add up to be 7.2V exactly. (1.2V * 6 = 7.2V). Battery packs naturally don’t come in sixes, so I ended up making one:

CMUcam2

This was actually my first time making a series battery pack. It’s in series because we want to use Ohm’s law, where the voltage is added together. Thanks to the people in the Fat Man and Circuit Girl IRC chat room, they helped me figure it out. Here’s a drawing that I made incase others too need help with this someday. Basically, connect the positive to negative over and over again! ^_^

Series Batteries

The next step is to get the camera working. This is by far the hardest part. There’s numerous methods of communicating to the CMUcam2, all of which use RS232. Arduinos also use RS232, so at least we’re in known territory.

The CMUcam2 has a serial port, a TX/RX/Gnd line, and a TTL port. On my Mac, I tried the serial port, it didn’t work. I tried the TX/RX/Gnd line into an Arduino, it also didn’t work. I also tried to use the TTL, but it also didn’t work. I’m not really sure why nothing works on my Mac, especially since the camera works with a PC just fine.

This is where I’m at right now. No idea what to do to make the CMUcam2 work on my Mac. Do any of my blog readers have any ideas? :)

WOOT~~~ TWIST ENDING!! READ ON!!!

I was thinking that it would be really lame to end the blog post without some sort of screenshot of Matlab or something. So I gave the CMUcam2 another shot… I made it work!!! IT WORKS!!! IT WORKS ON MY MAC!!!!!! =) :D The code that I was using to test the camera is from Instructables.

Matlab CMUcam2

So, now that it works we have things to do… like figuring out how we can get the RGB data for each pixel, and then saving that to an image. After its in an image, we can do some form of edge detection. Matlab probably has a toolbox for that. :) More fun later!


Google thinks that you might like this:




Posted in: Programming, Projects, School.