Amateur Radio Station in Napoli - Italy
ITU Zone: 28 - CQ Zone: 15 - Locator: JN70ct
Electric Energy Monitoring system realized with Eastron SDM120C and Raspberry Pi located at my home in Napoli, ITALY
Electric Energy Monitoring system is automatic updated every 2 seconds
Electric Energy Monitoring system Informations
The Electric Energy Monitoring (Electric Energy Consumption) system is realized with an EASTRON SDM120C (Modbus) connected to the Raspberry Pi via RS-485 USB adapter using the Modbus protocol.
Raspberry Pi reads the SDM120C meter data every 2 seconds.
The EASTRON SDM120C multifunction kWh meter is connected immediately after the Residual Current Circuit Breaker (RCCB) so it will monitor Voltage (V), Current (A), Active Power (W) and Active Energy (kWh), the values from the device are acquired every 2 seconds from made by me shell script.
As software I use a Modbus TCP to Modbus RTU (RS-485) gateway called mbusd and then I use mbpoll to poll 'mbusd' to get all the energy values.
Before to use 'mbusd' I was using another software made by the user 'gianfrdp', it's available here.
My scripts writes into text files the Voltage (in Volt), the Active Power (in Watt), the Current (in Ampere) and the Active Energy (in kWh) and are published in this website with a PHP page.
Before using the SDM120C, I was using the ACS712 (20A) by Allegro Semiconductor current sensor connected to an Analog input on an Arduino Nano, the Arduino Nano was connected via USB to the Raspberry Pi microcomputer.
The SDM120C is much more precise then the ACS712 sensor + Arduino.
The current sensor values are stored into a database made with RRDtool (round-robin database tool), this database preserve the average data in three method:
1. For 24 hours: data every 5 minutes
2. For one week: data every 15 minutes
3. For one month: data every 1 hour
4. For one year: data every 6 hours
A shell script update the database with the updated sensors values every 5 minutes and export the data into XML file.
You can see the charts by browsing in the navigation bar at top of the page. Charts are tested on Google Chrome, Mozilla Firefox and Microsoft Edge.
For more informations you can contact me via email at iz8mbw ]at[ gmail.com. Enjoy!
Fabio Ancona, IZ8MBW
I don't ask for money for any guides and info provided, but if you want you can offer to me a beer. Thanks!