# Measure time for a tank to empty by weight

using either a modified bathroom scale or loadcell to measure the weight of a container for the full weight. Then have it calculate how long it would take to become empty.

Something like change in weight over every 5 seconds, then calculate that amount into the original wight to how long it would take at that rate for it to become completely empty. In either a amount of time left or a percentage of what is remaining in the tank.

I think it is possible, but maybe more math is involved.

I think it is possible, but maybe more math is involved.

Yes, quite possible. Only 'trap' is if the container is of non regular shape like a sphere where material leaving would not be a linear function with time. In that case the math gets a lot harder.

Lefty

Guess it would read that the tank is emptying faster than it was.

[quote author=Rob K link=topic=51567.msg367730#msg367730 date=1297198215] Guess it would read that the tank is emptying faster than it was. [/quote]

Correct. As the level drops, the pressure at the bottom of the tank drops and the speed with which tank empties slows.

I am having a bit of an issue.

This is as far as I have gotten. Basically a renamed version of the AnalogRead

Can some one point me to an example where I can store and recall values? Trying to get a button to store the read value.

``````int weightsensor = 0;

void setup()
{
Serial.begin(9600);
}

void loop()
{
delay(500);
}
``````

Can some one point me to an example where I can store and recall values?

store

``````read_weight = analogRead(weightsensor);
``````

recall

``````Serial.println(read_weight);
``````

or are you referring to non-volatile storage?

Rob

How is the container being emptied?

Is it a continuous nearly constant change in mass (aka feeding a gasoline engine at a constant power) or an intermittent change in rate that sometimes pauses completely?

What time frame is the container being emptied in? (seconds, minutes, hours, days?)

All of these will greatly effect how the time until empty should be calculated. Also, as mentioned before, if the rate of emptying is related to the volume of the container a model of volume vs change in volume needs to be created to accurately predict time to empty.

Are we talking liquid or solids? Depending on the circumstances, the change in mass may be dynamically affecting your mass measurement, making this very very complicated.

SORRY BUSY WITH SCHOOL.

I have more info on this project. I'm actually working on it for a friend.

The "tank" is a BBQ LP tank. Wants to be able to tell ow much time would be left on a tank down nearest +/- 5 minutes. Has to be able to work with high, low, medium and any combination of heat settings to give an estimated time left on that tank.

[quote author=Rob K link=topic=51567.msg374415#msg374415 date=1297876864] SORRY BUSY WITH SCHOOL.

I have more info on this project. I'm actually working on it for a friend.

The "tank" is a BBQ LP tank. Wants to be able to tell ow much time would be left on a tank down nearest +/- 5 minutes. Has to be able to work with high, low, medium and any combination of heat settings to give an estimated time left on that tank. [/quote]

That might be a challenging math problem. For one thing the vapor pressure avalible at the tank changes with ambient temperature changes (which effects fuel flow rate) and that might make the +/- 5 mins accuracy spec a little tricky to calculate. Interesting project, good luck and let us know how it proceeds. Maybe a simple alarm when tank reaches 5% of full tank weight?

Lefty

Your initial code snippet implied you are willing to use weight to tell the amount in the tank. If that's the case you should be able to tell how much gas there is with reasonable accuracy.

As for estimating the time left based on flow, no ideas there I'm afraid.

Rob

As for estimating the time left based on flow, no ideas there I'm afraid.

Yes that is true. It's like the fuel gage in your car. It tells you the quanity of fuel that remains, but how many miles of range or hours of driving time remain is another further calculation away and requires additional information, like fuel flow, speed, etc.

Lefty

you would need to weigh a few empty tanks and get an average, i searched around and most people say an empty tank weighs 18 lbs. and holds 20 lbs of propane so the total should be around 38 lbs for a full tank

you would need the arduino to store a reading from the scale every 5 minutes then it would be compared to the previous reading so lets say we started with a half full tank containing 10 lbs of gas the tank weighs 18 lbs + 10 lbs gas = 28 lbs *the numbers should contain fractions to make things more accurate but i will skip them here

so the first reading is 28 lbs 5 minutes later the reading is 26 lbs so in 5 minutes we used 2 lbs since the scale now says we have 26 lbs and we know the tank by it self weighs 18 lbs the arduino should know how much is left by (scale reading(26) - empty tank(18)) = 8 lbs of gas left now since we used 2 lbs in 5 minutes then we can do this (8 lbs left in the tank) / (2 lbs used every 5 minues) = 4 periods of (5 minutes) 4X5 = 20 minutes

sorry if its not clear, i posted this from my phone

Moe

@Moe
My God, you typed all that on a phone, you must be < 25

@Rob K
We need to know more about the BBQ (see below), also is this a commercial product where saving a \$1 matters, or a one-off for your rich mate

You’re right, in theory you can make a time guestimate based on changing weight. The viability of this would I think depend on the length of time the gas is running and the resolution of the weight measurement.

If this really is a home BBQ then you haven’t got much time to get readings and the bottle would have to be stored off the BBQ so movement didn’t affect the weight reading. Then, if it’s like any BBQ I’ve ever been to every man and his dog changes the settings because they all know best. If it’s a commercial BBQ, say like the Rotary club, that’s running all day that would be different.

Once again if it is a home BBQ I would think a reading % full before the event would be all that is needed.

So I guess we’re all agreed that the % reading is not hard, the time left estimate is maybe doable but problematic and makes the project about 10x harder. EDIT If you need real flow measure, rate of change is easy subject to above.

Rob

@Graynomad I wish I was < 25

Calculating flow shouldn’t be a problem

Get a reading every 5 minutes
(Full reading - New reading) / flow X 5 minutes = time remaining

-Moe-:
@Graynomad I wish I was < 25

Calculating flow shouldn’t be a problem

Get a reading every 5 minutes