Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Developing a color sensor for bean detection

Not open for further replies.


Member level 3
Apr 6, 2002
Reaction score
Trophy points
Activity points
Color Sensor

Hi ,
Think a bean.And a machine is intended to design for detecting beans which are decayed or some parts of them are decayed.

Or let me explain in another way.I have an orange colored material.It's size is like a bean.Consider there is a dirt or a shell on the middle of the material and color of this dirt is brown.(say 25% of our bean sized orange material has brown dirt).I want to design a circuit which can detect this dirty material even if it has a dirt of 25%.

Can I solve this problem with color sensors , or Do I need to do this job with a camera and using image proccessing thecniques?

And anyone knows about color sensors or websites about this subject?

I think you are on the wrong track here. This would be quite difficult to do by optical methods, any sort of processing would take up too much time when you need to check many thousands. Maybe a simple approach would be better. Do bad ones float in a given density liquid, do they give off any gas, change resistance etc. You get the idea I am sure. There must be some differences between good and bad. Try ultra violet to see if there is any noticable visible difference. :-?

I understand you.I know in industry there is liquid technique that you mentioned.However that technique only eliminates light particles.I must focus on electronics.
Can you please tell me about the ulraviolet technique that you mentioned?
What's the principle of that technique?

You can use a color lens to filter the sensor head. Tunning the lens is the hard part. Better using software to calibrate them (color sensor or cammera).

Or, with a matrix combination of color sensors (RGB) and define the intensity of each color you can determine the real color of the object. This can take a lot of space, wiring and power). has some good stuffs on optical sensors, see them.

All I meant was do the bad bits glow darker or brighter under UV. If so you could use that in a detector. I still do not think you could use any computer processing due to time constraints. I am assuming you need to monitor several thousands on a conveyor belt?.

There are a number of optical methods for determining the spectral content (i.e. color) of an object.

Perhaps the simplest (at least conceptually) would be to use a band pass filter designed to block the accepted color spectra and pass only the reject color spectra. Then a simple photo detector could be calibrated to accept/reject the sampled object.

I think this paper will provide at least a starting point for your thinking;

Turning this into a workable solution will depend on things like;
How different is the spectral content of the acceptable v.s. rejects?
Do you have a cost constraint?
How long can you spend on a single object?

thank you

Thank you friends,I will visit the links that you send.

As GrandALF said I have to sort hundred thousands or may be millions of lentil(like bean).The maximum time may be a one day!

I will focus on new approaches , like uv or bandpass....

Beans make you Fart!
Maybe you could detect the smell!

Actually it is not a bean.It is a lentil... :lol:


I know a system doing this, they use a B/w camera and check on contrast, to eject the beans or whatever that create flart or not :p they use a air very well directed with great accuracy from the botom and eject the bad bean. The spead is very high.



I know that machine

hot_chmock , I know that machine.However I dont know which technique does it use?Image processing?

Re: I know that machine

mzsonmez said:
hot_chmock , I know that machine.However I dont know which technique does it use?Image processing?

yes, they use image processing.


Posted: Wed Jun 19, 2002 4:55 pm Post subject: Color Sens

HI mzsonmez

I would illuminate the beans with a colored light source, which leads to a high contrast between the good and the decayed beans.

After that, use matlabs image processing algorithms to detect the decayed areas (within matlab, you can perform such 'effects' you likely know as emboss, or relief by solving FFT)

The only problem maybe the speed of detection.

If the illumination gives you a high contrast, maybe you dont need image processing -> just use a filter (same wavelength as the resulting contrast)
and a photo diode (its sensitivity must be in the range of the filter wavelength) -> with a simple circuit you can trigger some kick-out mechanismus.

p.s.: you can simply produce a multicolor source holding the backside of a cdrom into a smal ray of sunlight (not for UV).

Hi coppervaporlaser,
Your suggestion seems like more practical and cheap.I will do an experiment this summer.
Thank you

Not open for further replies.

Part and Inventory Search

Welcome to