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?
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?