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.
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:
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).
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:
The gumstix claims to provide access to three serial ports, named HWUART, FFUART, and STUART. This is only technically true. HWUART exists, but shares lines with the connection to the netCF card (HW -> "hardware"), and is therefore unusable. The FFUART (FF -> "full function") exists, but is used as an output terminal for the uboot and a console tty. You will want that for debugging, so that leaves you with the STUART.
The "device detect" line (used to wake up the Roomba) would normally be tied to a hardware flow control lines on the UART, however, none of the gumstix UARTs provide these lines (they note that "full function" (i.e., FFUART) is a "really a misnomer" -- ha). No big deal, though, as the GPIO lines are easy to use and very flexible. (I chose GPIO41 because, during design time, I operated under the misguided theory that a pin called "FFRTS" might be the RTS signal from the FFUART. Luckily, it still works.)
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.
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:
Last modified: Tue Jan 25 10:52:01 EST 2006