Engineering Activities Resources Enrichment Program Summer School Contact Us



Lego Mindstorms NXT


In order to operate properly with the Lego Mindstorms NXT, it is necessary to know what components are in the box.



Sensors are devices that provide feedback to the system such as the location and performance. The NXT has the following main sensors


Touch Sensor

A printed circuit board (PCB) mounted push button and a connector.

Light Sensor

The light sensor includes a light emitting diode (LED) light source that can be tuned on and off from software. This allows to measure either the reflected LED light shining back from an object or the ambient light falling on the sensor. Basically, the package contains the LED, phototransistor, and connector mounted on the top of the PCB.

Sound Sensor

The sound sensor includes a microphone mounted in a plastic foam, a capacitor, and the connector on the top of the PCB in addition to an electronic circuit.

Ultrasonic Sensor

The objectives of this sensor is avoiding objects. The guts of the sensor are shown in the following figure. The two cylindrical objects connected with wires to the PCB are the ultrasonic speaker and microphone. This sensor has its own microprocessor, accordingly, it reports distance in absolute units rather than on some relative scale like the other sensors. Its operation is similar to SONAR system. It transmits a short burst of ultrasonic sound at 40 kHz. It then measures the time it takes for the sound to travel out to an object, reflect, and travel back.


Rotation Sensor

The rotation sensor resolves 16 locations per rotation of 22.5 degrees. It detects the vanes on a rotating shaft with two opto-interrupters. An interrupter is a phototransistor and an LED that are pointed at each other with a small gap in between. The NXT watches the states of the two interrupters to determine which direction the sensor is rotating.


The Motor

The NXT motor is a combination of gear reduction and feedback sensing. The gear reduction involves eight different gears.


NXT-G is the programming language of the Lego Mindstorms NXT. The language is mostly graphical, consisting of blocks that perform operations such as input, output, computation, and execution flow.