Hacking Roomba

Build a Roomba Serial Tether

[originally published 15 Feb 2006 in Makezine blog and edited by Phil Torrone]

A week ago I got my OSMO//hacker Roomba firmware updater from iRobot. It worked like a charm, giving me a serial port to fully control the Roomba.

An interface was needed however, since the crazy mini-DIN 7-pin on the Roomba is very unstandard. So the first attempt at a robust interface between a Roomba and a standard PC serial port is my Roomba Serial Interface.

The Roomba Serial Connector
It seems people are confused by the mini-DIN 7-pin connector, citing difficulties in obtaining that specific plug. It turns out that mini-DIN 8-pin plugs will mechanically mate with the 7-pin jacks, with the center key hole in the 7-pin female jack taking the middel pin of the 8-pin plug. Mac high-speed serial cables from the 1990’s work great for this, and I have a ton of those from all my misspent youth doing MIDI on a Mac. So chop up those old Mac serial cables! If you can’t find one, Jameco will sell you one for $3.29.

The PC Serial Connector
Some computers have an RS-232 serial port. Most don’t. To hook this serial interface cable up to your Mac or other modern computer without an RS-232 port, use a Keyspan High Speed USB Serial Adapter. Supported on all platforms and the choice of Mac hardware-hackers worldwide.

Step-by-Step Construction details
The Roomba ROI is a serial interface protocol to let you control your Roomba, but the port on the Roomba doesn’t conform to RS232 standards. This board does the conversion.

There are two boards shown here. The first version (larger, encased in lexan), and the second version (smaller, encased in a blue floss box).

Circuit is simply a 7805 +5V voltage regulator and MAX232 RS-232 transceiver, appropriate capacitors to make it work and a ‘power on’ LED. Because everything needs an LED. Flickr photo with notes here.

Below are parts lists from Jameco (and one from Radio Shack). Jameco doesn’t have the cheapest parts, but they do have an easy-to-use site, ship fast, and carry just about everything that a weekend electronics geek would need. If you want to really scrimp, shop at Digikey or Mouser, and you’ll probably save a few bucks on these parts.

Parts

Flickr photo with notes here.

Parts list (from Jameco):
- 1 x Mac mini-din 8-pin cable ($3.29)
- 1 x serial cable with DB9 9-pin female connector ($3.95)
- 1 x 78L05 +5VDC voltage regulator ($0.27)
- 1 x MAX232 RS-232 transceiver ($2.19)
- 1 x green LED ($0.20)
- 1 x 220 ohm resistor ($1.00 for 100)
- 6 x 1 uF electrolytic capacitor ($1.20 for 10)

And from Radio Shack:
- 1 x prototyping pc board ($1.79)

Luckily I had all these parts in my part drawer, so the actual cost for me was zero. If you’ve ever done any little projects, you probably have some of these parts laying around too.

Tools needed

Flickr photo with notes here.

Cutting the cable

Strip off the big plastic cover, then strip off about 1/4″ from all the wires inside. Then do a continuity test on each wire to figure out which colored wire goes to which pin on the jack. Each cable I’ve done has had a different color-to-pin mapping.

Circuit diagram


Larger version here.

Putting the components on the prototyping board

Cut the prototyping board in two, since only half the space is needed.
Place the chip so it straddles the two big verticle bus lines, then start placing parts around it , using the connected pads to minimize the amount of wiring needed. Of course, a few wires are always needed. For that use snipped leads from parts.

Also, create test points using snipped leads to check voltages.


It’s really handy to have the vertical bus lines and the three pads joined. This board is like the best thing Radio Shack sells. :)


Wire up the cables as shown in the schematic and the pin-to-cable color diagram made for the particular cable, solder them down, and hot-glue the cables to the board for strain relief. Flickr photo with notes here.

Testing the voltage

After all the parts are soldered, use the +9VDC wall wart power supply to power up the circuit, and check voltages. The LED should light up and +5VDC should be coming out of the regulator.


The LED lighting up means the interface is getting voltage from the Roomba.

The enclosure is a floss container. Consumer products have a lot of interesting plastic enclosure styles, and so cheap! This one was something like $2.49. A little time with the diagonal cutters and soldering iron allowed the board to fit.

Once it’s in the enclosure, hook up the +9VDC wall wart again and measure voltages on every pin on each cable, to make sure the circuit doesn’t fry the Roomba or the computer’s serial interface.

Get the Software

Now drive your Roomba around like a little tank and play music on it!

