Lego Color Sensor Circuit!

by max on Monday, March 9th, 2009

If you need to detect colors in your future project, whether that’s for your Lego Mindstorm or whatnot, you might want to take a look at this nifty color sensor circuit and save a lot of headache and time.

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

via hackedgadgets

More resource on color sensor circuits:

Advertising
Advertise Here

Leave a Reply

   Connect with Twitter

If you like this post then please subscribe to our full feed RSS or follow us on Twitter @Zedomax.

You can also subscribe by E-mail by filling out your name and E-mail below:

Name: Email:
Got a new hack, DIY, howto, or gadget you want us to blog about?

Tip us via Twitter @Zedomax or send e-mail to zedomax [at] gmail.com.

You can also use our free Guest Blogger services.

Try Goohack to find a new Hack:

Related News and Resources

Other Interesting News From Our Friends


Featured Sites From Zedomax Blog Network