The Control Lab Box allows the LEGO sensors to interface with the computer.
It connects to the computer via a serial RS-232 serial cable and has a
built-in 10-bit data acquisition board. There are 8 input channels and
8 output channels. For ease of use, these ports are color coated. Black
connections are for outputs, while the four yellows are for temperature
and touch input sensors, and the four blues are for digital information
inputs such as with angle and light sensors.
The Control Lab Box is extremely versitile and relatively inexpensive ($250, compared with other data acquisition boards which cost a lot more). The drawbacks are since the Control Lab Box is connected serially, the sampling rate can't be controlled and samples each channel at 60 times a second. Voltages are limited to 16 Volts per channel, and there are no counter or digital input/output capabilities.
Inputs |
Outputs |
||
| Light Sensor Contains a built-in red diode that senses different wavelengths of light. |
|
Motor Output 8 different speeds capable of going in 2 different directions (clockwise and counterclockwise) and pulsing. |
|
| Angle Sensor Measures rotation in 1/16 increments. |
Sound Output 2 different tunes with 8 different volume levels. |
||
| Touch Sensor An on/off switch inside a LEGO brick. |
Light Output 8 different brightness settings and blinking. |
||
| Temperature Sensor Measures temperature ranging from -20 degrees to 50 degrees (celsius) |
Here at LDAPS, we use LabVIEW, a graphical programming language developed
by National Instruments, to create a software interface to link the Control
Lab Box to the LEGO sensors. The user can instruct the computer what to
do with the information it receives from any of the input sensors and what
information to then send to which output channels. LabVIEW's object-oriented
programming interface is easy to learn. Children (and teachers) can create
and run programs (called vi's) without knowing how to read and write. This
picture is the "code" for a program to run a motor for one second
and stop. We use this programming language to control the LEGO Bricks.
However, it is a full development language, capable of the most complex
data acquisition procedures.