This chapter has presented some simple sensors you can build yourself, but there are many other possibilities. Michael Gasperi's web site (listed in the ''Online Resources") has several outstanding
ideas. Once you've built the signal splitter (Figure 11-5), you can attach any old electronic circuit to the RCX's inputs. Michael Gasperi has built several interesting sensors based around the use of
operational amplifiers (op amps).
The first of these is sound sensor. This sensor can detect sounds like hand claps; you can program your robot to respond to sound. Basically, this circuit uses an op amp to amplify the signal from a
microphone.
Michael has also built a differential light sensor. This sensor actually contains two photoresistors and some circuitry. The circuitry interprets the signals from the two photoresistors and sends a
signal to the RCX that indicates the balance of light between the two photoresistors. This process allows you to easily build a robot that seeks light.
What About Actuators?
I've talked a lot about building sensors; why not build actuators too? LEGO only offers two actuators: motors and lights. The lights aren't very practical and usually serve only a decorative
purpose, although it's possible you could use them to signal other robots.
Page 227
Outside the tidy world of LEGO MINDSTORMS, however, robots have all sorts of different actuators. Three good possibilities for do-it-yourself actuators are servo motors, solenoids, and Shape
Memory Alloy (SMA) wire:
servo motors
Servo motors are special motors that are used in radio controlled cars and airplanes. They are actually an assembly of a motor, some gearing, and some electronics. In response to an electronic
signal, they rotate an output shaft to a certain angle. Interfacing a servo motor to the RCX is a matter of making the RCX produce the right signal. You'll probably also need a power supply for the
servo.
The bottom line, however, is that you can get just as much done with a LEGO motor and a LEGO rotation sensor. The whole point of a servo is that it rotates to a precise angular position; but
that's just as easy to do with a motor coupled to a rotation sensor. As a matter of fact, the LEGO-only solution is more flexible. While a servo has only a limited range of angular motion, the motor
and rotation sensor have no such constraints.
solenoids
A solenoid converts electrical power into a small linear motion. You can harvest solenoids from discarded fax machines and cassette players, or buy them new from a supplier like Jameco.
SMA wire
Shape Memory Alloy is a special kind of metal that changes shape dramatically when it's heated. You can buy wires that contract when they are heated. Conveniently, you can heat SMA wires by
passing current through them. SMA wire should be simple to interface to the RCX's outputs. Note, however, that heated SMA wire can melt LEGO bricks—mounting the SMA wire may be a
challenge.
Online Resource
General Information
Mindstorms Sensor Input
http://www.plazaearth.com/usr/gasperi/lego.htm
This is the definitive online resource on the inputs of the RCX. It contains a wealth of information about the inputs themselves, the official LEGO sensors, and sensors you can build yourself. It's
full of schematic diagrams, graphs, explanations, and links to other people's RCX sensor web pages.
Need help?
Do you have a question about the MINDSTORMS Robots and is the answer not in the manual?
Questions and answers