Hacking Roomba

RoombaDevTools RooStick

[originally published on 26 May 2006 on todbot]

I recently purchased a RooStick from RoombaDevTools.com. $29 + $6.50 shipping.

If you don’t feel like building your own Roomba serial interface to let you hack your Roomba into a robot, you can use a RooStick.

The RooStick is a USB-to-Serial adapter with a Mini DIN 7-pin socket on it that matches the SCI connector on the Roomba. It is an unencased circuit board with a USB connector soldered on one end and the Mini DIN on the other. The circuit consists of a CP2103 USB-to-UART chip and a couple of LEDs.

Here’s what it looks like plugged into my Powerbook:
roostick

While RoombaDevTools doesn’t advertise it because they are focusing on the Windows crowd, the CP2103 has drivers for other OSes. You have to hunt around the Silicon Labs site, but under the
USB-to-UART Virtual COM Port (VCP) drivers
page you can find drivers for all the other OSes. Of course, like all USB-to-serial drivers, they require a reboot.

[update: The SiLabs site doesn’t have a link to Linux drivers because the driver is already in the Linux kernel. It’s called “cp2101″ and should auto-load if you have USB hotplug correctly configured (like Ubuntu does)]

Since it appears as a serial port to your OS, you can use any program that can talk to serial ports to control the Roomba. My RoombaComm API library and any of the apps built on it, like RoombaMidi work with the RooStick.

Issues:
While the RooStick works great, there are a few things to be aware of.

Use their cable
You must use their 7-pin to 7-pin cable. Using a standard Mac serial Mini DIN 8-pin to Mini DIN 8-pin cable from Jameco or wherever will blow out the SCI port on your Roomba. Trust me on this, as I have a dead Roomba to show for it. You could build your own cable, but RoombaDevTools doesn’t yet publish the pinout. From my own experimentation, the pinout appears to be a left-right mirror of the standard Mac pinout. This configuation isn’t guaranteed to stay the same, as RoombaDevTools could change it at any point. Use their cable. Doing so adds $17 to the $29 price of the RooStick but it’s cheaper than replacing your Roomba.

Hot LEDs
The Vpwr LED showing Roomba power gets very (dangerously?) hot. Be careful when grasping the RooStick or you’ll burn your finger. I’ve not measured how much power that LED is drawing. It’s probably not a power concern for the Roomba, but I’m sure the LED’s life is being shortened.

Cable too short
The optional 7-pin cable for the RooStick is only 6 feet long. Even a 10 foot cable is too short if you’re actually driving the Roomba around. I recommend at least a 15 foot cable. The 6 foot cable is only good for stationary Roomba projects, or when the laptop sits on the Roomba.

Other than those issues, the RooStick is a great way of getting into Roomba hacking.

5 Comments so far

  1. Chris January 3rd, 2008 12:28 pm

    Tod,

    Just bought your book from Amazon and a RooStick. While I’m waiting for the book to arrive I tried to get roombaview working with the RooStick.

    I’m stuck with this error message:

    ———————————-

    Stable Library

    =========================================

    Native lib Version = RXTX-2.1-7

    Java lib Version = RXTX-2.1-7

    opening roomba serial port ‘COM4′

    java.lang.NullPointerException
    at roombacomm.RoombaCommSerial.send(RoombaCommSerial.java:186)

    Roomba startup

    Playing some notes

    ————————————-

    Sometimes I don’t get the java.lang.NullPointerException error but it still doesn’t seem to work.

    The roostick looks like it’s working. One LED comes on when you plug it into the Roomba and the other comes on when you plug in the USB cable. The CP2103 USB to UART Bridge Controller shows up as COM4 on the device manager. I’m running Windows XP.

    On the roombaview screen I get:

    status:connected. sensors invalid. unplugged?
    mode:full or safe depending on which button is pressed.
    battery:100%

    Any ideas would be appreciated,

    Chris

  2. todbot January 3rd, 2008 12:50 pm

    Hi Chris,

    I can’t try out RooStick functionality anymore as I lost mine soon after I wrote this post. (doh!)

    But, are you sure that COM4 the serial port of the RooStick? In my experience, USB-to-serial devices on Windows have a much higher COM port number, like COM10 or similar. You can find out what COM port it is by going into Device Manager. The Arduino setup guide for Windows has a pretty good explanation of how to install and deal with USB-to-serial adapters. Make sure you’ve installed the latest driver for the RooStick.

    Also, be certain you buy the matching DIN cable that goes with the RooStick. If you try to wire up your own, you run the risk of burning out the ROI interface in your Roomba (it will still function, you just can’t control it over the ROI port)

  3. Chris January 4th, 2008 7:07 am

    Tod,

    It works! The RooStick showed up on COM4 in the Device Manager and I’m using their cable. It turned out to be the port baud rate. It was set for 115,200. I changed it to 57,600 and it worked.

    I’m sure that’s obvious to most hackers or it’s in the instructions somewhere. However, in my haste to just make it work, I never considered it. My clue was the SCI specifications section about lowering the rate from 57,600 to 19,200.

    Now I need to get Bluetooth. This short cable is a real problem.

    Thanks for the great web site. Your book arrives on Monday.

    Chris

  4. TSH May 17th, 2008 8:09 am

    Dear todbot,

    I’ve just bought a roostick, and it works well on my PC, but not on my laptop(or my friends’), it will be an “unrecognizable device” (I use Chinese Windows XP, so I’m not sure what it is in Engish). I’ve installed the drivers from irobot and VCP drivers in the article, but still can’t work. I wonder if you’ve had this question and I really need some advices. Thanks very much.

  5. todbot May 17th, 2008 12:31 pm

    Hi TSH,
    That’s very weird, I’ve never heard of such a problem, but it does sound like the drivers aren’t getting installed somehow on the laptop. The USB chip in the RooStick is pretty standard, and the drivers needed for it are just the ones needed in the RooStick documentation (CP2103 drivers).

    One thing to try: go into the Hardware Device Manager and look at the list of devices, see if there are any with a red ‘X’ or a yellow ‘?’. That might give you some hints. I’m not very experienced with Windows, unfortunately.

Leave a reply