Colour sensor idea, advice needed please.

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

Reply to
Dan Messenger
Loading thread data ...

You are not far off at all. Infact colour measuring equipment do something like what you want to do. They use white light, and have a photosensor system using the proper calibrated filters to pass the light. The luminosity must be first calibrated for a reference to take an accurate measurement. If you want to do this to a good degree of accuracy, it will be complicated.

This can get very involved. If you go to a good university library, or do some searching on the net, you should be able to come up with some good information about this topic. In a university library you would be able to get the involved text books on the subject.

Accurate colour measuring equipment can easily run in to the many thousands of dollars, just to give you an idea of what is involved.

You can look at a site called Photovolt

formatting link
This instrument is a precision laboratory standard unit, that is used in may industries of various types. For example, if you were making a product where you wanted the colour to be consistent this meter will help to do that. These are used in many industries such as food manufacturing, printing, paint manufacturing, and any product where colour consistency is important. The human eye never sees colour exactly the same all the time. The perception of colour changes with the ambient light, and how we feel at the time. These colour meters can see colour shifts much smaller than any human or animal can see.

A colour meter for liquids from Photovolt

formatting link

--

Greetings,

Jerry Greenberg GLG Technologies GLG ========================================= WebPage

formatting link
Electronics
formatting link
=========================================

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

Reply to
Jerry G.

This works, but there are a number of problems. Your apparent level of knowledge seems to indicate this would be a major task, as overcoming the problems is not quite trivial.

Yes, possibly.

Depends what you want it for. Colour sensors are available. More details on what you'r trying to do would be handy.

Reply to
Ian Stirling

turn),

Your idea is good, but you must take into account a few things. First, a CdS cell is a poor choice because it has terrible response to some colors. What you want is something with a better spectral response, like a silicon photodiode. Second, you need to take ambient light readings to try to compensate for them. While shielding the object is a great idea, it does not always work as you would like. Three sensors with three different filters is a pretty good way to go, but as you note, the positions of the sensors can greatly vary the signal you receive. Also, proper filters are difficult to get without incurring a lot of expense. I can give you a suggestion for the placement problem, though. Use fiber optics. By making a bundle of fine light fibers and using it as your "eye", you can eliminate the parallax or target position problem. This is because you take the fibers and route them to the different sensors (or light sources) as you would like, thus breaking your target into many tiny sections of the image that are evenly distributed over your target. Try this and when you run into your next roadblock, post again.

Reply to
Sir Charles W. Shults III

Hi,

Firstly thanks for your responses, 2ndly a bit more about what I want to do:

Basically I haven't decided what I want the sensor to do yet. We have to do a project at uni which involves 2 stages. Stage 1 is to build a robot from design and parts given, the bot base is about 9cm by 16cm, and has ultrasound sensors on it. We have to program this robot to be able to avoid / follow objects (using a PIC). All the PCB etc for this is provided. The

2nd stage is to "add additional features" to the robot. This is where my colour sensor idea comes in.

I haven't decided what I want he colour sensor to do yet, I am thinking something along the line of getting the robot to move around and maybe locate a particular coloured block, or perhaps stay in a region bounded by coloured floor tiles, or a combination.

The precision of the sensor doesn't need to be too great, although obviously it will need to be able to distinguish 'base colours', and obviously calibration will be needed.

Currently I'm just throwing ideas around my head, and was wondering how feasable an idea it was. Or if you have another idea of how I could adapt the bot, feel free to suggest it (we have 30hours assigned lab time, and whatever else we want to put in over the next 10 weeks).

-Dan

Reply to
Dan Messenger

How about having it follow different colored stripes of tape on the floor/walls/ceiling? It would have to find stripes, then determine its orientation WRT them (directional data could be extracted from sonar data), which breaks the "target acquisition" problem into chunks.

For the add-on to the usual sonar, use two optical systems in tandem. One looks all around to rough-cut targets (is there a red/green/blue object visible and in which direction?) correlated as above with sonar data and the second targets a selected color. Charles Shults' fiberoptic "mosaic" trick would be perfect for the first task, then a limited version with a smaller field of view (or switchable optics in the main system) does the fine work.

I don't see why you want an _active_ color vision system. Why not use filtered broadband sensors using ambient light? That way you could sense and compensate for changes in available spectrum (say going from daylight to fluorescents, even candlelight). If you're gonna show off, do it right! ;>)

Mark L. Fergerson

Reply to
Mark Fergerson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.