Member-only story

⚡ Power meter with ESP32 and ESPHome

Alvaro Martinez Muñoz ✅
6 min readAug 2, 2023

--

With the price of electricity at an all-time high, and the forecast for continued increases, we believe it is necessary to have a way to measure electricity consumption and the parts of the home with the highest energy consumption in order to be able to optimize its use, and thus reduce our bill. One simple way to achieve this goal is by installing power meters per device and/or at the global level of the entire home. In this article we will focus on placing a power meter in the electrical panel to measure the consumption of our entire home.

There are a multitude of devices on the market that fulfill this purpose. But from this blog we have preferred to make our own for very little money and that is also non-invasive, that is, it does not require the line with the current to be measured to pass through the device, therefore, its assembly and use is safer.

WARNING: This tutorial is advanced and requires touching the electrical panel of the house, that implies certain knowledge of electricity and electronics, as well as ensuring the total cut of the current before manipulation.

Materials

  • An ESP8266 or ESP32 module that we will use to obtain the data from the meter and transmit it via Wi-Fi to our server. You can find different models on Amazon.
  • PZEM-004T V3 meter that you can buy on Amazon. The version 1 also works, but it offers less data.
  • A clamp / current ring CT. Normally included with the meter, it must withstand at least the limit current that the line we are going to measure can withstand. You can choose whether to use a clamp, which, although it does not require disconnecting the cable we want to measure, gives us less precise data, or a ring, which has more precision, but requires that we previously pass the cable, so we will have to disassemble it.
  • Dupont cables to connect both devices. Although it is ideal to make a circuit, you can use dupont cables and a development board to carry out the tutorial.
  • A 220V to 5V transformer such as a mobile charger or a more suitable transformer that we can find again on Amazon.
  • Blue and Brown cables to plug the PZEM-004T meter into the current.

Software

--

--

Alvaro Martinez Muñoz ✅
Alvaro Martinez Muñoz ✅

Written by Alvaro Martinez Muñoz ✅

Hi!. I´m Alvaro and i´ll share my Personal projects hobbies like Home Assistant and Linux HomeLabs. I hope like my Posts and support me with little beer 🍻

No responses yet

Write a response