Chapter 10. Light Sensor with LED Control

Back in Chapter 5 we showed you how to build your own light sensors with CdS Light Dependent Resistors (LDRs). However, they lacked the capability to generate light like the LEGO sensor does. This capability is particularly useful for sensing objects by reflecting light off of them instead of just measuring the ambient light level. In this chapter we will show you how to add the same LED illumination control as the LEGO Light sensor.

LED Control Circuit

Pin 5 of the NXT sensor input port, or the yellow wire in cable, controls the state of the LED in the Light Sensor. Unfortunately, the strength of the signal from the NXT is just not strong enough to directly power an LED. We need to add a simple transistor ...

Get Extreme NXT: Extending the LEGO MINDSTORMS NXT to the Next Level, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.