Meter reading - data logging. - Page 1
Forum section: electronics / projects

author: paulca
author_rank: Super Contributor
timestamp: September 21, 2022, 12:15:13 pm
content: So soon it will be cheaper to burn vegetable oil to heat your home, I got another letter about the electric going up another 29% bring it to around 37p / kwh. Gas has gone up twice already, first by 27%, then by 41% and is likely to go up again before December.I have my automated heating system, the tldr version. Multizone, individual room sensors and rad valves in 3 zones + 1 unzoned. Scheduled and presense aware targets. Humidity awareness.I have been implementing "smarts" to make the heating more efficient. I'm still looking for more ways.Step ONE. I need data. I have data on electrical usage, but not gas. I need to read the gas meter. I need to run an idea, monitor the temps, runtime AND gas usage to accurate emperically measure if a particular control or dynamics feature actually lowers or increases gas usage.The meter is a Honeywell bk-g4m which I am told (need to check) has a metal disk on the number 0 of the least significant digit. This is designed to close a read switch for automated readers. A quick google and it looks like the only use case in the profession for such readers is so bespoke and rare, it's hard to find them, a lot of "speak to your installer" lines.So DIY.Two aspects need addressed first. SAFETY and LEGALITIES.On safety, the advice is to not have any of your electronics inside (or within 150mm) or your gas meter with the only exclusion being the reed switch. The reed switch needs to operate as a voltage/current which will not form a spark with enough energy to ignite any trapped gas.On legalities, the meter is considered "Utility operator equipment", it's not mine. I am forbidden by law from tampering with it, carrying prison time in some cases.So, what ever I do, it needs to not upset those two things. If it's not "legally" tampering, but the guy who comes to read the meter (it's outside) feels it's a safety issue, he will report it and I'll at least get my gas shut off and join the queue for an inspection and reconnection, which is standard policy for gas supply here. If in doubt, send out a 19 year old on minimum wage to pull the capping seal (it's an odd collar around the inlet pipe, if you break the seal and pull it off, it isolates supply. Then send out the qualified engineer a few days later to check it out and reconnect it. I'm sure I'd end up paying for both visits, circa £200 and that's IF they don't raise a criminal charge of tampering.So the safest way is to run 2 wires to the magnetic reed switch, at 3.3V. Those wires run through a gap in the meter box door (it's vented, not sealed) and into a lunch box place outside. In the lunch box is the gubbins.The concept would be a halted ESP8266 with it's wake pin attached via a current limiting resistor to the reed switch and 3.3V. I have to check if the wake pin is HiZ or not.Once awoken, the software logs a "tick", checks the last time of transmission and if 1 hour has past, switch on the Wifi and transactional send the last hours tick times. (Tick times will be a negative delta in seconds so the ESP does not need to know clock time).The rest is just server side software to convert the negative delta T's to actual timestamps and push it to a time series DB for analysis.Wifi is expensive and I can't justifiably run power to this location. However, I was hoping with a few 18650s in parallel, waking on the pulse to only log a tick in memory (or EPROM) and shutdown again. That consumes about 30mA for a few milliseconds. Wifi connection and a REST request/response on a good day will take 5 seconds, longer on bad days if the first attempt fails. With the radio active it consumes about 70mA.I've not run the sums, but if I can get it close to a month or more I'd be happy.Any thoughts? Perils to avoid?How realistic is running an MCU like this without a solar panel on battery for a month?

author: dawnclaude
author_rank: Contributor
timestamp: September 21, 2022, 12:59:55 pm
content: Don't you have other appliances at home that use gas, like gas stove? Why not try measuring the flow at the boiler instead of the meter?

author: paulca
author_rank: Super Contributor
timestamp: September 21, 2022, 01:23:00 pm
content: Quote from: dawnclaude on September 21, 2022, 12:59:55 pmInteresting point. I do only have one appliance. However your point highlights, if I move the problem indoors (or beyond the meter), it's my equipment and as long as I'm willing to pay for it, I can have a plumber install a gas meter of my choice (as long as it's got the right certs).

author: ledtester
author_rank: Super Contributor
timestamp: September 21, 2022, 01:52:18 pm
content: This page shows a BK-G4 meter with a "pulser" attached:https://www.honeywellgasdepot.com/repair-parts/diaphragm-meters/bk-g4-diaphragm-meter.htmlFollowing the link for the "INZ Pulser" leads to this PDF with a cut-away diagram of the meter and pulser:https://www.honeywellgasdepot.com/media/catalog/category/specifications/DS_IN_Z_EN.pdfSo if your meter doesn't have a pulser you could attach one of these. The document says:QuoteRegarding reed switch sparking possibilities... you should be able to detect the pulse magnet with a Hall effect sensor.