PZEM-004T v3 AC energy meter (UART) with ESP32

Supply 5 V Bus GPIO Measures voltage, current, power, energy, frequency, power factor
5VRXTXGNDLNCT+CT-

Pins and ESP32 wiring

PinRoleESP32 pinNotes
5VPowerVINTTL side supply. Isolated from mains by optocouplers
RXInput (the ESP32 drives it)D25UART: the meter receives data here. Connect to an ESP32 TX pin (9600 baud, Modbus RTU)
TXOutput (the part drives it)D26UART: the meter sends here. Idles at the 5 V supply: add a divider before the ESP32 RX pin
GNDGroundGND
LNot wired to the ESP32—MAINS 230 V! Only a qualified person connects this. Never to the ESP32
NNot wired to the ESP32—MAINS 230 V! Only a qualified person connects this. Never to the ESP32
CT+Not wired to the ESP32—Current transformer lead (100 A version). The measured wire passes through the CT
CT-Not wired to the ESP32—Current transformer lead (100 A version)

Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.

This module is sold for 5 V. Its outputs may be 5 V: use a level shifter or a voltage divider on ESP32 inputs.

Sources

Try it in 3D in BoardPilot

BoardPilot Part data (JSON)

Related parts

Part data: CC BY 4.0, free to reuse with credit to BoardPilot.