Page 35 - Hacking Roomba
P. 35
16 Part I — Interfacing
for the LED’s light. But unlike the interrupter-based sensor, these are looking for the reflected
light of the LEDs. For the cliff sensors, they are looking for light reflected from the floor
(meaning the floor’s still there). For the wall sensor, it is looking for a wall (to enable it to fol-
low walls). One problem with just having an LED shine and looking for reflection is that the
ambient light could trigger false readings. On a bright sunny day you’d find your Roomba pro-
totype not able to find walls and always falling down the stairs. The common way around this
is to modulate the light emitted by the LED and then only look for light that’s been encoded
in that way. For most robotics applications, including the Roomba, this is done by turning on
and off the LED 40,000 times a second (40 kHz).
The last infrared sensor is the remote control/virtual wall/docking station sensor that is visible
as the small round clear plastic button at the 12-o’clock position on the bumper. This sensor
works just like any other remote control sensor for consumer electronics. It has an interesting
360-degree lens that enables it to see from any orientation.
Internal Sensors
The most commonly used internal sensors are the wheel-drop sensors. All three wheels have a
microswitch that detects when the wheel has extended down. In the case of Roomba, these
wheel drops are equivalent to cliff detection since they are indicative that the Roomba is in
some dire situation and should abort its current algorithm.
The dirt sensor is a small metal disk (or two) under the main brush and appears to be a capaci-
tive touch sensor. Capacitive sensors are used in those touch lamps that can be controlled by
simply placing a finger on a metal surface of the lamp. Although the touch lamp sensor only
provides an on/off result, the dirt sensors provide an analog value.
The last set of internal sensors is the various power measurement sensors. Because power
is so important in a robotic system, there are many battery and charge sensors. There is an
estimated capacity and present capacity (charge) of the battery. Both of these are analog
values with units of mAh. You also have analog values for voltage, temperature, and charge/
discharge current of the battery. The latter is useful for determining in real time how much
extra power your project is using. In Chapter 6 you’ll learn how to read these values, allowing
you to dynamically adjust how much power the Roomba and your project are using to maxi-
mize run time.
OSMO//hacker: Hope for Older
Third Generation Roombas
The ROI functionality wasn’t built into the third generation Roomba models when they first
came out in 2004. Only around October 2005 (around the time of Roomba 2.1) did iRobot
start including ROI. With an amazing degree of savvy regarding the gadget-using population,
iRobot has released a firmware updater module called OSMO//hacker, shown in Figure 1-12,
that revs up the software inside the Roomba to include ROI.