I've got as far as trying to develop the sketch for counting water, and like a few others on here I'm struggling a bit.
emontx.Pulse = pulseCount; pulseCount=0;
emontx.Lpm = int((60000000.0 / (pulseTime - lastTime))/ppl); //Calculate litres per minute
Will give me total pulses since last transmission and litres per minute (flow rate)
Am I right in thinking that if I create:
emontx.Lph = int((3600000000.0 / (pulseTime - lastTime))/ppl); //Calculate litres per hour
and treat it like Watts, then use the KWh/d emoncms function then divide by 1000 I will get a number that is litres per day?
Is there a better way, using the total pulse count and summing it up daily? (My meter is 20 pulses per litre)
EmonTx & Emoncms: Counting Daily Water with pulses
Submitted by phildabeast on Sun, 06/10/2013 - 16:24I've got as far as trying to develop the sketch for counting water, and like a few others on here I'm struggling a bit.
emontx.Pulse = pulseCount; pulseCount=0;
emontx.Lpm = int((60000000.0 / (pulseTime - lastTime))/ppl); //Calculate litres per minute
Will give me total pulses since last transmission and litres per minute (flow rate)
Am I right in thinking that if I create:
emontx.Lph = int((3600000000.0 / (pulseTime - lastTime))/ppl); //Calculate litres per hour
and treat it like Watts, then use the KWh/d emoncms function then divide by 1000 I will get a number that is litres per day?
Is there a better way, using the total pulse count and summing it up daily? (My meter is 20 pulses per litre)