Meter PZEM-004 + ESP8266 & Platform IoT Blynk App

Measurement of uncomplicated electrical consumption using a powerful Blynk Dashboard

Similar projects worth following
In this opportunity we will integrate our active power meter or electric consumption, Peacefair Pzem-004 with the IoT Blynk app platform available in Android & iOS apps stores using an ESP8266 module, later we will create a dashboard to visualize the 4 available variables as active power, accumulated electrical consumption, voltage and current.

More Info:

Tests Performed

We will measure the electrical consumption of a resistor to heat water, consume approximately 870 Watts and visualize the measurements in a dashboard.

Initially it is required to download the App to our device:

Detailed information about Blynk

Materials and where to buy them very cheap !!


Arduino IDE Code

The routine created in Arduino IDE, esp8266 performs the reading of the meter pzem-004 through the serial port.

5 variables have been defined:

  1. Instantaneous voltage
  2. Instant current.
  3. Instant power.
  4. Accumulated power.
  5. Scan ms, to verify the communication with the esp8266.

For the sending to the Blynk platform, 8 virtual writing variables have been created, and the data is sent every 10 seconds.

The resistance consumes approximately 895 Watts.


The application worked excellent without any problem, as long as the correct reading of the meter is guaranteed, the visualization in Blynk will not be affected

In general there was no major complication, this is only a basic test, in future integrations with Blynk derived from this project we could perform:

  • Measurements of temperature.
  • Heating resistance control via Relay or PWM AC.
  • Integrations with Wifimanager to facilitate configuration.
  • OTA integrations for remote programming of esp8266.

Zip Archive - 2.15 kB - 03/27/2018 at 17:46


  • 1 × ESP8266 NodeMCU Espressif board
  • 1 × Meter PZEM-004 or PZEM-004t Power meter of Peacefair
  • 1 × electric heating water heater Load AC 110V or 220V

  • 1
    Step 1

View all instructions

Enjoy this project?



anggaefriyani wrote 07/19/2023 at 08:16 point


  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates