Differential Light Sensor


The LEGO Light Sensor can be used to track a light source, but it doesn't work very well because it only measures the light level at a single point. When the overall room light changes the tracking can be fooled. The Differential Light Sensor presented here uses two light sensors and sends the difference in light level back to the RCX. The plot below shows how the Light value read by the RCX is around 50 when the level of the light is balanced between the right and left sensors. When the right sensor sees more light, the value increases and when the left sensor sees more light the value decreases.

The circuit for the sensor is shown below. The two CdS photocells make up a voltage divider. They will divide the voltage across them evenly (2.5V) if they see the same light and will vary the voltage as one or the other sees more light (0V to 5V). Resistor R2 and the 5.1V Zener diode establish the voltage they divide at about 5 volts. The OpAmp simply buffers the voltage and sends it back to the RCX. All of the parts are available from Radio Shack and can be built onto a small piece of PC board as seen in the photograph below. The RCX input is set to think it has a normal Light Sensor.

Here is my finished Differential Light Sensor. It was built by cutting away all but the sides of two 2x4 blocks and hollowing out a third. The stack was glued together with liquid plastic cement. In the photograph of the bottom the yellow 2x4 plate has not been glued on yet. In operation a shield (gray right angle piece not visible behind yellow plate in photo) needs to be placed between the sensors that looks something like a nose. When the robot turns away from the light, one sensor will still see the light while the other falls into the shadow of the nose.


Click Here to Return to the Main Page