Posts Tagged ‘TTL’
RoboBrrd Food – Using the Redpark Serial Cable
Remember a while ago, when I was able to send data through the MFi SkyWire cable? It turns out, now there is a cable designed for hobbyists, with an SDK, by Redpark! They were very kind enough to send me a cable, so I figured that the first thing to try would be to feed RoboBrrd!
Here is a video where I explain everything in detail!
Here is a link to the code on Github!
What is next? For WWDC 2011 legacy sake, I will probably try to drive DOGCOW robot with the iPhone’s accelerometer. This time though, the cable would be attached to an XBee so that it will be wireless.
Friday Night Robotics – CMUcam2
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.

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:

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! ^_^

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!!!!!! =)
The code that I was using to test the camera is from Instructables.

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:
RBBBs and Pololu SSCs
I received the two RBBB’s, 1 FTDI TTL USB cable, and two Pololu Serial Servo Controllers (SSC) I bought a few weeks ago.
Since then… I’ve been tinkering with them quite a bunch. I learned an incredible amount too from just a tiny board!
Building up the RBBB wasn’t too hard. At first, I printed off the wrong ‘instructions’ – which mind boggled me a bit until I noticed that they were indeed wrong. Once I had the right instructions printed… it was more simple. I was worried about the polarity of the bigger capacitors.
After I had it all finished… I went and looked up the FTDI-USB cable specs. This cable is pretty interesting if you think about it, 1 wire turns into 6 more colourful wires
-Gnd, CTS (clear to send), +5V, TX, RX, RTS (request to send). I downloaded the Blink program without any problems… until I wanted to test it. The LED wasn’t blinking! After about 5 minutes of intense thought, I realized that there was no LED on pin 13. That was a stupid mistake!
Another stupid mistake, but this one is funnier, was when I was trying to test the other RBBB.
… I forgot to put the chip into the IC socket. =D That really made me ‘lol’ for 10 minutes.
Then, I was trying to fit it into the breadboard… lets just say it took a longer than normal time.
When the Pololu SSCs showed up, I was pretty excited! Then when I saw them… they are REALLY tiny! It was a big challenge to solder these without them flying out of my hand. I don’t have a 3rd hand tool to hold it steady, so I would sometimes have to hold the ‘pinchy-things’ with my elbow and hold the solder and soldering iron with my hands.
The headers were extremely difficult too…
Getting the Pololu to work with the Arduino is pretty aggrivating. I think I’m almost there, I just have to switch the input to the logic level side as I was using the RS-232 one. I thought that the Arduino used RS-232 on its TX line, but it doesn’t. It uses a non-inverted logic level (er well, that’s at least what I read). Tomorrow I plan on looking up the difference between the two
Here are some pictures… I finally threw the desoldering pump out the window (joking) and bought solder wick. Also finally bought NON-LEAD SOLDER! =D
Other than playing with these, I’ve been flow-charting A LOT of AI programs, and learning more first-order predicate logic. I really like logic and the probabilities and Bayes and everything!!!!! Also having fun thinking about random and bell curves… More back-dated Stanford blog posts to come (so many photos hahah)!





