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.

Comments

  1. Brendan Orr says:

    Bah, beat me to it! Only mine uses 6 different LEDs instead of a single RGB one. Also, im using a TSL-230R Light-to-frequency IC instead of a photoresistor. Haven’t got through the calculation portion though.

  2. Mike says:

    If the LEDs themselves were exposed, you could also get directional information. Nice work here!

  3. Craig says:

    I really like the chameleon concept. I struggle to think of good applications for colour sensing, but this is cool.

    • Sonny_Jim says:

      One use I thought of was in a Pinball game. I’ve seen implementations such as Twilight Zone that use a ceramic pinball coupled with eddy sensors to provide different scoring based on the ball used.

      With this method, I could use 2 different coloured steel pinballs and be able to tell them apart electrically.

  4. Nippey says:

    Nice application for this concept, I this method from Lego NXP mindstorms for some time now. The system was able to recognize about nine different colors.

    But colour sending with this method can be difficult, if the wavelengths of the led and the material do not match. The result
    would be black (or at least almost)

  5. Fjordcarver says:

    Awesome, another one of my doohickeys is on HAD!!!
    (Glad you like the Chameleon Lamp, feel free to vote for it on Instructables)
    @Nippey, that is why I am controlling the colour(hence wavelength) with 3 LEDs. Try breadboarding one up, it only takes 5 minutes. I put up a processing sketch that will show the results. More than 9 colours, very little comes back black…except really black black. (this is largely dependent on how you set the balance)
    Thanks Hack-A-Day!! (Thanks for picking this up, hope it becomes as popular as my tilt switches did. I won a prize, and I suspect it largely had to do with the traffic coming from here)
    So go vote!!! And check out some of my other ‘ibles, there might be something else that you like.
    Share and enjoy!

  6. minos197 says:

    Thats a nice coincidence.We just submitted a similar simplified project for our embdedded systems module.The main difference is using a single ultra bright white led and an LDR so its actually detecting luminance variations.

    My question lies what would happen if you use infrared LED and phototransistor?Colors react differently to IR but its more reflective and much easier to filter for the sensor.

    As for the applications you can for one built a 2 stage Rfid detection circuit that will read the tag and the color of it.

  7. Fjordcarver says:

    I am thinking that with one white LED and 3 CdS photocells, each with a coloured transparency filter, you could accomplish the same thing that I have done with 3 LEDs, the real trick is limiting the frequencies that can bounce back(and knowing what you are limiting). As for IR, I think it would just do the same as the white, but with less sensitivity, essentially you are still just getting one reading, which may allow you differentiate between a few colours, but you are not actually getting colour data.

  8. Fjordcarver says:

    Oh and awesome project by the way. really cool

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,718 other followers