# Hall effect flow meter; measuring total volume

I'm playing with this Hall effect flow meter from Adafruit. In the description it states:

By counting the pulses from the output of the sensor, you can easily track fluid movement: each pulse is approximately 2.25 milliliters.

By this then:

$$\text{Total Volume (ml)} = \text{#Pulses} \times 2.25$$

Simple, right?

Well I'm reading the Adafruit kegerator code and they seem to want to make life difficult for themselves by using the time between pulses to get a flow rate, then turning that into a total volume.

Is there a better method? How do I get an accurate reading for total volume from this sensor?

• By the way, here's a teardown of that flow meter, if you are curious. Commented May 12, 2017 at 20:35
• Cheers mate, always curious! Commented May 12, 2017 at 20:36

Without taking all day to try to delve into that code here is the typical reason to do the flow rate method.

Typically flow rate is used for continuous streams of fluid. Since the sensor only indicates a granular measure, in this case 2.25ml. If the flow is much less than that per measurement time then you quickly loose the ability to know what is happening.

With a continuous flow, you can use the sensor timing to know how much volume is passing/second and as such can know the volume for a given time more accurately than just in counts of 2.25ml.

However, if what I am reading from the code is correct, they are measuring shots of alcohol, so it's not exactly a linear flow unless there is a party happening I was not invited to.

The OTHER reason is control. If you want to turn off a valve when exactly 20mL of your finest Scotch has been dispensed, then that's 8.888 pulses from the sensor.... The only way to do that accurately is by using the pulses to calibrate a flow rate, and then time the off signal.

ADDITION: Another reason I have used in the past for a different kind of measurement system that metered out printer ribbon over a measurement wheel roller was because of the slip factor. Not sure if this device has that phenomenon, but inertias and slippage in the system can cause the first few pulses from metering devices to be a little slow when switching between stopped and run.

By turning on the value, then monitoring the sensor to get the stable flow rate, it lets you calculate the time needed to dispense at that flow rate. That method effectively gets rid of those issues AND the "not sure where I started" issue.

• Trevor, don't think I was invited either! It's amount of beer poured from a keg and tweeted. Accuracy is probably not overly concerning, esp as these Hall effect flow sensors aren't that accurate to begin with! I suspect it may be due to legacy code where they were actually measuring: flow rate; pour time; total volume etc. if I understand you correctly, then the simple, and crude : #pulses x 2.25 (or scaled for calibration) should be quite ok in their application (which just happens to match mine!) Commented May 11, 2017 at 18:14
• Your comment on control is something I'd not considered. Thanks! Commented May 11, 2017 at 18:16
• @TheNaughtyOtter yes, if your measuring out Litre steins of lager, that's 445ish pulses.. if you are out by one or two.. who cares Commented May 11, 2017 at 18:17