Sunday, September 02, 2007

Doing it the hard way



the Bare Bones "Arduino" from modern devices

I ordered 4 bare bones arduino kits from Modern Devices. But in a moment of false economy decided not to order a USB < -- > TTL cable for them. Instead I decided that I would use some of the parts from the SMD grab bag I got ages ago and make one myself. My old laptop has a serial port, so I did not have to contend with USB, and it is "old tech" so there is lots of info out there.

rs232 < -- > TTL cable schematic
Finding a suitable schematic was as easy as looking at the serial Arduino schematic and finding the rs232 input area. I rounded up all the parts, and used a peice of prototyping board designed for SMD parts from OnePas (http://www.onepasinc.com/). I also dug up a DB9 connector in a plastic box that had enough room for the tiny board I ended up with.

a magnifier is your friend
I have a desk mounted magnifier lamp (which had been in storage unused for 30 years!) and it turned out to be an absolute necessity. Soldering the parts down was surprisingly easy, but working without a design provided the usual set of challenges and opportunities for cursing.

crammed in there
In the end I got it all put together, but I simply could not get it to work. Two days of fiddling, finding mistakes, testing with the scope, trying different computers, and learning the intricacies of rs232 protocols left me no closer to a working cable. In a funk I ordered a USB cable from mouser, and almost gave up.

finished
One final investigation finally revealed the problem. DB9 connectors are number as you look at the BACK not the FRONT! Switch one wire and suddenly the thing works like a charm. One of those things you just need to know.

It is probably the most expensive cable ever built, but I am quite happy with it.

No comments: