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.

14 comments

14 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.

  6. guiem February 16th, 2009 6:00 am

    Hi Tod!

    I’m using Linux and everything seems to run okay with the RooStick, when I plug it in /dev automatically appears the /dev/ttyUSB0 port.

    I’m trying to run the SimpleTest.java example and that’s the console message:

    “Experimental: JNI_OnLoad called.
    Stable Library
    =========================================
    Native lib Version = RXTX-2.1-7
    Java lib Version = RXTX-2.1-7
    Available ports:
    Couldn’t connect to /dev/ttyUSB0”

    What is weird for me is that the roombacomm.listPorts() command returns an empty list. I don’t know if I’m missing something referring to how Linux ports work.

    Any idea will be very welcome and thanks in advance!

  7. todbot February 16th, 2009 10:28 am

    I suspect the problem is the RXTX library is out of date for the Linux on your PC. The fastest way I know of to get a latest version of RXTX is to download Arduino, unpack the tarball, and copy the two files:
    – arduino-0013/lib/RXTXcomm.jar
    – arduino-0013/lib/librxtxSerial.so
    over the RXTX files in the ‘rxtxlib’ directory.

  8. guiem February 18th, 2009 2:53 am

    Hi Tod!

    Thanks for your help. The out of date library thing made sense for me. I just did exactly what you said, but nothing happened and the message is still the same.

    Anyway, thank you for your clear and detailed instructions. Don’t you know any Linux specific forum on that issue or something like that? I’m afraid I have the constrain of using it with that OS.

  9. todbot February 18th, 2009 3:24 am

    What distro and version of Linux are you running? On some version (I think I had this problem on a version of Ubuntu), the Braille package “brltty” conflicted with USB serial ports & RXTX. The solution was to remove it (I don’t need Braille support) with the command “sudo apt-get remove brltty”.

    Another thing to try: download Procesing and try its example Serial port sketch that just lists the ports. If that works, then you’ll have at least one example of a Java + RXTX that works on your machine. :)

  10. guiem February 19th, 2009 3:32 am

    Hey, I was using a Debian. I’ve installed the last Ubuntu into an old computer I have, and it worked! :-)
    Well, I still haven’t tried to use the RooStick with roomba, but at least with Ubuntu I can read from ports. So, I guess that everything will be okay with the roomba.

    I have to say that I’m very impressed about your quick answers. Usually, posting on forums one has to wait for long time to receive an answer. So, thank you very much for your quick help Tod!

  11. Ben April 6th, 2009 6:22 am

    You can use a 8 mini din cable if it is wired straight through. They say right in the description… a mac serial cable will NOT work. There you have it!

  12. Jeremy January 5th, 2010 7:08 pm

    I don’t know how useful this is anymore, but the iRobot Create USB cable – http://store.irobot.com/product/index.jsp?productId=2818673 – works great with RoombaCommTest and my Roomba Discovery. It’s only $20 + shipping; the cheapest option unless you want to build your own.

    Also, iRobot does still sell the OSMO//hacker modules, but they aren’t linked to on the site. These can enable the SCI on older Roombas.

    OSMO//hacker 1: http://store.irobot.com/product/index.jsp?productId=2172890

    OSMO//hacker 2: http://store.irobot.com/product/index.jsp?productId=2172891

    Each product page tells how to identify which version you’ll need, though hacker 2 is for earlier Roombas than hacker 1. Also, if your Roomba was manufactured on/after October 24, 2005 it should already be SCI capable.

  13. Jeremy January 5th, 2010 7:14 pm

    Sorry, but I should have noted that I’m using the USB cable with a Windows 7 PC.

  14. Charel June 30th, 2012 2:00 pm

    Me too, have the same problem, somehow Can’t connect in Windows 7 to USB cable to Roomba. Any suggestions?
    Even simple terminal program can’t connect.

Leave a reply

You must be logged in to post a comment.