IoT Current consumption monitoring system
IoT Current consumption monitoring system
When you don't know how much power your air conditioner draws, it's easy to leave it running without feeling too guilty. And then the electricity bill comes...
The objective of this project is to get an approximate measurement of how much electric power is being used in my apartment. Additionally, for the sake of safety, the measurement system should not require altering the electrical wiring currently in place. In other words, the measurement should be non-invasive.
To this end, I built a current measuring system based on transformers (CT) and an ESP32 Wifi microcontroller.
The system is installed on the breaker box of my apartment.
This system has been designed following the instructions provided by openeneregymonitor.org, which does a far better job at explaining how things work than I possibly could. At the moment, I am only measuring current, which limits me to computing my apartment's aparent power consumption, as opposed to its true power consumption.
The electrical system of my apartment is in a split-phase configuration. This required me to use two CT sensors, one per phase, as explained in this guide provided by Maxim Integrated.
The CTs output are processed by an ESP32, which I chose over an ESP8266 because of its multiple ADCs. This allows for the periodic broadcast of the measurements over MQTT. Additionally, the ESP32 serves webpages for real-time visualizatation of the power consumption. The web server used to serve those pages also provides the ability to update the firmware running on the ESP32 for OTA updates.
Here is a list of the parts used in this project:
ESP32 dev board
2x YHDC SCT-013-000 current transformer
2x 22Ω resistor (burden, a.k.a. shunt resistor for the CT)
2x 10kΩ resistor
10μF electrolytic capacitor
Additionally, I created a NodeJS application to log the measurements in an InfluxDB. It comes with a front end built using VueJS.
The source code for this project is available on GitHub:
More information about the electronics on OSHWLab.