I'm thinking about using different colors for the robot to identify different things. So I was wondering what should I use to sense colors? I have a gift card to RobotShop.com so it really needs to be there.
Thanks
I'm thinking about using different colors for the robot to identify different things. So I was wondering what should I use to sense colors? I have a gift card to RobotShop.com so it really needs to be there.
Thanks
There are sensors for that...
But I remember seeing around some website (most likely hackaday.com) that you could sense colors by reading the reflected light coming from the object as you shine different colors.
Have a look at these:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=75358&start=0
The "el-cheapo" way would be to hook up 3 LDRs (light-dependent resistors; also known as CdS - Cadmium Sulphide - cells):
http://www.robotshop.com/mini-photocell-light-sensor.html
...each with a colored filter in front of them (red, green, and blue). Such color filters can be had at photographic and/or theatrical supply stores, as well as some hobby and craft shops. Another source is from acrylic/plexiglass plastic supply shops.
Alternatively, you could use a single LDR and mount the filters on a wheel turned by a servo. Use a lens to focus what is being looked at on the LDR(s). A fourth LDR, with no filter, could be used for contrast measurement (ie - dark to light level), which may help in the integration of the values obtained from the measurement of the filtered light.
If using multiple LDRs, arrange them in a compact delta (triangular) pattern. Use the smallest LDRs you can find. Alternatively, you could use photocells or phototransistors instead of LDRs, but LDRs may be simpler to use. Look up how to hook such sensors up to the Arduino, then use the map() function to scale the outputs to form an RGB triplet to identify the color.
This is more-or-less what is being done by these sensors, found at RoboShop:
http://www.robotshop.com/parallax-colorpal-color-and-light-sensor.html
http://www.robotshop.com/lego-mindstorms-nxt-color-sensor.html
http://www.robotshop.com/parallax-color-sensor-tcs230-db.html
The main differences between each approach:
By purchasing the parts, constructing, and programming your own light detector system - while admittedly more complex and error prone - you will gain a much better understanding and knowledge about how such systems work, that you may not otherwise gain from using a pre-built sensor; then again, because you have to build it, there's a lot more work to be done, and it would likely take away from time for you to concentrate on the main goals for your robot development, which in using a pre-built sensor you would largely avoid.
One thing else to think about, though, by constructing your own sensor (depending on how you construct it): Set up properly, and with the right logic on the back-end, your homebrew sensor could not only (in theory) detect light and color levels, but also direction of movement, something which may or may not be possible the commercial color sensors. This is because you can detect the changes in light levels as the object moves over the field-of-view of the primitive "retina" formed by the CdS/LDR array, and the sequence of those changes in light level indicate a general (though very rough) direction vector; this could be used for gaze tracking, target acquisition, etc.
Good luck, and I hope this helps...
Okay, thanks. But another thing I'm wondering. Would these work to do that?
http://www.robotshop.com/inex-bi-color-led-board.html
http://www.robotshop.com/pololu-qtr-1rc-ir-reflectance-sensor.html
Oh wait. Nevermind, that's not an LED. Forget what I just asked. Thanks for your help!
Okay, but anyways, would I just read what the reflectance was, and it would be equivalent to RGB?
"single infrared LED and phototransistor "
That says nothing about color detection.
http://www.robotshop.com/content/PDF/pololu-qtr-reflectance-sensor-application-note.pdf
would I just read what the reflectance was, and it would be equivalent to RGB?
No.
You would need 'perfect light' to reflect off the coloured object (or are you sensing light colour) and the sensors would have to change their resistance equally with similar powers of different wavelengths which they don't. You would still need to do some after-reading processing to get close to RGB.
You'd be much better off buying a colour sensor designed for the job.
this thread/post discusses a possibility using the TCS3200, although I don't believe this is at robotshop.com:
Color sensing - advice for project - #5 by system - Project Guidance - Arduino Forum
Hi,
There's also the I2C 4-channel 10-bit true colour sensor ADJD-S371 from Avago, now replaced by a ADJD-S311 sold by Sparkfun.
Please find more details for the implementation.
bubulindo:
There are sensors for that...
But I remember seeing around some website (most likely hackaday.com) that you could sense colors by reading the reflected light coming from the object as you shine different colors.Have a look at these:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=75358&start=0
Color Sensor from a Reversed LED and Op Amp - Robot Room
And this one How to Build a Robot Tutorials - Society of Robots
When you shine a linght at an object you will not get back what your eyes are seeing.
You will get a CMY color balance rather than an RGB.
Your eyeballs are not looking at the same thing an electronic compnonet is. In RGB your eyes are looking at the cummulative light pattern produced while a light shined on an object or printed will produce a subtractive or negative color pattern.
Most color sensors I have seen take advantage of this so it may or may not work to your advantage in your project. I just wanted to point out some knowledge. ( or maybe not ).
Take a gander at these:
http://www.google.com/search?q=tsl230+rgb&tbo=p&tbm=vid&source=vgc&aq=f
If you live near a Radio Shack, there's a reasonable chance of getting that tsl230 for next to nothing ($2 last time I saw)