| Back to Summary | Back to Experiments |

Tom Gray's Color Experiments

Yahoo! Beam Group Background


From: Tom Gray
Date: June 20, 2005 3:37 am
Subject: Color Vision revisited.

Just under two years ago, I did a series of experiments in simple color vision. Earlier work done by Wilf Rigter, Bruce Robinson, and Jenny Rolf on the BEAM list (and independently by David Cook of Robot Room) had used CdS photoresistors with colored Gels. I repeated these experiments and they gave interesting but far from conclusive results.

I was able to get a set of colored photodiodes, the TSLX257 from TAOS (www.taosinc.com). These nice little components eliminated a lot of the messing around with gels and lenses. You can read this series of experiments at jwgoerlich.solarbotics.net where youll note that the main problem was that these sensors are highly IR sensitive and require either a low-IR light source or an IR filter in the 700 nM range. I was unable to find a source for low-cost filters and so dropped the series.

Some time later, I was able to obtain from MAZeT in Germany some of their lovely little Jenncolor RGB sensors

http://www.mazet.de/produkte/farbsensoren/mcs/en

The MCSA3BT is like a combination of three Taos sensors (Red, Green, Blue) in one case, along with a 770 nM IR filter. The MCSiBT contains 19 integrated color elements in a single filtered case, permitting not only color detection but also (according to the manufacturers) movement and shape detection. By then, I had moved on to other projects, and the MAZeT sensors sat in the drawer for a year; this week, rain kept me in the house and so I dug them out.

This note describes the results of the first series of tests with the MSCiBT. These Jenncolor sensors require a transimpedance amplifier (you can find the circuit in the MAZeT materials) which I made from a LM324 op amp (may not have been the best choice but Ive a lot on hand!). I tried 1M and 3M9 for Rf . The capacitance of the photodiodes is given as <100 pF but some initial measurements with 50 pF, 100 pF, and .01 uF didnt show much difference, so I decided that the value of Cf doesnt seem too critical for this application.

All easurements were done with Vcc at 3.0V, Vref at 1.5V. The light source was a 60W incandescent bulb. The sensor was mounted in a small solderless breadboard clipped at a right angle to one side of my main breadboard. Color samples were mounted at an angle of 45 degrees in a small plastic holder made for the purpose (that angle was chosen to reflect most light into the sensor when the light source was directly above the sample). This setup was quite similar to that used for testing the Taos photodiodes, but in this case no cover or lens was used.

A low reading here indicates a higher color value or higher illimination. A second series of measurements showed that the output voltage varied with

a) The distance of the light source from the sample (the farther the distance, the higher the reading)

b) The distance of the sensor from the sample (ditto)

c) The amount of ambient lighting (brighter light gave lower readings)

These relationships are not linear, and I did not attempt to define the curves.

Final measurements were made with the light source 30 cm (1 ft) from the sensor (and from the midpoint of the sample), and the color sample at an angle of 45 degrees centered 1 from the lens of the sensor. For color samples, I used 1 heat-shrink tubing in black, white, red, blue, and green. These colors were fairly bright (except the green) and a convenient size, and I couldnt find the matte paint sample cards I had used for the original series of experiments. I also used a glossy bright green box that I had in a cupboard.

Wont bother you with the raw data, but here are the averages:

 

R

G

B

Black

1.257

1.312

1.413

White

0.160

0.445

1.079

Red

0.667

1.190

1.313

Yellow

0.255

0.665

1.256

Blue

1.260

1.269

1.356

Green

0.731

0.835

1.257

Except for the green, these are fairly intense color (saturated hues). The bright green showed a similar pattern except with slightly higher figures.

You can see that there is no clear and simple pattern. A given color can be defined as a set of three readings, and given a matrix created from a large set of color samples, it is possible to identify a color with an accuracy, according to MAZeT, equivalent to that of the human eye.

In Wilf's original color sensor, a fourth CdS cell was used to set Vref relative to the ambient light, and this could certainly be done here, as this might also give some way to compensate for the distance between sample and sensor. However, that would give a fourth dimension to the matrix.

A lookup table is something a uP with ADC (analogue to digital conversion) can handle, and MAZeT provides some suggestions for this. It is clear that the MCSi sensors can discriminate between hundreds of colors and shades under carefully controlled conditions. But at the moment I cant see any way for a BEAM analogue circuit to deal with this particular sensor to provide accurate and reliable color identification "in the wild". Perhaps the simpler MCSA3BT sensors will be more useful (Ill do those while I have the gear set up), or perhaps someone can see something Ive missed. I might want to use higher gain on the amp, and I'll certainly try the ambient light idea.

