Maker Pro
Maker Pro

LIQUID FLOW METER with SIMPLE SPECTROMETER DESIGN help

cagabit

Nov 4, 2014
3
Joined
Nov 4, 2014
Messages
3
I am stuck at and seeking different ways of thinking or knowledge sources, any help appreciated.

I am trying to design a liquid flow meter circuit using lines of IR led – Photodiode couples, driving and reading the output with uP. At first I am trying to get a stable reading of the height of the liquid, inside a rectangular cross-sectioned pipe, which the IR lines reside on.

Some specs:
- measure mass / volume of opaque liquids without interfering (no touching mechanical parts etc.)
- while on the flow, the max flow rate is 15 lt/min
- the liquid has air bubbles from small to big (this changes everything!)
- the liquid is same but some contents ( most important is fat ) changes dynamically throughout the flow
- no important levels of pressure or heat, no hazardous or special requirement liquid will flow

So basically; after all calculations if I put the liquid, half the height of the pipe I should read %50, if it is full I should read %100. I used some levels of calibration and calculation which explained below but the error is not as low as I expected. I cannot measure this precisely now because the height is about 12 millimeters, but at least when it is full I should read %100 every time! Now I have something between %95-105. Basic technology used here is spectrometer I guess, but a simpler and less precise model of it.

If I can manage to decrease the error, I will pass to liquid flow tests, which I will read many samples of 2 lines of IR light, which the liquid passes and try to find the velocity (calculating time between 2 lines which the liquid passes) and the instant height of the liquid (which leads me to the instant area of liquid passing).
Tried to write as brief as possible, I can go details if you lead me to the title.
Best wishes,



CALIBRATION & CALCULATION routines:
(Each line of IR line (with IR led and Photodiode) is called as channel-ch , so we have ch0 and ch1 )
• Ch differences Calibration:
(every ch reads of the same liquid with some differences )
At start read 100 samples, take average for each ch and choose ch0 as the reference channel, calculate a constant K1 for the ch1 which converts the reading of ch1 in terms of ch0:

Vref_ch
------------------ = K1
Vsample_ch

I will use this K1 for every measure coming from ch1 to calibrate it.

• Temp calibration
(Although I used a constant current driver for the LEDs, by temp and other affects the light power changes, in order to compensate this there is another IR line just near the pipe but without transferring any IR light only empty air is between the LED and the PD. When the other IR lines on the pipe will be sampled, this AIR line is also sampled and the reading is used to calibrate these differences that LEDs creates)

Like the ch calibration the AIR ch reading at the beginning is taken as a constant and on every sample the new AIR ch reading is used to calibrate the liquid IR ch readings:

Vref_air (constant taken at start)
---------------------------------------------------- = Ka
Vsample_air

I will also use this Ka for every measure coming from both ch0 and ch1 to calibrate them.

• Beer-lambert law
When the pipe is empty, because of the plastic, air etc. the reading is not 0, it is again an attenuation value. Also when the pipe has some level of liquid this empty value should be subtracted. But because of some other factors which can’t be measured or calculated, you cannot directly subtract these values but according to beer-lambert you can use the ratio of the values to cancel these effects. So I read the EMPTY values of the ch0 and ch1, calibrate and store the value which is demoted Vempty. In order to calculate the height of the liquid also the FULL value should be read and stored. At the start I also coded a calibration part which you have to make the pipe FULL of the liquid you want to measure, which we can have the Vfull and save.
After these start routines with each sample read I have to calculate this formula : ( which I am not sure %100 )

Attenuation = A

Aempty - Asample
------------------------------- = height of the L
Aempty - Afull


Attenuation = -log (Vinput / Vout)


log ( Vempty / Vsample )
--------------------------------------- * 100 = Height of L %
log ( Vempty / Vfull )
 

shrtrnd

Jan 15, 2010
3,876
Joined
Jan 15, 2010
Messages
3,876
I don't understand how you're measuring an opaque fluid with Infrared diodes and detectors.
This sounds like a job more suited to magnetic flowmeters.
 

cagabit

Nov 4, 2014
3
Joined
Nov 4, 2014
Messages
3
The problem is the bubbles in the liquid, by the way by saying liquid I am referring only one type of it, at least same for that session of measurement.
As far as to the industrial measurement devices I could found magnetic ones requires FULL liquid flow from the pipe, ultrasound is ok but this time the budget of the device rockets to up !

So when you measure the attenuation of IR light passing through the liquid, actually you are measuring the instant height of the liquid which leads to the mass/volume of it. This technique has proven theories around.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Please provide a diagram of how the liquid flows in the "rectangular cross-sectioned pipe." Is the pipe oriented vertically with flow from bottom to top? Why would the level of liquid in the pipe have any relationship to the flow rate of that liquid? Is the pipe some sort of manometer that measures pressure in the liquid? From your description it appears that the "lines of IR led" are simply providing a go/no-go indication of the presence of liquid at their location. What other information (if any) does the "photodiode couples" provide? How can your arrangement of "lines of IR led and photodiode couple" be considered a spectrometer?
 

cagabit

Nov 4, 2014
3
Joined
Nov 4, 2014
Messages
3
The liquid flows from circular pipe but at the place where it will be measured there is a rectangular pipe standing perfectly vertical. The rectangular shape is needed in order to have an easily calculated ( alternative to circular ) area of a slice. No manometer data or any sort of other parameter is read except the IR light attenuation.
Which for the flow rate 2 variables present ; velocity and area. Velocity is calculated by using 2 lines which you know the exact distance and if you measure the time delay between 2 points of IR line by searching the same wave. For the Area you know the width but the height changes with the liquid flow. IR light attenuation after passing the liquid, is showing how much volume of liquid in the slice you just measured. Like taking integral you should add slices to get the total volume of that liquid.

To make the things easier I am trying to read reliable measurements when the pipe is FULL, not flowing. If i can manage to get very low error rate reading FULL pipe, like %0.1 or so, I can then try to read the flowing data and calculate the volume passing. So I am not considering any turbulence or likewise affect for now.

And yes your right about the spectrometer, I am not trying to match any wavelength of samples but the basics are coming from that technology I believe, so I did refer in order to take attention with whom worked on before. Here is a circuit info that I got many clues for my purpose:

http://www.analog.com/en/circuits-from-the-lab/cn0312/vc.html
 
Top