I'm trying to figure out the best way to measure how many gallons is running through the meter in total (running total). To keep track of when to replace filters or do maintenance. I have a second flow meter which I want to measure total volume as well, it's just on another water line.
I've been looking through code and trying different methods all day, I can't find a datasheet on this flow meter. How do I figure out how many pulses per liter or how many ml / pulse...If it's that obvious I feel dumb, been a long day.
Thanks in advance, I really appreciate any help I can get.
Yep, do what I did: pour a couple of 2-liter coke bottles of water down a line connected to the flow meter and count how many pulses I saw. It's affected somewhat by pressure, but IIRC, not an issue unless you have wildly varying pressures.
1 Hz = 38 l/m
1 pulse per second = 38 liters per minute
1 pulse per second = 38/60 liters per second
1 pulse = 38/60 liters = 0.63333 liters = 0.167309 gallons
Note: That makes 38 pulses per second 24.07 liters per second.
I've got a handful of these sort of sensors - from the 6mm/0.25" for measuring my water filter, all the way up to 38mm/1.5" for whole house measurement - and none of them did what the spec sheet said. They tend to perform especially poorly at the very low end of their range.
A 5gal bucket should be enough volume to calibrate both the small and large sensors. You know how much water you're put through; count the number of pulses and you should be able to make a pretty good estimate of pulses per unit volume, or volume per pulse.
My foggy math says gal / min = (approximately) pulses per second / 143.8.
2280 pulses per liter or 8630 per gallon.
Which Arduino and how do you have your meter connected?
Mostly wemos d1 mini... I bought a big bag of 'em so I can add internet monitoring and controls to all sorts of things that shouldn't be remote controlled.
currently using the Mega 2560 but I will probably move it to the Nano 33 or the ESP32 at some point for size and adding wifi...
I will try and calibrate the flow meter with a graduated bucket...
I probably should change the code to count total pulses.
Maybe I should add one of the optical water level sensors I have to tell it when it has hit 1 gallon...
That seems a bit off. My calculations show more like like 1.58 pulses per liter and 5.98 pulses per gallon.
1 Hz (pulses per second) = 38 liters per minute
1/38 pulses per second = 1 liter per minute
(1/38) * 60 pulses per second = 60 liter per minute
(1/38) * 60 pulses per second = 1 liter per second
(1/38) * 60 pulses = 1 liter
1.578947368421053 pulses = 1 liter
Use an interrupt handler to increment a counter variable every time a pulse is received. Within loop() print the time and the value of the counter - perhaps once a second.
38Hz is an instantaneous frequency measurement. If you had 38Hz for 1 minute, you should have moved one liter of liquid, and counted 38*60 = 2280 pulses. Thus 1 pulse is approximately 2.3ml 0.44ml.
1.58 pulses per liter = 0.633 liters per pulse, 38 pulses per second would be 24 liters per second or 1443 liters per minute. Is this a fire engine?
It's the wacky way they spec the pulse rate versus flow rate, should be 38 pulses per second per liter per minute.