Perhaps this will allow me to add color discrimination to my Sumovore. :)

Keep BEAMing and dreaming

Tom

PS I'm no longer receiving emails from the BEAM list, so if you have comments or suggestions reply directly to grayed at telusplanet dot net and I'll maybe turn them back on for a while.



From: Tom Gray
Date: July 11, 2005 1:02 am
Subject: Robot Color Vision, Continued

Continuing the robot color vision experiments...see message 49781 for background. I have made some progress.

I had wondered if attaching the MAZeT color sensors to a photopopper would do the job. I had been wanting to build Wilf's Lightrider 556 so now was the time. I breadboarded the circuit to make sure it would work with photodiodes instead of LDRs (it did) and also with the MAZeT sensors (it did). I used used the nice little Bertsch gearmotors from solarbotics--originally intended for Creeper, which you'll find in the files section--and rigged a 24-pin IC socket up to hold the color sensors and the electronics. I also rigged jumpers so that I could connect to each of the three (Red/Green/Blue) color elements in the sensors.

The Lightrider worked quite well with LDRs but it showed a more pronounced waggle with the PDs and even more so with the color sensors. However, in all configurations the bot tracked incandescent light quite well (white light is composed of all color frequencies so it would track no matter what color element was active). However, the MAZeT sensors needed a far brighter light source than did the LDR or standard PDs; the LDR would work fine in the fluorescent lighting in our basement, but the MAZeT sensors needed to be within a meter of the 40W incandescent work light over my bench. They do a marvelous job of heading right towards the sun when placed in a sunny spot on the floor... :)

The next step was to test the bot using colored lights. I had purchased a red and a green incandescent bulb ("party lights") for the original tests. My prediction was that with the color sensors set on red, the bot would track the red light but ignore the green, and vice versa.

Tests were conducted in a darkened room with only the colored lights turned on. The results, while still not what I'm looking for, were encouraging. With the sensors set to red, the bot did in fact respond only to the red light and not to the green... but only within 10 cm (4") of the bulb. By respond, I mean that the motors would run alternately depending on which sensor, left or right, faced the bulb. When set on the floor withing 10 cm of the bulb the bot would waggle up and "kiss" the bulb . Faced with the green bulb, the bot simply would simply spin in place.

Set to green, the sensors respond to the green bulb within 15 cm (6") but also responded to the red bulb within 7 cm (3"). In other words, the red sensor would discriminate effectively between the two light sources, but the green sensor would not.

I believe this to be the first demonstrated instance of color discrimination in a BEAM (analog) robot.

These cheap 20W party bulbs hardly represent good quality colored light sources, as they are ordinary light bulbs with a transparent color coating. So my next step will be to see if I can borrow some spotlight gels from the local theatre group and use them with the 500W halogen lights from my solaroller lanes. This will give a brighter light, likely with purer color.

I also want to ask the group if there is another battery-operated photovore circuit that would give better results using photodiodes. I have perhaps six dozen photovore circuits and don't have time to try them all, however much I'd like to. Hypercube? Beamant? PSPV? Herbie/Omnie? Might one of these give better results?

The sensitivity of the MAZeT sensors needs to be increased, and I can put the trans-impedance amplifier into the circuit. Wilf, might there be some other simpler way to amplify the results of the PD voltage divider? Would this be worth looking at?

Finally, I have acquired a variety of Analog-to-Digital Converter chips to learn about, and will be looking to see if I can use the ADC output to trigger a color-related response.

Thanks in advance for any help that comes my way.

Keep BEAMing and dreaming in color,

Tom



From: Wilf Rigter
Date: July 11, 2005 9:48 am
Subject: Re: Robot Color Vision, Continued

Hi Tom.

Great you got a chance to build it. The color sensors seem like low current type. How are you connecting them in a photo bridge? The 556 lightrider1 LDR midpoint has a cap that can be removed to speed up response time with PDs and color sensors. I have modified the 556 lightrider1 to use the same sensitive circuit as the triple 555 lightrider2. Lightrider 1a is attached. The pot can be used to optimize sensitivity and later be replaced with fixed resistors. I will post some low sensitivity PDs (or LED sensors) current boosters tomorrow. Just uses an NPN and PNP transistor for current gain.

enjoy

wilf