LEGO Mindstorms

First released in 1998, LEGO Mindstorms was originally known as the Mindstorms Robotics Invention System (RIS) Kit and contained a control brick known as RCX to which you uploaded a program with infrared. The software would then run, control the various motors and sensors connected to the RCX brick, and communicate with others via IR. This naturally had the usual problems associated with IR as covered in Chapter 1 (primarily line of sight). There were two versions of RCX released, and both operated the IR at different carrier frequencies (although both RCX modules can transmit on either frequency) but were functionality identical.

The programming could be done in many languages, including cut-down versions of Java, C/C++, Lisp, and Forth, provided it was compiled into suitable code for the internal microcontroller, a Renesas H8/300. Because of its age, it is now available fairly cheaply, although the supplied IR transmitter has no support for any 64-bit operating systems and is losing support for newer 32-bit ones.

From RCX, LEGO moved to Mindstorms NXT in 2006. This increased the specification of the main brick by improving the processor (now a 32-bit ARM7/TDMI chip) and communications devices (it now included USB, Bluetooth, and an onboard 100 x64 pixel LCD matrix). This upgrade in processor has necessitated a change in control software, but that is to be expected, and most of the RIS code has now been ported to NXT. The LEGO components also improved, as shown in Table 2-1.

Table 2-1. LEGO Mindstorms Specifications

Kit

Motors

Touch

Light

Ultrasonic

Sound

Color

Sensors

Sensors

Sensors

Sensors

Sensor

RIS

2

--

2

1

--

--

NXT

3*

1

1

1

1

--

NXT 2.0

3*

2

1

1

--

1

NXT Education

3*

2

1

1

1

--

* These are servo motors, which internally monitor their position for greater positional accuracy.

* These are servo motors, which internally monitor their position for greater positional accuracy.

Since 2009, Mindstorms has been on its third iteration (NXT 2.0) and consists of the same RCX brick as NXT version 1.0, some alternative LEGO Technic bricks, and a change in sensor from sound to color. This was an odd change, since now all NXT 2.0 robots are deaf by default! This might have been a ploy to sell more add-on sensors, however, but for the wily hacker, these can be made much more cheaply using standard electronic components using instructions found on the Web or in various books, such as Extreme NXT?

Where LEGO Mindstorms excels is its ability to rapidly prototype hardware that can be controlled by the computer, as well as remote sensors that can relay information back to it. This provides a method

6 Formally called Extreme NXT: Extending the LEGO MINDSTORMS NXT to the Next Level (ISBN 978-1590598184)

whereby the computer's state can be demonstrated by something in the real world. Similarly, it allows the real world to be understood, to some degree, by the computer.

Home automation is full of ideas, and not all of them have the staying power to enhance your living once their novelty has worn off. This makes LEGO perfect as a means of building proof-of-concept hardware before devoting time and money on PIC chips, motors, and cases that will be used for only one project. Here are some ideas:

• Create a robot that waves, or gestures, when an email, private instant message, or phone call is received.

• Use the LCD on the NXT processor block to relay information, such as weather.

• Create a robot to open the fridge and bring beer into the living room.7

• Create a Bluetooth gateway for sensors and devices around the house (for a cat flap or pressure mats).

The handling of each sensor and motor is very simple since it's simply a matter of programming, using one of the available Linux environments, such as leJOS NXJ (Java for LEGO Mindstorms) or NXC (Not eXactly C). There are books and web articles abound on the subject, including this useful start point: http: //vikram.eggwall .com/computers/nxt. html.

Was this article helpful?

+2 0

Post a comment