Close

A few more improvements

A project log for Simple Home Energy Monitor

Quick and dirty electricity and gas consumption logger

robgRobG 11/05/2021 at 14:190 Comments

I bit the bullet and ported the visualisation code over to Python/Pandas/Matplotlib, but in doing so finally got tired of the need to 'guess' at the timestamps from the record number and rough idea of the time between records. So I bought a cheap RTC module and have hooked that up now. Things are much better now, plus if there's an interruption to power the logger will resume automatically with the correct time, and no data is lost.

Important note about the RTC module: it has a charging circuit for a LIR2032 rechargeable coin cell, but a non-rechargeable CR2032 cell was supplied fitted (with the possible risk of smoke/fire/etc). So I swapped that out.

One more change: the Arduino now automatically determines the switching thresholds for detecting pulses via the analogue input (the gas meter) at start-up, so if I don't quite put the sensor in the right place each time, it doesn't matter. Previously they were hard-coded and it didn't always detect the pulses.

Will post the updated code here soon...

A couple of typical examples of the output plots:

Discussions