| Back to Summary | Back to Experiments |

Tom Gray's Color Experiments


From: Tom Gray
Date: Wed, 23 Jul 2003 20:37:44 -0600
Subject: Color vision: Hello from Tom

Hello and thank you to all who are interested in pooling ideas. Some background:

1. David Cook of Sandwich fame at www.robotroom.com/ColorSensor.html is looking at reflective color; he doesn't seem to have done much since his first post of this, though his initial results are positive.

2. Bruce Robinson, Wilf Rigter, and others (including Jenny Rolfe) were using color gels; you can see some of this work at www3.telus.net/rfws/soccer/index.html. I think Jenny has built this with some success.

3. I replaced the CdS photoresistors with the TSLX257 color photodiodes from TAOS (www.taosinc.com/category.asp?cateid=18). You can decide if I made a good choice. Some of you may want to work with these chips, and I suggest you email TAOS for samples.

My initial series of tests used only red and green sensors and did a few initial runs to find out how the color diodes worked (Color Test Setup) with some colored LEDs. I quickly found that ambient IR would wipe out any color response and found it necessary to shield the entire setup, hence the black tube in the photo. Through all my tests, I have had to fight the fact that these PDs are highly sensitive to IR.

I then built Eye 1 (see photo) using two 35mm film canisters with the bottoms cut out, and a large lens from an old camera. The sensor array was about 1 cm behind the focal point of the lens, with a double thickness of waxed paper as a diffusion grating (which worked quite well, why didn't I think of it FIRST instead of the 17 other things I tried?). I teamed the R/G sensors with a 74HC139 2-to-four line decoder. The op-amps and ambient light detector were more or less as in Wilf's circuit. The TSLX257 series goes high on detecting light of appropriate color, so an inverter might be handy but I was fine with having all the LEDs from the 74HC139 outputs being constantly on except for the one for the color detected (I am running on a bench power supply). These initial tests showed good results for detecting black, red, green, yellow (red+ green) and white (equal to yellow for these tests) at distances of about 30 cm using flat paint samples (you can get these little cards from any paint store). Later tests with R/G/B were also promising and the eye detected and correctly identified my blue shirt about a meter away. This system is quick to respond: just passing the color strip across the lens 30 cm away causes a blink in the appropriate LED.

Eye 2 is smaller and lighter. It uses a piece of tubing from a thermal fax paper cartridge, a small lens from a toy telescope (thanks to Dave from the Leduc BEAM group for the lens!) held on with heat-shrink tubing. The h-shrink is not tight, allowing me to adjust the focus. A double layer of waxed paper is held inside the tube with o-rings, about 1 mm above the sensors. In both eyes, the sensors were soldered to perfboard and the leads brought out to a header for the breadboard. In eye 1, I had the sensors clustered around the ambient light detector, which was a mistake; in eye 2, the sensors are 'head to head' in a triangle, and the a-l detector is on the breadboard. With eye 2, colors can be identified fairly well at 30 cm. Except for blue, which only catches bright hues. I am currently testing several versions of the ambient-light detector circuit, there is a lot of variety here with drastic results. The one from Bruce Robinson's Hider works well.

The big problem is IR. These eyes work only under the fluorescent light on my workbench, which is low in IR, and only with the other lights in the basement turned off. However, eye 2 and some revised A-L circuits have improved this considerably. Best color recognition is for the primary colors, and is best for red and green. However, various hues are correctly identified. Secondary colors--orange, brown, magenta--are poorly identified, though yellow is good.

For some purposes, all of Wilf's circuit is not necessary and for a lot of my tests I am just looking at LEDs hooked directly to the sensors. Color is seen, output goes high, LED lights. My immediate goal is a small robot that will respond to red or green. What's the word here, colortropism? Don't anybody dare suggest--ugh--colorvore. The things don't eat color, they will just respond to it!

I don't know where to go from here. In order for this type of eye to be useful in normal room light, they need IR blocking. I have written for IR blocking filters; they're available in camera stores but who wants to pay that kind of bucks? If anybody can turn up a cheap source of these filters, I’d be grateful.

Keep BEAMing and dreaming

Tom

Color Test Setup

Eye 1 Photograph

Eye 2 Photograph

Eye 2 Sensor Array


From: Martin Jay McKee
Sent: Thursday, July 24, 2003 12:31 AM
Subject: RE: Color vision: Hello from Tom

It would increase complexity but one possibility, that would avoid an IR filter, is to add another sensor with a IR pass filter. The addition of another line of amplifiers (arranged as difference amplifiers) to subtract the response of the IR specific sensor before sending the levels to the comparators. I'm not sure that the addition of a sensor, and more electronics would offset enough to warrant the complexity though.


From: Tom Gray
Date: Thu, 24 Jul 2003 08:54:56 -0600
Subject: RE: Color vision: Hello from Tom

Martin,

There are similar plastic IR block filters and I have written to various manufacturers for samples for testing and evaluation--with no takers so far. Since the IR response of the red, green, and blue PDs varies, it would probably be best to have a pair of each color with one for IR and one for visible, do the subtraction, maybe amplify the signal. This adds quite a bit of complexity. Since a really simple IR pass filter can be made from a couple of strips of color negative, I might try adding a single IR detector, just as there is a single ambient-light detector. Or, since the red PD is most sensitive to IR, I might just do that one. I'll play with it a bit down the road.

Thanks

Tom


From: Tom Gray
Date: Thu, 24 Jul 2003 22:58:44 -0600
Subject: Note from Bruce R.
> Hi, Tom
>
> You seem to be dealing with IR in the 850-2700 nanometre range.
> Flourescents put out about 1% of their energy here, whereas incandescent
> lights put out 74% of their energy here. The sun supplies 33% of it's
> energy in this range.

Which is why my 'eye' works somewhat under the fluorescent bench light, and only if the other (incandescent) basement lights are turned off. When I look at the spectral responsivity graph, I'd like to clip off everything above 750 nm if possible. That should eliminate the IR problem.

> There's a type of architectural glass (6 mm, green heat-absorbing) that
> removes 80% of the IR light in the 850 - 1800 nm range, and about 60% in
> the 1800 - 2700 nm range. It only filters out 20% to 25% of the visible
> light.
> If you can get your hands on a small piece of this, you might give it a
> try -- at least it will even the playing field a little.

Thanks for the tip. Unaxis in Belgium has 1.1 mm thick glass filters that pass 90% visible, block 50% of 730 nm+ and 95% of 800+; that would be ideal. I have written for samples but I haven't heard from them yet. Other optical sites have camera filters that start at about $50 each, and I'm not interested, thank you.

I will head for the local Crystal Glass and see if they have the glass you mentioned. Maybe I can get a little strip. Also I have heard that digital cameras have IR block filters so I will start looking around for a source for discards.

I have finished this set of experiments, which have shown that the smaller and lighter Eye 2 is functional at detecting both direct colored light (from LEDs) and reflected color under limited test conditions. Next step is to get red and green spotlights and see how the eye does with them.

Keep BEAMing and dreaming

Tom


From: Tom Gray
Date: Fri, 25 Jul 2003 17:21:28 -0600
Subject: IR Block filters

Anybody want a 16cm x 11cm x 1.1mm IR block filter for $62.50US plus S/H? Anybody want to shell out the $750 to get them? NOT ME! 8^(

Time to move in other directions.

Tom

From: Unaxis Optics
To: Tom Gray
Sent: Friday, July 25, 2003 3:38 PM

< snip >
Thank you for your message and interest in our products.

We do recognize the importance of supplying development samples to emerging industries such as yours but unfortunately do not offer free samples, seconds or rejects. Every part that leaves our factories is of premium quality as per the specification. [what, nobody ever breaks one?] We can however offer you 12 samples of the UV/IR Blocker for our minimum order quantity of $750. It is likely that you will find this minimum fee a factor of 10 or more less than most of our competitors.

< /snip >


From: Wolfgang Goerlich
Date: Fri, 25 Jul 2003 19:09:11 -0600
Subject: Re: Color vision: Hello from Tom

I have been wearing glasses for many years, and I usually purchase those self-tinting lenses. The friendly glasses sales people have pitched them to me as protecting from "harmful" UV and IR rays. I am not sure how well they filter out IR, but it may be worth a test. There would be other benefits, such as the fact that they tint over more in brighter sunlight, and near-sighted lenses would give you a wider vision area.


From: Tom Gray
Date: Fri, 25 Jul 2003 19:44:01 -0600
Subject: Re: Color vision: Hello from Tom

Not a bad idea, Wolfgang. I will check with my optometrist for broken or discarded lenses. Some sunglasses claim similar properties. And if you want to invest some money in the work, there are three-in-one-color sensors with IR filters built-in. Bruce R. tells me they are only $80 US each!


From: Tom Gray
Date: Sat, 26 Jul 2003 12:23:26 -0600
Subject: Final Series

Hello, all

I have finished the final series of tests and the results are...mixed. I will be moving on to other things and this will probably be my last note unless IR filtering provides a breakthrough.

CONCLUSION: Under rigid test conditions, the system will recognize (i.e. detect and correctly identify) reflected colors: red and green, yellow, and white at distances of up to 18" and blue at up to 10", with a visual acuity sufficient to recognize a .5 cm strip of white between color patches on a sample card.

The test conditions are:

- ultraviolet light, 2 @ 48" tubes 34W cool white being about 4' from the bench surface
- matte color samples (usually called 'flat colors' locally) held at a 45 degree angle to reflect light into the sensor assembly. If the color sample is not at this angle the sensor does not recognize it.
- other incident lighting reduced

The attached photos show the physical setup. Turns out my cheapie digital camera has limited depth of field, those shots looked okay in the little LCD screen!

Eye 2 consisted of:

- a low-reflecting black plastic tube 2" long and about 5/8" diameter (used to be in the center of a roll of thermal fax paper) - a small lens of diameter equal to the plastic tube (scrounged from a toy telescope, I think) as previously described - a disc of household waxed paper held inside the tube by two rubber o-rings, the paper being about 1 mm from the surface of the sensors; this served as a diffraction grating. - the three TSLX sensors arranged 'head to head' in an equilateral triangle and soldered to a protoboard with the leads sticking out for insertion in a breadboard. This proved to be an excellent arrangement for testing.

Other notes: Under fluorescent light, the sensor did not 'see' my hand (though it saw 'red' under incandescent light) but did see metal objects as white. The place where I had the ALS caused confusion, in that when I leaned over the board to adjust a trimpot I changed the incident light. As I mentioned, the thing correctly identified blue and orange clothing (the latter as red) that I wore, from a fair distance away. Jenny, I tried adding three ultra bright white LEDs to illuminate the visual field. This was effective, but for very short distances, up to about 2", in the dark. For color sample work, though, it would be an effective way to provide a constant illumination.

The circuit led the positive going voltage from each sensor (voltage varies with luminance) to 1/4 of a LM339 quad voltage comparator. An Ambient Light Sensor (ALS) derived from Bruce Robinson's Hider circuit was used as a reverence voltage. At one point I had taken the comparator outputs to a 74HC138 three-to-10 line decoder as per Wilf''s diagram. The output of this chip had ten LEDs, the active one of which was low (LED out) but since secondary color recognition proved iffy I removed this part for simplicity. Because the blue PD was relatively unresponsive, I also ignored it and redid the circuit with a 74HC139 2-to-4 decoder, then later dropped the decoder, simply because it was not needed for the tests I was doing; it worked fine. I used the remaining 1/4 of the LM339 as an amplifier to boost the green signal. Not sure if it did much. I planned to try a LM324 op amp in place of the LM339... hmm, where *did* I stow those things? Couldn't find 'em.

Does anybody want the whole circuit for comments or improvements? If you don't have the color PDs from TAOS, it won't do you much good! I still want to try Martin's idea of a difference amplifier.

As for direct lighting, the sensor worked marginally with a 60W incandescent bulb well behind the 'eye' and aimed at the color samples. If the samples were too close (within a foot) everything was 'seen' as white regardless of color. The same proved to be the case for red and green colored incandescent bulbs--regardless of distance, they were seen as white, as were reflected colors. So my idea of tracking down areas of red or green light won't work with those bulbs. I have had no luck getting free IR block filters, though you have given me some ideas regarding sunglasses or architectural glass that I have yet to pursue.

Direct lighting with colored LEDs remains a possibility, but any bot built to track down a LED will pretty well have to be nocturnal. Which might not be too bad--a sort of electronic cockroach that scuttles Hider-like for a dark corner when you turn on the lights? I might try having timers that turn on LEDs of different colors to which the bot could respond. But it's still a long way from the 'follow my wife's red slacks' kind of idea that I had hoped for.

Thanks to you all for your comments and encouragement during the past month. Any last suggestions or comments before I leave this for a while?

Keep BEAMing and dreaming

Tom


From: Tom Gray
Date: Fri, 8 Aug 2003 21:01:35 -0600
Subject: New Sensors

Hello, all

Today I received three each of two different IR-blocked sensors from MAZeT Electronic Design in Jena, Germany. The sensors, MCS3BT and MCSiBT, are described at www.mazet.de.The company impressed me by including spec sheets and app notes in English, which TAOS did not do.

They are actually rather pretty! Electronically and optically, the two sensors are virtually identical. The MCSiBT has a slightly larger sensor area, consisting as it does of a number of tiny three-color sensors in a hexagon shape, which might give it a greater sensitivity. I will be able to plug each version into Eye 2 without too much trouble in place of the TAOS photodiodes, and the fact that the two MAZeT sensors are identical in size, shape, and pin out will make comparison testing easy.

Unlike the TAOS TSLx257 sensors, which contained internal circuitry, the MAZeT sensors require an external trans-impedance amplifier. I guess I will be learning more about those. I am guessing that they could be built from discrete op amps, but I have found that these are widely available in different packages from different companies (including MAZeT--I should have asked for some!)

I hope I can count on you to help me select something appropriate for these sensors.

Bruce, it looks like you were right about requesting samples from the parent company. Jenny, any luck with that company in the UK? Oh, and did I mention I got a sample of Low-E glass from a glass company? It blocks about 25% of the IR in sunlight. Might help and certainly was nicely priced (=free).

Keep BEAMing and dreaming

Tom