LEGO Light Sensor:


Do not try this at home! Taking a LEGO Light sensor apart is not easy and permanently breaks some of its internal structure. I know I tried it.

A guy in Japan named Sasuraibito has done a great job of reverse engineering the LEGO Light sensor. Here is a photograph he took of the inside of the Light sensor and what he thinks is its circuit diagram. I have taken some time to make corrections to his original circuit and added some measured voltages to aid in the analysis. Many thanks to Ralph Hempel, Dennis Clark and everyone on the lugnet.robotics news group who worked with me to straighten the circuit out.

The numbers on the photograph correspond to the devices numbered on the circuit. More photographs of the insides of other Mindstorms parts can be found on Sasuraibito's Japanese Internals Page.

Circuit Analysis:

2,3 and 10 make up the typical LEGO powered sensor power supply circuit. A4t84 is a BAV70 and A1p83 is a BAW56 high speed double diodes from Philips with a VI curve very much like a 1N4148.

11 1/2 is an unused half of a dual opamp, just ignore it. LM358 is a low power, dual opamp from Philips and also National Semiconductor.

1, 4, 6, 9 make up a 7.5ma current source for the LED 5 and phototransistor 7. The two 3Hp83's are BC857, silicon, PNP, general purpose transistors from Philips. The phototransistor is probably something like the Panasonic, PN168, silicon, NPN phototransistor which has a peak sensitivity at 800nm. An interesting side effect of the circuit is that if the phototransistor is exposed to a very bright light like a laser pointer, the LED will go out.

The voltage on the LED is used to bias the opamp second half 11 2/2 LM358.

I'm a little fuzzy about the roll of transistor 17, but I'm pretty sure it helps extend the brightness range of the sensor. 1Ht84 is a BC847W, silicon, NPN, general purpose transistor from Philips used here as a diode. As the current increases through the phototransistor, the VI curve of the diode limits the voltage drop and extends the bright end of the range.

I think the transistor 15 (also used as a diode) in the feedback loop makes up for the voltage drop in transistor 14. Both 1Ht84's are also BC847W silicon, NPN, general purpose transistors from Philips. 14 is a voltage follower used to return the light reading through diodes 13 and resistor 12. A4t84 is also a BAV70 high speed double diode from Philips.

Data sheets for the semiconductors can be found on the Philips and Panasonic web sites.

There is a common operation on LEGO light sensors that involves removal of the LED. The belief is; If the LED is removed, then the sensor works better as an ambient light sensor. I have simulated the LEGO light sensor circuit with and without the LED to quantify the effect. The plot below shows the Light reading that would be made by the RCX over a wide range of ambient light levels. Notice that with the LED the Light reading never goes to 0. Not because the LED shines on the phototransistor, but simply the way the LED biases the circuit. When the LED is removed it takes a little more light to make the sensor start to read anything but 0, but then it operates over the same light level range as before. Conclusion: Removal of the LED creates a sensor with more resolution (0 to 100) vs (20 to 100) while slightly losing low light level sensitivity and losing the ability to use it as a reflective sensor.


 There is also a report by Frank Angeli also describing the LEGO Light sensor internals. I don't think his timing measurements are correct.

Click Here to Return to the Main Page