LEGO Color Sensor

 

If you need to add color sensing to your next LEGO project have a look at this RCX Input Mux & Color Sensor. Full schematics and circuit description is provided.

"Color sensing depends on measuring the intensity of light at different wavelengths. A spectrometer does this by splitting the light with a prism or diffraction grating into its component wavelengths. However, spectrometers are complex and too difficult to build. Another approach measures the light intensity in three primary color bands: red, green, and blue. Then calculates the color or hue of the light in software.
Hue is a single number that describes the overall color of a light. It ranges from 0 to 360, much like the degrees of angle around a circle. In the case of hue: 0 is red, 120 is green, 240 is blue and 360 is back around to red again. Intermediate colors have hues like 60 for yellow, 180 for cyan and 300 for magenta. The calculation of hue from red, green and blue values is a simple algorithm described later.
After substantial experimentation, I found that the blue and green plates were too pale for use individually. Stacking two green and three blue plates created enough filter density for good color measurement. The actual color spectrum of the resulting filters can be seen by photographing sunlight shining through them with a diffraction grating"

6 Comments


  1. wow, this is a pretty cool and informative project, definitely extensible to realms other than the lego world.


  2. yeh cool but how sensitive is it?


  3. Finally, a project I can use all those 4017 and 4066 ICs in. I got a bunch of them in a grab bag of ICs.


  4. Pehden, absolutely! Most of the 4066 are the 74hc4066 series. And it’s only about 10 of the 4017. It’s been a while since I’ve been through my stash.
    This would be an interesting project to add more gates to increase the range of frequency (maybe to add infrared and ultraviolet).


  5. Im just starting robotics. Can you stack more then one sensor on one input on the lego rcx??? If you can then how?

Comments are closed.