Skip to content
 
 

Repository files navigation

   


powermeter

A simple smartmeter based on ESP32. Supports the complete setup via web interface, MQTT and live monitoring via web interface.

Install

Clone this repository and open it with platformIO. Remember, the SPIFF must also be flashed. On a terminal in vscode you can do it with

pio run -t uploadfs
pio run -t upload

After that, take a look at your monitorport ...

Read config from SPIFFS
scan for SSID "" ... not found
starting Wifi-AP with SSID "powermeter_aadee0"
AP IP address: 192.168.4.1
Start Main Task on Core: 1
Start NTP Task on Core: 1
Start Measurement Task on Core: 0
Start MQTT-Client on Core: 1
Start Webserver on Core: 1
NTP-client: renew time
Start OTA Task on Core: 1
Failed to obtain time
NTP-client: Thursday, January 01 1970 01:00:07

When the output look like this, congratulation!

After the first start an access point will be opened with an unique name like

powermeter_XXXXX

and an not so unique password

powermeter

After that you can configure the powermeter under the following IP-address with your favorite webbrowser

http://192.168.4.1 or powermeter_xxxxxx.local

How it works

signalpath

Hardware

current sensor

Please pay attention to the Burden resistor. Some current sensors have a built-in Burden resistor. In this example a SCT-013-000 without a built-in Burden resistor was used. Please check the documentation for the right Burden resistor value.

Channel setting

At any time, 3 channels are read in simultaneously regardless of the settings. The individual power of each channel is calculated and the power of all channels together. If 3 channels are set, an additional virtual fourth channel is calculated with the sum of all currents. This enables us to measure the neutral conductor current indirectly. For more information about how three-phase current works, read here!

Interface

live view

live view

MQTT settings

mqtt

measurement settings

measurement

Contributors

Every Contribution to this repository is highly welcome! Don't fear to create pull requests which enhance or fix the project, you are going to help everybody.

If you want to donate to the author then you can buy me a coffee.

About

A very flexible ESP32 power meter / energy meter with SCT-013-0x0, ZMPT101B, ACS712 sensors

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages