LIQUID FLOW METER with SIMPLE SPECTROMETER DESIGN help

Thread Starter

cagabit

Joined Nov 4, 2014
5
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 )
 

wayneh

Joined Sep 9, 2010
17,498
This is a very strange approach to a standard problem. Measuring 3-phase flow is complicated but not a new problem.

What are you really trying to do, big picture?
 
Last edited:

alfacliff

Joined Dec 13, 2013
2,458
we use a few ultrasonic flow meters here, work on doppler shift due to flow, would not work if fluid were different density. the one you describe will be subject to errors due to turbidity, clumps of stuff will cause a difference in ir transmission.
 

Thread Starter

cagabit

Joined Nov 4, 2014
5
This is a very strange approach to a standard problem. Measuring 3-phase flow is complicated not a new problem.

What are you really trying to do, big picture?
I have a %2 error margin.

Big picture is to measure the volume of the liquid while flowing, without any interfering parts inside but the liquid has variety size bubbles inside and since this solution will be used on many stations cost is very important, cant use professional industrial measurement devices. Only positive point is that the liquid is same but the concentration is changing.
 

Thread Starter

cagabit

Joined Nov 4, 2014
5
we use a few ultrasonic flow meters here, work on doppler shift due to flow, would not work if fluid were different density. the one you describe will be subject to errors due to turbidity, clumps of stuff will cause a difference in ir transmission.
For the sake of the problem, cant we think as measuring the FULL pipe first ? I believed to have very small error when measuring non-flowing liquid, but without affecting from temp and environmental conditions ? Since using the ratio of measurements should cancel most of the factors causing these differences.
 

wayneh

Joined Sep 9, 2010
17,498
Must the bubbles be present? If not, I would pass the liquid through a deaerator to remove the bubbles. This might give you a chance.

By 2% error margin, do you mean you need accuracy to within ±2%? That will be extremely difficult without a a magmata.

Wait a minute, you said mass earlier but also volume. These are very different. Do you want to include the volume of the bubbles in the total flow measurement? Then your task is like measuring the flow of a river and you only need your height measurement.
 
Last edited:

Thread Starter

cagabit

Joined Nov 4, 2014
5
Bubbles always present and with different sizes, no escape from that. I tried to imply that with mass / volume that , volume of the liquid only, extracting the bubbles. SO we left with the harder solution :(
 

wayneh

Joined Sep 9, 2010
17,498
I suggest you search on "3-phase flow measurement" or "multiphase flow measurement". You'll find plenty of references on the problem.

My approach would be a variant of the tried and true friend of every chemical engineer, the bucket-and-stopwatch method. I would build a fat spot into the flow and use valves to route the flow so that you can take a timed measurement of weight or volume collected.
 
Top