RoombaNet

"The robot that vacuums and serves web pages."

The newly-released Roomba Serial Command Interface (SCI) allows the user to drive a Roomba around and read out sensor data. But communicating with the robot via a tethered cable would interfere with the robot's autonomy, and setting your laptop on the Roomba isn't practical or smart (it also wouldn't work: the SCI expects TTL, not RS232). One logical solution is to build a (small) subsystem that can ride around with the Roomba, perform some low-level control, and communicate wirelessly with the world. The following page describes just such a system. My application has been to control the Roomba using a neural network, but the system is basically a tiny Linux box, so the possibilities are only limited by what will fit in the flash space. This will let you hack your Roomba with complete freedom.

Fair warning: this project was done as a part of my PhD thesis, so it was designed to be quick and flexible. There may be cheaper options or helpful shortcuts that make this a better system, and if you discover one, please don't hesitate to email me.

The Hardware

1.) 1 gumstix connex board + 1 gumstix "netCF" board. Gumstix is a company that makes very small SBCs (indeed, the size of a stick of gum).

The processor is an Intel XScale PXA255, and it includes 4MB of flash memory. The "netCF" is a daughtercard which allows the gumstix to communicate with a compact flash device, in our case, a wireless NIC. The gumstix comes loaded with all the software you'll need, including a tiny webserver. I bought the simplest gumstix package -- the connex 200 -- but for a few dollars more, you can get more speed or additional memory. Total pre-tax, pre-shipping cost: $124.

2.) A compact flash wireless NIC. I bought a Belkin F5D6060, which is not the smallest or latest, but is known to work with the gumstix system.

There are some threads on the gumstix support board (the "tiki-wiki") that discuss compatible cards, and, as of this writing, they also list

"known to work." I found the Belkin card trivial to install and configure, and I highly recommend it. I paid $60. *Note: the Netgear and Belkin cards listed above are not the latest version, and, sadly, the latest version of both cards are not known to work out of the box with the gumstix. Caveat emptor.

3.) A board to allow the gumstix and Roomba to share power and a serial port. There need to be two connections between the gumstix and the Roomba. First, a power connection, drawing ~16V from the Roomba battery (pins 1&2/6&7 on the SCI connector) and supplying ~3.7V to the gumstix. Second, a serial connection, connecting the RX/TX/GPIO lines on the gumstix to the TX/RX/DD lines on the Roomba.

I had a few prototype PCBs cooked up by the good folks at Advanced Circuits, cost for one prototype being $33 (at the student rate). If you're in a more cost-constrained environment, speed wire and protoboard might do the trick (assuming you have supernatural soldering skills -- more on that later). My final result looked like this:

The top of my gumstix/Roomba board.

The bottom of my gumstix/Roomba board.

The components are very basic and were chosen to provide flexibility for future hacking. The parts (and part numbers) are shown below as follows:

  1. The Hirose DF12D(3.0)60DP0.5V80 (available from Digikey for $2.37/ea) for interfacing to the gumstix board. You can see the pads for it on the left side of the bottom of my gumstix/Roomba board. As you might guess, the small size of this connector provides hours of soldering fun for the whole family. Be sure to buy plenty of spares.

  2. A voltage regulator. I chose TI's PT6101A (available from Digikey for $12.58/ea, note that it also requires a 100uF capacitor, like this). It's expensive and big, but I chose it because it's simple, it's adjustable, and I want to minimize the power drawn from the Roomba. The noise on the output is a minor concern, but the gumstix claims to regulate the power again on board. So far, I've gotten good results adjusting the output to 3.7V for the gumstix. However, another DC-DC converter might be cheaper and smaller. (*Note: Avoid using a linear regulator -- the gumstix/network card can draw up to 0.5A total, and, at a 16V-to-3.7V drop, the heat becomes significant. Yes, I learned this the hard way.)

  3. A connector from the board to the roomba. I chose a Hirose connector (available from Digikey for $0.64, you'll also need this and a whole bunch of these) and, for those putting together an order, you'll also want the connector to the Roomba (again, available from Digikey for $1.11/ea) and some wire.

Wiring up all these parts is pretty straightforwards, but if you want to peek at my schematic, here's the pdf. The only two parts on that document not mentioned above are a capacitor on the power input and an additional resistor for the PT6101A that properly sets the output voltage.


My final stack, including a plastic mounting board, looks like this:

The final cost of materials should be ~$250 (not including the PCB-layout software for creating the board).

The Software

If you follow the instructions on the gumstix programming page, you'll find yourself with a C/C++ compiler for the gumstix board. A few software notes for the gumstix:

My particular application is controlling the Roomba with an (evolved) neural network. Although the gumstix does not have native FPU support, the softfloat library works well enough. I've been able to hack together a program that loads a neural net from a file (that's been scp'ed to the gumstix), backs the Roomba off the dock, controls it with the neural network for a few minutes, and then returns to the home base. I've achieved a command rate of ~33Hz, and that includes operating the neural network. If you're interested in the particulars, email me.

The Final Product

Mounting the whole contraption to the Roomba provides a challenge. If the controller is mounted outside the circumfrence of the robot, the behavior could be impacted. However, if the controller is mounted on top of the robot, its ability to go under low-hanging objects is compromised. My particular application ensures that the Roomba will never go under anything, so I chose to mount it on the top, but this does make the robot a few inches taller. The stack does fit in the dust bin, so that's an option as well.

Because I didn't want to put a hole in the plastic cover, I attached the controller to a plastic plate which I then attached to the Roomba via velcro. The finish product looks like this:

Future Improvements


Bryan Adams
32 Vassar St. 32-380
Cambridge, MA 02139
bpadams@csail.mit.edu

Last modified: Tue Jan 25 10:52:01 EST 2006

Site Meter