Page 317 - Hacking Roomba
P. 317
298 Part III — More Complex Interfacing
Linux on Roomba?
The microcontroller in Roomba is more like the microcontrollers presented in the previous
chapter: tiny, cheap, and works great for the limited functionality required of it. Putting a real
OS on the microcontroller isn’t feasible. Even if it was, iRobot hasn’t released the specifications
for firmware upgrade nor has the hacker community bothered to reverse-engineer how to do it.
Instead, you can add one of these OS-capable embedded boards to the robot, laying it on top,
and communicating to the robot through its ROI protocol. So, it is Linux on Roomba, just not
Linux in Roomba.
The small systems that run a stripped down version of Linux often have more in common
with tiny microcontrollers like the Basic Stamp than a desktop computer. In the computer/
microcontroller comparison of Figure 13-1, they’re definitely on the microcontroller side. Unlike
many operating systems, Linux is highly scalable. It’s used on terabyte-sized supercomputers
and yet can be shrunk down to a few megabytes to run on a microcontroller. These Linux-
capable controllers are much simpler than a full Linux server or desktop system and you don’t
have to be a Linux expert to make them work. You do need to have familiarity with the com-
mand line, as in the previous chapters, but you don’t need to be a professional Linux system
administrator. If you’re new to Linux, this is a great way learn the basics. All the techniques
used below are applicable to larger Linux systems
Single Board Computers
There is a vast array of different types of embedded boards. Some of these systems are called
single board computers (SBCs) with the exemplar being the PC/104 standard. The PC/104
standard defines a rugged 3.5˝ × 3.7˝ board with edge connectors that have all the I/O function-
ality of an IBM/PC-compatible system. There are many different makers of PC/104 boards.
CPU speeds on these systems range from 100 to 500 MHz and memory ranges from 1 to
256 MB. On them you can run DOS (Windows, or Linux on some) and use standard PC
peripherals. An interesting aspect of PC/104 is that the standard ISA bus is present on the
edge connectors and you add peripherals by stacking components like building blocks. The
PC/104 standard is used extensively in industrial environments, often in specialized data acqui-
sition roles. The industrial users of PC/104 aren’t usually concerned about minimizing power
consumption, cost, or space, so a PC/104 system with Wi-Fi will often draw upwards of 1000
mA of current, cost more than $300 for a single system, and end up taking up a 3.5˝ × 3.7˝ × 3˝
volume. PC/104 is interesting, small, and low-power compared to a full x86-compatible PC,
but there are smaller and lower power SBCs that are even more interesting.
The Gumstix system (http://gumstix.org/) is perhaps the smallest and lowest power SBC
available. It’s not PC-compatible, preferring to throw out that somewhat bulky design for a more
streamlined one. The core of this new architecture is the Intel XScale processor, a RISC-based
architecture called ARM that Linux has been ported to and works well on. The XScale runs
at up to 400 MHz and has 64 MB of RAM, with several useful built-in peripherals like serial
and Ethernet. And it’s all in the size of a stick of gum: 0.8˝ × 3.1˝ × 0.25˝. Similar to PC/104,
you add additional peripherals by stacking boards on its connectors. One of the most popular
board is a Compact Flash (CF) board that a Wi-Fi card can be plugged into. A basic Wi-Fi
Gumstix system would draw about 400 mA and run about $220. Such a system is a natural
for adding to Roomba, and in Chapter 16 you can see an example of Gumstix-controlled