NXT: Sensors


Sensors can be connected to the NXT controller through the four input ports, Figure 1. In the following we describe the most common sensors available in the LEGO Mindstorms Education Sets that can be connected to the NXT, the connection cables needed, the internals of the input ports, and how sensors can be accessed through methods in the Java classes of leJOS NXJ. Go to leJOS API for more details.

Figure 1 Sensors and actuators connected to the NXT controller.

Sensors

The NXT controller has four input ports labeled 1, 2, 3 and 4, Figure 1. Sensors can be connected to the NXT through these input ports. The LEGO sensors can be divided into two categories of sensors: NXT sensors and RCX sensors. These two classes of sensors are physically connected to the input ports in two different ways.

Figure 1 The four NXT Input Ports.

NXT Sensors

There are four NXT sensors available in the Base Set: Respectively a light, an ultrasonic, a touch and a sound sensor, Figure 2. These are all connected to the input ports by means of the NXT cable, a six wire cable with RJ16 connectors in both ends, Figure 3.

Figure 2 Four different NXT sensors.

Figure 3 An NXT cable, picture from Custom NXT Cables.

RCX Sensors

There are five different RCX sensors available from LEGO: Light, temperature, angle and two touch sensors, Figure 4. These sensors were developed for the RCX and they all use a two wire cable with 2x2 el-plate connectors in both ends for connection to the RCX input ports. To connect these sensors to the NXT the converter cable as shown in Figure 5 is needed.

Figure 4 The five RCX sensors.
The leJOS Tutorial, (1.2.2006),
Controlling the Hardware: Sensors.

Figure 5 The LEGO 8528 conversion cable.

Input ports

Figure 6 An NXT input port, Hardware Developer Kit, p.6.
.

References

Hardware Developer Kit

Philippe Hurbain, Custom NXT Cables


Last update: 6-09-08