Simple color sensor

Hi,
I need a simple color sensor for my robotic arm, which can basically discern between basic colors. I would like to build one, I'm guess it
should be pretty simple using a photo cell, I just don't know how exactly.
I found this schematic at
http://www.lynxmotion.com/images/jpg/color.jpg
But I don't understand what the circuit on the right (with the LED's is for). I understand that the circuit on the left with the CdS sends the voltage on I/O 12 depending on the color and intensity of the light, but will my robot know which color it is?
Thanks
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@gmail.com wrote:

You would turn each led on in turn and each time read the voltage on I/O 12 to give you the red, green and blue values of the colour.
Another color sensor circuit,
http://www.siliconchip.com.au /
PICAXE Colour Recognition System 29 June 2005
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hmm. I still don't understand what you mean. Are you saying that the output of I/O 12 is the input for I/Os 13,14,15 ?
If yes, then it should light up all 13,14,15. If not then what do I measure the voltage at I/O 12 with, and how to translate that into the color?
Thanks
JGCASEY wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Basically...I/O 12 is an analog input. Probably to a microcontroller or soemthing, the schematic doesn't say. From what I can discern via the chematic and past experiences, it works like this:
1) you turn on the red LED 2) take a measurement and store it 3) turn on the green LED, and turn the red LED off 4) take a measurement and store it 5) turn on the blue LED and turn the green LED off 6) take a measurement and store it. 7) use your stored measurements to mathematically come up with a color based on the intensity of the reflected light from the three base colors (it will give you an RGB value)
I/O's 13,14,and 15 are outputs to source current to the pins of the tri color LED. You turn one of them on, and the LED glows with the appropriate color. The Sensor goes to I/O 12, which is most likely an analog measuring pin. This will give you a numerical value of the intensity of the reflected light for each color. You can use P1, P2, and P3 to "white balance" the sensor, so that from a pure white source, all colors are reflected evenly.
--Andy P
snipped-for-privacy@gmail.com wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

snipped-for-privacy@gmail.com wrote:

As AndyP says the I/O 12 would connect to an Analog to Digital Converter (ADC) interface. I/O 13,14,15 would be set for output. I/O 12 would be an analog to digital input
You could experiment yourself by using a digital volt meter to read out the Cds value and three switches to turn the leds on or off.
JC
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

three ldr's in a tube each, adc the light level for each and ther ya go. multichannel adc would work well enough, but a single with a 2-4 decoder would work as well.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
To detect Red, Green & Blue I used the Taos TCS230 color sensor:
http://www.taosinc.com/category.asp?cateid 
"Integrated Color Light-to-Frequency Converters : The integrated light-to-frequency converter provides RGB color sensing and is performed by a photodiode grid consisting of 16 groups of 4 elements each. The output for each color is a square wave whose frequency is directly proportional to the intensity of the selected color. Each group consists of a red sensor, a green sensor, a blue sensor, and a clear sensor with no filter."
Lyndsay Williams http://research.microsoft.com/users/lyn /
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.