16 Comments so far

  1. Paul Truini January 15th, 2007 11:15 am

    Here’s a link to a website where you can actually get a 7 pin mini-din cable for $8.55.

  2. Paul Truini January 15th, 2007 11:16 am
  3. jpa March 5th, 2007 12:07 am

    Fry’s stores (see frys.com for location)
    sells a DIN-8-MINI connector for soldering for $1.29
    Also a USB “data cable” for Sanyo from futuredial (part#CSAYM02-03 for models 5000,5150,6000,6200,6400) costs only $10, instead of $30 for the Nokia version!

    The Sanyo pin-out for the connector (as seen on phone)
    1 18
    [O=:::::::::]
    11 RX (yello in the futuredial data-cable I used)
    13 TX (blue)
    6,10,16,17,18 GND (brown and black)


    jpa

  4. Paul May 10th, 2007 7:11 am

    Where on hacking roomba website can I find the RoombaComm test program? Will it work on win 98 se?

  5. todbot May 10th, 2007 10:39 am

    Hi Paul,
    You can find it in the Code section of the website, specficially, the RoombaComm section.

  6. robokojo November 25th, 2007 8:49 am

    Tod, any chance of an updated Parts and Tools list - many of the provided Jameco part numbers are no longer valid. It would be amazingly useful to just have a list of URLs to click in order to get started, vs. having to comb through long lists on Jameco’s site, trying to find substitutes - especially for some of the less-familiar parts. Thanks :)

  7. todbot November 25th, 2007 11:23 am

    Hi Robokojo,
    It looks like just the 220 ohm resistor and green LED part numbers were outdated at Jameco. I’ve updated the parts list and they all point to valid Jameco parts now.

    Thanks for the tip that some of the links had gone stale.

  8. robokojo November 25th, 2007 1:23 pm

    Thanks Tod, any chance of links for the Tools list on p44? e.g. I can’t seem to find the Mini DIN socket or IC Hooks? Thanks! :)

  9. todbot November 25th, 2007 2:13 pm

    Yeah both of those I’ve had for over a decade. It looks like the “Mini clip test leads” are a good match for what I use.

    The Mini DIN-8 socket I pulled out of an old modem I got from a swapmeet for $1. Sparkfun sells a “MiniDIN 7-pin socket” specifically for Roomba hacking. It’s a better fit than the Mini DIN-8 stuff.

    To figure out which tools to use to build circuits, one of the best resources out there is Lady Ada’s “How to Equip Your EE Lab“. She gives lots of good advice about what to start with, what to move up to, and why each tool is useful.

  10. robokojo November 25th, 2007 2:37 pm

    Brilliant - thanks!!! :)

  11. Jane February 4th, 2008 8:53 pm

    Sorry if I’m off topic but I’ve been searching high and low for such a gadget as the “roostick”. Do you guys figure this would work hooking up a 7 pin din cable to a pfaff sewing machine to my computer?

  12. todbot February 4th, 2008 11:42 pm

    Hi Jane, Sparkfun sells the RooStick and the iRobot Create Serial Cable will do the same job.

    Neither of those, nor will any Roomba things, work with your Pfaff sewing machine I’m afraid. It’s just a coincidence they use the same connector.

    However, I bet there are other folks like you who want to hack their Pfaff and make it do cool new things. Do a web search for “Pfaff hacking” or similar phrases; you might find someone has written up as a blog post exactly what you want to do. Good luck.

  13. Jane February 4th, 2008 11:50 pm

    Thank you! Good advice! Actually this site has got me interested in what you are doing! I’ve hit some good sites along these lines as a result and I’m intrigued. LOL I think I’ve got my fingers in too many pies.

  14. Jeff March 15th, 2008 12:41 pm

    Hi, I have your book and have trying to use my computer to connect with my Roomba 550, the roombacomm program works
    Everything comes up ok.. but in controlling the Roomba only some of the buttons work or they all start the roomba forward, can’t turn or read sensors.
    ( lucky the stop button works.)
    I am using the Create Robot Serial Cable… maybe that will not work correctly with Roomba 550 ????

  15. todbot March 20th, 2008 1:32 pm

    Hi Jeff, All reports I’ve seen say that the 550 should work fine with all the Roomba hacking stuff. If you’re using the RoombaComm code, I suggest you get the latest version of the RXTX java serial library, as the one that I have inside the RoombaComm zip is getting old and may be causing you problems (especially if you’re on Mac OS X 10.5) What OS are you on? If you’re on Windows, go to http://roombadevtools.com/ and try the SCITester program as an alternate test tool.

  16. Spike July 16th, 2008 6:24 am

    Excellent book and website Tod!

    We have had some problems soldering the ‘inexpensive’ 7-pin mini-DIN plugs but found a source of 8-pin to open-ended leads. We got these from a company in the UK called Lindy Electronics. The relevant webpage is .

    I have no financial interest in this company.

Leave a reply