Fail of the Week: Color Meter for Adjusting LEDs

fotw-color-meter

[John Peterson] answered our call to document your hacks by discussing what he learned while building this color meter. He conceived the project as a way to precisely match the color output of LEDs driven with a PWM signal. The thought was that it could sample an LED’s output, then use that data to calculate values necessary to match the color of other LEDs. This is a good idea when using LEDs of different types, but even diodes from the same production line can show variations in color output.

Of course this project wouldn’t be featured as a Fail of the Week if it worked as he had expected. It turns out the sensor that he used, an Avago ADJD-S371-QR999 on a SparkFun breakout board, takes very quick color readings. This is great for solid objects, but not great for a light source being switched on and off like the PWM LEDs.

We like it that [John] posted a list of lesson learned on the project. The real fail is in trying to use this particular sensor, but we figure there must be some way to get meaningful data through sampling. Check out the page for the retired sensor which also includes a link to the datasheet. Can you think of a firmware hack which would allow this hardware to sample so that the PWM value could be extrapolated through averaging or other calculations? Let us know in the comments.


2013-09-05-Hackaday-Fail-tips-tileFail of the Week is a Hackaday column which runs every Wednesday. Help keep the fun rolling by writing about your past failures and sending us a link to the story — or sending in links to fail write ups you find in your Internet travels.

Nintendo light gun retrofit lets it play color-based games

This Nintendo light gun, aka Zapper, looks like a stock device. But a peek inside shows that the circuit board has been replaced. [CNLohr] added USB functionality and a few extra sensors that let him write his own games for that use the classic controller.

After cracking open the case he measured the shape of the circuit board so that he could recreate it exactly. This let him design his own board that would drop right into the same plastic support pieces as the original. His circuit uses an ATmega8u2 to provide a USB connection and read the attached sensors. One interesting aspect is the group of four long traces that act as an expandable i2c bus. [CNLohr] went with this so that he could use daughter boards to add in sensors later. In the demonstration seen after the video he’s using a photodiode as a color sensor. It allowed him to write the color-based game seen above where you shoot a different color of target in each round.

[Read more...]

Color sensor gives the RGB values of anything

[Rick Osgood] wanted to build a color sensor that could be held up to any object to get RGB color values. He originally started with a photoresistor and a few LEDs, but couldn’t get that to work reliably. [Rick] finally completed his color sensor after finding a digital luminosity sensor on Adafruit, ending up with a pretty accurate piece of hardware to judge the color of something.

The idea behind the color sensor is to light up red, green, and blue LEDs and see how much light is reflected back from the object with a luminosity sensor. [Rick] chose an Arduino to do all the heavy lifting for the light sensor and activating the LEDs.

After a few tests [Rick] got his color sensor working, but it’s not up to par with what he had expected. This isn’t really a problem: the LEDs probably don’t have the same brightness and the luminosity sensor doesn’t respond evenly across the entire rainbow. Those things can always be fixed in software, though. It’s a nice project that could serve as part of a prototype for this color picker pen.

Color sensing with an RGB LED and photoresistor

[Fjord Carver] brings together an RGB LED and CdS Photoresistor to make a color sensor. Those Cadmium Sulfide lights sensors usually have a very wide swing of resistance when exposed to varying levels of light sensitivity. That makes for great resolution when reading them using the ADC of a microcontroller. The LED comes into play by shining known wavelengths of light on the surface being measured. Three separate readings are taken with each of the LED’s different colors, then used to extrapolate the RGB value of the test material. We saw the very same method used a couple of years back. This time around it’s an Arduino doing the measuring instead of a PIC.

So why isn’t that sensor shown in this picture? It’s because we appreciate the application which [Fjord] is using for this sensor. He built a lamp that shines the same color as the surface on which it is placed.

Follow

Get every new post delivered to your Inbox.

Join 91,338 other followers