Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
Elecrow community is a shared platform and we are not responsible for any design issues.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Assembly Cost: US $
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
closed
user-img

J. G. Aguado

Published: Jul 29,2024

Smart Powermeter

Effortlessly monitor your home's energy consumption with the DIY Smart Powermeter, seamlessly integrated with the user-friendly Home Assistant platform. This powerful project provides real-time data on your household's energy usage and offers the added convenience of a snapshot of your grid's status whenever you open the electric closet, thanks to the 2.9' e-paper display. Featuring an integrated 230VAC to 5VDC regulator, the ESP32-S2 efficiently harnesses power from surrounding wires for optimal performance. The Smart Powermeter supports up to six different CT clamps, with or without a burden resistor, allowing for versatile monitoring options. Additionally, it can measure ambient temperature, giving you comprehensive insights into your energy consumption and surroundings.

ccc ccc
Copyright Info

Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)

Read More⇒
  1081
  6
  1
cover-img
 
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
 

Story

The story behind 

Since my electric power provider only sends the consumtpion data (and invoice attached) once each a few months, it should be three but it's highly irregular, and I had enough space in my electricity distribution panel, I embarked on a mission to create my very own solution – the Smart Powermeter. 

The Smart Powermeter V1R1

My first design (V1R1), and the one that I still have operative,  was based on an external board: the TTGO T-Display. This board, besides embedding the powerful ESP32, has a small 1.14'' full-color LCD, which I looked forward to programming with a power indicator gauge. 

Overview of the setup

In a way, the V1R1, behaved as an Arduino Shield, providing the TTGO board with the signals from the CT clamps already conditioned, to fill in the range of the 0-3.3V, as well as a 5v regulated power supply.

A deeper understanding of how the conditioning circuit works can be found in the documentation of openenergymonitor, but to summarize it, the CT clamp, which needs to only surround one wire (easy to achieve on the electric closet), will convert the induced magnetic field, proportional to the AC current flowing through the conductor, into another current on the CT clamp. After all, CT stands for Current Transformer, so the coefficient of conversion will be given as a known factor of the CT clamp (generally printed on the device, like 50A:10mA). 

Since the microcontroller cannot read directly any current, the first step is to convert it into voltage, easy with Ohm's law. So given a fixed resistor (known as a burden resistor), the voltage will be proportional to the intensity.  

Now, the next challenge to measure the signal is to convert the +- volts from the raw signal, into a 0-3.3V range that the microcontroller can read. By replacing the connection of the CT lead to ground with a connection to a source voltage that is half the supply voltage (3.3V), the CT output voltage will oscillate around 1.65V, ensuring that it remains in the positive range.

For my application, I just wanted the RMS (Root-Mean-Square), representative of the average value of a complete cycle. But if you might want to look into power factor and offsets between phases, the hardware on the ESP32 should allow a high enough sampling rate to get a good view of the signal.

Since I used ESPHome, and there is a very good implementation for CT sensors on it, I didn't have to fight too much with the sample rate settings or the RMS calculations. However, after testing the instrumentation at different power loads, I realized, with the help of a handheld ammeter, that without a calibration the displayed values were not very accurate, so I applied a linear calibration.

As you can see in the final setup, I choose to just measure each one on the tri-phasic lines arriving at my home just because it became quite messy to deal with too many wires and I preferred to keep it simple.

The Smart Powermeter V1R2

The second revision I applied to this board was really minimal, I just integrated an onboard 220VAC->5VDC power module to be able to power it without external devices and changed some silkscreen things. 

This board was used as well for a divulgation talk at Vienna's Technical Museum regarding DIY Smart Powermeters. 

The Smart Powermeter V2R1

On this new development, I jumped forward embedding an ESP32-S2 module, ready to be programmed via USB-C, at the same time I provided an e-paper interface (a product of the learned lessons from the SmartPlant project).

The board size got also adapted to fit into a more transparent enclosure, the LK-PLC01. Since I was also interested in getting to know the temperatures the electric closet reached, I embedded a BMP280, capable to provide me the temperature and pressure (maybe a little bit unnecessary?).

Last, but not least, I prepared also the circuit to host a 1.69'' rounded display, just in case I decided to keep going on with an LCD color display rather than the e-paper one. This feature, however, I haven't tested it yet due to a lack of displays.

Code
  • Documentation

    https://smart-powermeter.readthedocs.io/
    View
Schematic and Layout
  • Github

    https://github.com/JGAguado/Smart_Powermeter
    View
user-img

J. G. Aguado

+ Follow

Topic

View All
  • Comments( 1 )
  • Like( 6 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All