Hi,
I have come up with an idea for a colour sensor, however I have ran into a slight problem, and was wondering if you could help.
The theory is this: By independantly shining red, green and blue light at a near object, and independantly measuring the amount of light reflected (by each led in turn), it *should* be possible to detect the colour of the object.
Now, my first idea was to do this: Have 3 ultrabright LEDs (red, green and blue), arranged in a triangle around a cds cell. Shield the cds cell from direct light using black card / insulation tape or whatever.
Then I thought about it some more, and came upon this problem: If the object is not central, then the detected colour will vary. Consider an object whose colour has red and blue elements. When the object is nearer the red led, the red signal shall be stronger - and the blue weaker. When it is nearer the blue led, the blue signal shall be stronger - and the red weaker.
The solution I came up with was to have the light emitting from a single source, e.g. a tri-colour led. However I cant find a supplier ! On Maplins, Farnells and RS I have found a "tri-colour led", but these are 3 lead packages, which do Red + Green and any colour inbetween (full red and green being yellow, the third colour).
And so to my questions: Is this a feasable idea? Or am I mad? What about the problem I speculated? Is this actually going to be a problem? Where can i get a single source led that will do red, green and blue ? Could I use multiple leds to 'balance out' the light ? (e.g. make sure there are equal number of leds on each side of the cds cell) Or is there an 'off-the-shelf' colour sensor that I can use? Will it be cheaper and / or easier to implement than my idea ?
Thanks in advance for any help / advice you can give.
-D@n