A while ago I build a Energy logger that was running on a Rpi Zero and should be some where here on the form.
One disadvantage was that the PZero is a bit light and takes almost 5 min to start up and you also need a separate USB psu to run the thing.
It was time for v2.0
- Device must be able to connect to the internet and have a “setup” interface
- Fast startup with some sort of feedback
- Log the data to a SD card for “Offline” logging
- As small as possible footprint.
- As cost effective as possible
After some time playing and fiddling I ended up with 3 models .
- Single phase monitor
- Three Phase monitor
- Single Plug Monitor
They are all based on the ESP8266 wifi board with a Real Time Clock / SD Card shield for data logging and MQTT for send ding the data directly to my Server. I have a remote MQTT running on a virtual server so that makes things a bit easier.
List of materials:
- PZEM004 - 100a Ct and PZEM004 - 10a shunt for the multiplug
- Wemos D1 Mini - for the 3 phase meter you need two of them
- SD card / RTC Shield for the Wemos
- Small 5v PSU that you can intergrade
There went quite some time in the progrming of the ESP to make it as universal as possible and this is what I came up with.
The multiplug Energy Monitor - Only transmit the data via MQTT ( I didnt want the hassle of opening the device to have access to the SD card and battery and also space was a bit of a problem but you have a OLED that displays the data and while I was at it I also added a relay that you can setup for remote control or current control.
I used a Lesco Multiplug ( Think I got it from Builders M) as it had quite some space
Stripped all the bits and pieces out
Then proceeded to add the hardware
There was quite a bit of solder work but the got it all locked in.
3d Printer came in handy to print the covers and some data on the display
While I was at it I decided to have a small web interface as well
You can setup the Wifi Connection , set a limit to the current draw - should it be too high it will switch off and keep track of the running kwh meter.
It will also send the data to the MQTT server where I then log it as I need to. Personally I prefer Influx Db with Grafana for data logging.
All and all it works well and is use full it you quickly want to have a look at the consumption of a device.
The other two to follow :