Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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.

Detecting color of liquid in a transparent plastic pipe.

Status
Not open for further replies.

rajesharihant

Newbie level 2
Joined
Jun 7, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,304
Dear All,

I am looking for a budget/cheap solution. for detecting color of a liquid flowing through a pipe.

This is required for generating Alarm based on liquid's most probable color.

The probable colors of fluid is

a) colorless
c). yellowish
c) yellow
d) reddish

accuracy required is moderate. mainly to generate alarms based on the color of the liquid. No data analysis or something is required.

Please suggest if you have any solution/suggestion on how can i acheive this function. One solution is to use color sensors but they are usually very costly, i am looking for a cheaper option/suggestion.

please help!!!

Rajesh Jagadishchandra Kothari
Senior Project Engineer
 

Colour can be detected in many ways. with colour filters and photo diodes PD , with controlled light source and reference PD for clear. loss can be calibrated out for clear. Scattering of light source can cause errors so it is important to use small black tube , say heatshrink over 5mm PD in a fixture to block stray light. Imagine white light say from several sources like small LED's is transparent with same colour and blocked by complementary colour.
Narrow band colour filter over PD can pass with a specific Bandpass spectral width depending on cost/ quality of filter. another approach uses a tiny prism to split beam into different PD's to detect amplitude of spectrum in each colour. Another approach uses an integrated RGB LED to scan thru each colour to generate a response in the PD which has a band reject filter for IR and UV if present. Testing with a continously variable colour at constant current can give a different signature for each condition. Then you can choose fixed combinations to optimize the discrimination of colours to as accurate as you want. Stable emitter source is critical and this can be achieved by a closed loop with PD to detect emitter LED output over time temperature and voltage variations using RGB with compensation for each colour.
If this sounds too complex to solve into a simple design.. consider the board spectrum Photo sensor CCD or luminous intensity chip and test for various light sources at different wavelengths to determine signal to noise ratio of result or.. error in colour recognition vs RGB source. Keep in mind each RGB LED is not perfect narrow band source. For super high accuracy broad spectrum pulsed Xenon source (flash) with comparison between thru tube and reflection from mirror will help normalize the results.

Once you know analog voltage vs intensity, you can design a series of comparators to provide a logic level for alarm for each threshold.
A digital approach is more accurate https://www.sparkfun.com/products/8618
But an analog solution is possible. Self calibration is key in analog and PD's are very consistent and accurate ( Diode with reverse bias and Resistor to sense current) but LEDs are not very consisten, so feedback loop to regulate emitter is essential.

precision designs are worth a couple thousand dollars https://media.digikey.com/pdf/Data Sheets/Omron PDFs/E3MC RGB Color Sensor.pdf
but cheap designs take skill.

- - - Updated - - -

Here is a cheap interesting solution

ApplicationNote with design
**broken link removed**
 
Hi SunnySkyguy,

What is the price of the cheap solution that you mentioned in post...

regards,

milind
 

Depends on your skill of design. . Time is money. but TCS3200 in qty of 1 < $4 plus a few $ for other parts. But attention to details on reflections and stray light is critical.
 
Color sensor,many manufactures product it.search it using google.

- - - Updated - - -

Color sensor,many manufactures product it.search it using google.
 

If you build your own colour sensor set up, its worth considering the technique of "matrixing" to sharpen up the colour response. Suppose your sensors produce 1V at their notional colour and .5V at the unwanted ones. So the "red" detector" will produce .5V with a blue light and .5V with a green light. So what you do is to feed .5 of the "blue" output, invert it and feed it into the red channel. So now with red light the red channel produces 1V (from red) -.25V (from blue) = .75V. With Blue light the red channel now produces .5V (from red) - .5 (from blue) = 0V - Whoopie - no output. this matrixing can be done on all three channels so each channel's output is more centred on the required colour.
Frank
 

Yes Chuckey and since spectral bandwidth of the sensor and/or filter is not that sharp between yellow (589 nmD) and red (630nmD) you can use the slope of the Blue (415nm D) or Green (525nmD) response curves to give more discrimination between yellow and red, thus better signal to noise. Routine Calibration method is key along with and blocking unwanted light.

The CS3200 chip (previously stated) can be setup without a micro using 4 microswitches to select gain i.e. frequency and selection can also be driven by a counter to synchronize threshold of window comparators (dual threshold) using a simple DAC or Resistor ratio from analog switches or 1 of 10 decoder addressed from binary counter. Then the output is digital to signal warning and alarm condition anyway you please. Make sense? Of course PIC with software would make a better product.
 

Hi SunnySkyguy,

Thanks a lot for your time and helpful post.
I searched based on your advice and found the TAOS is now making a new version as TCS34717 for color sensor. Basically I am an automation control engineer by profession, so have lost my touch with core electronics with all CMOS & Transistors. I dont really know how exactly the sensor works, yet. but, I am optimistic that by using electronic color sensor i can generate alarms based on fluid's color.

thanks,
Rajesh Kothari
 

Good luck, if it were easy, they would not be selling portable colorometers for $1K. Self calibration is key in those designs and stable emitter luminance by loop control feedback. Scanners use a calibration pattern prior to scanning for compensation of the gas tube or LED scan light to make them accurate by a control loop built in. So if you have a smart MPU and software with built in calibration, you can make a better product.

May I ask what the device is intended to be used for and how critical the levels of detection? Generally both transmission and reflection characteristics can be considered for RGB response but your application physical contraints may determine which method works best. Reflection vs transmission characteristics of a liquid in a tube can be characterized to determine the sensitivity, variance and accuracy of each method. Reflection has glare issues unless optical coating is used, transmission loss may be affected by residue on tube. The sensors use current controlled frequency oscillators so it has a wide range say from 10Hz to 100KHz giving 4 decades max. the 2 binary Freq control switches, essentially are gain control for the current controlled F osc. to offset the range of sensitivity.

They do not show any curves so you should ask for data to speed up development and share when you get some. Also ask how they calibrate.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top