Gasmeter accuracy
-
Hi Guys,
I have a MS gas meter based on Water meter sketch measuring on BK-G4T gas meter. I am using Mader reed switch. During winter my readings were corresponding with analog scale on gas meter (I had 6-12m3/day - heating, Hot water and cooking). But now in summer (Cooking, hot water) I am getting 0,5 - 4m3/day but real consumption is only ca.0,3-0,5 m3 a day. Has anyone idea how to correct this or what causes the problem ? Is the magnet (on analog gas meter scale) stuck in some position causing it?
Thanks -
Helllo guys,
Here is a small sketch (it may be version 1.5 of MySensors) that I've used for measuring Gas consumption.
0_1498509273489_EnergyMeterPulseSensor.inoThe key is between line 125 and 136 (I have removed my debug lines for more clarity and a useless statement):
int input_state = digitalRead(DIGITAL_INPUT_SENSOR); gw.wait(30); if ((input_state == LOW)) { pulseCount++; }The gw.wait(30) acts as a debouncer.
I hope this is clear.
Regards,QQ.
-
Using wait as suggested above is a simple and effective way to debounce. MySensors 1.x used gw.wait(), MySensors 2.x uses wait().
Another method is used in the onPulse function in https://www.mysensors.org/build/pulse_power
An example using the Bounce2 library is available at https://www.mysensors.org/build/binary
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login