Robots
Robot Construction Notes
Bennett W. Helm
Department of Philosophy
Franklin & Marshall College
Lancaster, PA 17604-3003
We are working on two kinds of robots. One is for student use in class, and the other is for advanced student use in special research projects combining mobile robotics and ALife.
1 Robots for Class
Our Mobile Robotics class (PHI/SPM 255) requires students to build robots that will go out from a “nest” in search of plastic eggs, and return these eggs to its nest. At the end of the course, we have a competition in which robots compete one-on-one with other robots in a double elimination tournament to see who can retrieve the most eggs after six minutes.
Robot bodies are constructed out of K’Nex pieces. For each robot, we’ve ordered a 1000 Piece Explorer Set, Series 1 kit ($34.99 each from K∙B Kids). K’Nex pieces have some advantages and disadvantages compared with LEGO pieces. The major advantage is that they are much cheaper than LEGOs; K’Nex pieces can also be connected at 45o angles, and it is generally easier to build strong structures out of K’Nex than out of LEGOs. A couple of disadvantages are that K’Nex pieces tend to be bigger than LEGOs, so the robots tend to turn out bigger, and that it is somewhat harder to attach motors to K’Nex pieces than to LEGO pieces. Nonetheless, given the price difference, the choice for us seemed obvious.
Robots are controlled by the HandyBoard controller ( http://www.HandyBoard.com/), distributed by Gleason Research ( http://www.gleasonresearch.com/). This controller was chosen because it is relatively inexpensive ($299), reasonably powerful, very flexible, and well documented, with an active e-mail lists and a supportive community. The HandyBoard is programmed in Interactive C, a variant of C. (A freeware version of an IC compiler — currently version 5.09 — is available at: http://www.botball.org/ic/.)
Each robot has two Maxon 12VDC gearhead motors, ordered from Marlin P. Jones & Assoc. ( http://www.mpja.com) for $21.95 each. These are high quality motors, with low current draw (.02 A @ 12V with no load), and in practice rotate at about 60 RPM. The shaft from the motors, however, is quite short: only 9mm. We therefore had to modify them so as to connect them both to wheels and to other K’Nex pieces so as to allow students to build their robots easily.
For sensors, each robot has touch sensors, infrared (IR) distance sensors, and photocells.
Touch Sensors
The touch sensors are subminiature basic switches, hot-glued to the robot’s body. Typically students build an antenna or rotating bumper that trips the switch. (Rubber bands may be needed to ensure that the antenna/bumper does not continually depress the switch.)
Infrared Sensors
The IR distance sensors we use are Sharp GP2D12 Infrared Rangers, distributed by Acroname ( http://www.acroname.com) for $13.50 each. These IR sensors report distance (ranging, according to the spec sheet, from 10 cm to 80 cm, though in practice we’ve found we don’t get quite 80 cm out of them) as an analog voltage, plugged into the analog port of the HandyBoard. These sensors are not as accurate in the distance information they return as the Sharp GP2D02 digital sensors, but for our purposes, accuracy does not matter very much, and we greatly simplify hook-up and take much of the load off the processor by going with the GP2D12. (For more information on these sensors, including links to detailed hook-up information, see http://www.acroname.com/robotics/parts/R48-IR12.html.) Each robot has four of these sensors, which enables students to differentiate eggs from walls by stacking these sensors on top of each other, one set on each side of the robot’s body.
Light Sensors
The photocells are ordinary CdS cells (from Mouser [ http://www.mouser.com], Part # 338-54C348) with resistance from 3K–20KΩ and fitted with special filters (hot glued to the face of the CdS cell). These photocells are used to help robots find their nests: each nest has a beacon constructed out of 16 red, high-intensity (2000mcd) LEDs, which emit a peak wavelength of 660nm; the beacons are fitted with a polarizing filter — polarized in opposite directions — that allows each robot to distinguish its nest from its opponent’s. The photocells, then, are fitted with both a polarizing filter — to distinguish one nest from the other — and a red filter (Roscolux #27: Medium Red) to prevent the interference from other light sources from swamping the beacon’s signal. As you can see from Figure 1, the spectral response characteristics of the photocell together with those of the color filter produce a sensor that is most sensitive to light around 660nm, thereby optimizing the robots’ sensitivity to the beacons. Each robot kit contains four photocells, to enable students (if they wish) to search for both their own and their opponent’s nests — useful if stealing eggs is a part of their strategy.
(a) Photocell

(b) Roscolux Color Filter #27 (Medium Red)
Figure 1: Spectral Response Characteristics
2 Advanced Robot
The more advanced robot we have is designed to learn how to move around in its environment without bumping into obstacles, to search for sources of light, to search for and pick up pieces of food, and to seek out their nests using odometry. The learning behavior we implemented on a relatively simple connectionist network with three layers: one for sensory inputs, one for hidden units, and one for outputs wired directly to the motors. To keep things simple so that learning can happen on board the robot (and so run on the HandyBoard’s relatively slow processor and limited memory), we have tried to minimize the number of sensors to include only touch sensors, infrared sensors, light sensors, and shaft encoders.

Figure 2: Front View of Robot
Touch Sensors
The touch sensors are switches we fabricated from two pieces of circuit board, approximately .75” high and 4.9” wide, joined together with foam tape. A wire soldered to the one circuit board almost touches the copper face of the other circuit board, so that only a small amount of force anywhere along the circuit board will complete the circuit: it’s basically just a simple switch. (See Figure 3.) Six of these switches are mounted around the edge of the robot’s circular body, with an additional arc glued on the outside so that the whole switch projects just outside the body. Consequently, we get complete coverage around the robot body with a reliable and robust sensor.

Figure 3: Touch Sensors
Infrared Sensors
The IR distance sensors are the same Sharp GP2D12 Infrared Rangers as used on the class robots. We use three IR sensors, two oriented to the front and one pointing directly behind the robot. (See Figure 2.)
Light Sensors
Again, we use ordinary CdS cells to detect light, with the same filters as above. We use two photocells mounted just above the front two IR sensors. (See Figure 4.) These photocells can be adjusted to point in any direction parallel with the ground, and the whole sensor can be rotated so as to orient the polarizing filter properly.
Figure 4: Light Sensors
Odometry
For odometry, we use shaft encoders attached to each drive wheel. On its own, this provides fairly reliable distance and direction information, but it is susceptible to various sorts of non-systematic errors, such as that induced by uneven floors and wheel slippage. To partially counteract the effects of these errors, we have also fitted the robot with a gyroscope, using the method of gyrodometry outlined by J. Borenstein and L. Feng (see http://www-personal.engin.umich.edu/~johannb/gyrodom.htm).

Figure 5: Motor Assembly




