i hav a project for my science fair in which i m going to use an arduino and differentiate different objects through their colour.presently i will use only diiferentiate between white and red objects(opaque).is there any colour sensor or something else for such a thing.
If you have just red and white, you can also work with transparent sheet to filter out the red component. That will give you a not-red signal. That's how that colour sensor and the sensors in digital cameras work.
There's that led as receptor trick you can do too.
A red led will create some current in the presence of red light.
But will problably not work for opaque objects...
Should be possible with a cmos camera also... Can the atmel handle some pixel math? heh
here the red led will be placed near a photoresistor which will give high readings when the photoresistor is before an red object......
i don't know if it would work at about 4 inches from the red object??
is there anything else because i am a total newbie in arduino and i know little about i2c and other stuff.
is there any other way for colour sensing?
i clarified the problem statement and it said that there is only red object and the distance between the sensor and the object is max 3 inches.
Maybe you could use a small lens to focus the reflected red light onto the photosensor?
Perhaps mount the sensor at the back of a small opaque tube, then use a small magnifying lens (perhaps a lens taken from the viewfinder of a cheap broken film camera).
Find the rough focal length of the lens by measuring the distance between the lens and a white piece of paper, while focusing the image of a candle or something on the paper (to keep the sensor within a reasonable size, you'd want a focal length under 4 cm).
Mount the lens the same distance from the photosensor; you might want to play with this after your rough measurement to get an optimum distance for best sensitivity.
If your photosensor has a wide enough bandwidth to cover the entire visible spectrum, you could make a multi-color sensor by mounting an RGB color wheel in front of or behind the lens, to filter out just that color, then have a motor or a servo rotate the filter to the color as needed. After calibration with some standard color swatches, you could possible detect a wide range of RGB values with this method. However, it wouldn't be cheaper than commercial sensor offerings, nor would it work better or faster, but you would gain a good understanding of how such sensors work internally...