Filling bottles (Flow rate to Volume) [NOT HW]

sprayman

New member
Joined
May 14, 2020
Messages
1
Hi all,

Interesting problem today with a lot of constraints. (First post as well. be gentle!)

I have been tasked with filling different size containers. For simplicity sake lets say 1 and 5 gallon jugs.

I am filling by utilizing a flow meter that takes a measurement every 50ms.

I am then reading these flow readings and calculating the volume produced every 5ms.

My equation looks like this. ([(Gallons/Hour)/3600] * 5ms) + volume = volume. volume being the current volume i am at starting at: 0 gallons.

And this somewhat works! My problem is that it is off by a decent amount. What happens is that my bottle overfills by lets say .25 gallons before it stops.

This points to my volume adder moving too slowly. So I reduce 3600 to around 3400 and it gets closer.

Any thoughts on why I would have to do this? The flow rate is variable but not by too much.


One other thing to consider. My setup is flow meter then shut off valve. So some of the liquid that is passed through the meter never makes it to the jug. but since I am overfilling that seems like it shouldn't be an issue.

Tried to bold the important stuff.

My overall question: I seem to think my equation is right. I feel like the reading and measuring time intervals might be coming into play. Any glaring information I am not taking into account? Any thoughts on how to do this better?
 
If you only measure every 5 ms then your volume can be off by whatever is added in that 5 ms. By reducing the flow you reduce the amount added in 5 ms so reduce the error.
 
Hi all,

Interesting problem today with a lot of constraints. (First post as well. be gentle!)

I have been tasked with filling different size containers. For simplicity sake lets say 1 and 5 gallon jugs.

I am filling by utilizing a flow meter that takes a measurement every 50ms.

I am then reading these flow readings and calculating the volume produced every 5ms.

My equation looks like this. ([(Gallons/Hour)/3600] * 5ms) + volume = volume. volume being the current volume i am at starting at: 0 gallons.

And this somewhat works! My problem is that it is off by a decent amount. What happens is that my bottle overfills by lets say .25 gallons before it stops.

This points to my volume adder moving too slowly. So I reduce 3600 to around 3400 and it gets closer.

Any thoughts on why I would have to do this? The flow rate is variable but not by too much.


One other thing to consider. My setup is flow meter then shut off valve. So some of the liquid that is passed through the meter never makes it to the jug. but since I am overfilling that seems like it shouldn't be an issue.

Tried to bold the important stuff.

My overall question: I seem to think my equation is right. I feel like the reading and measuring time intervals might be coming into play. Any glaring information I am not taking into account? Any thoughts on how to do this better?
Be careful with units!! If by ms you meant mili-seconds (10-3 seconds), then

(Gallons/Hour)/3600 = Gallons/sec \(\displaystyle \to \frac{gal.}{sec} * 10^{-3}sec \ \to \ 10^{-3}gal\)

you cannot add gallons to 10-3gallons directly!
 
Hi all,

Interesting problem today with a lot of constraints. (First post as well. be gentle!)

I have been tasked with filling different size containers. For simplicity sake lets say 1 and 5 gallon jugs.

I am filling by utilizing a flow meter that takes a measurement every 50ms.

I am then reading these flow readings and calculating the volume produced every 5ms.

My equation looks like this. ([(Gallons/Hour)/3600] * 5ms) + volume = volume. volume being the current volume i am at starting at: 0 gallons.

And this somewhat works! My problem is that it is off by a decent amount. What happens is that my bottle overfills by lets say .25 gallons before it stops.

This points to my volume adder moving too slowly. So I reduce 3600 to around 3400 and it gets closer.

Any thoughts on why I would have to do this? The flow rate is variable but not by too much.


One other thing to consider. My setup is flow meter then shut off valve. So some of the liquid that is passed through the meter never makes it to the jug. but since I am overfilling that seems like it shouldn't be an issue.

Tried to bold the important stuff.

My overall question: I seem to think my equation is right. I feel like the reading and measuring time intervals might be coming into play. Any glaring information I am not taking into account? Any thoughts on how to do this better?
Can you give us some sample values so we can have a sense of the size of the actual numbers involved? That may help in judging likely errors. Also, how fast does the valve respond?

Also, as was mentioned, where you show 5 ms, do you really use 0.005 s?

My guess is that you might need to stop when the jug is a certain amount less than full (e.g. 0.25 gal less), as I might do in filling a container at the sink, knowing my reaction time isn't ideal.
 
Top