1
\$\begingroup\$

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?

\$\endgroup\$
2
0
\$\begingroup\$

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.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ 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!) \$\endgroup\$ May 11 '17 at 18:14
  • \$\begingroup\$ Your comment on control is something I'd not considered. Thanks! \$\endgroup\$ May 11 '17 at 18:16
  • \$\begingroup\$ @TheNaughtyOtter yes, if your measuring out Litre steins of lager, that's 445ish pulses.. if you are out by one or two.. who cares \$\endgroup\$
    – Trevor_G
    May 11 '17 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.