

The PZEM004T.V4-2 is a multifunctional energy meter manufactured by Peacefair. It is designed to measure key electrical parameters in AC circuits, including voltage, current, power, energy consumption, frequency, and power factor. This module is widely used in applications requiring real-time monitoring and data logging of electrical systems. It features a UART interface for seamless communication with microcontrollers, making it ideal for IoT and automation projects.








| Parameter | Value |
|---|---|
| Operating Voltage | 80V - 260V AC |
| Measurable Voltage | 80V - 260V AC |
| Measurable Current | 0A - 100A (with external CT) |
| Power Measurement Range | 0W - 22kW |
| Energy Measurement Range | 0kWh - 9999kWh |
| Frequency Range | 45Hz - 65Hz |
| Power Factor Range | 0.00 - 1.00 |
| Communication Interface | UART (9600 baud rate) |
| Accuracy | ±0.5% |
| Dimensions | 70mm x 40mm x 30mm |
The PZEM004T.V4-2 module has a 4-pin interface for communication and power. Below is the pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (5V DC) |
| 2 | GND | Ground |
| 3 | RX | UART Receive pin (connect to TX of MCU) |
| 4 | TX | UART Transmit pin (connect to RX of MCU) |
Additionally, the module includes terminals for connecting the AC input and the external current transformer (CT).
| Terminal Name | Description |
|---|---|
| AC IN | Connect to the live and neutral wires of the AC load |
| CT IN | Connect to the external current transformer (CT) |
Below is an example of how to interface the PZEM004T.V4-2 with an Arduino UNO to read voltage, current, and power data.
#include <SoftwareSerial.h>
// Define RX and TX pins for UART communication
SoftwareSerial pzemSerial(10, 11); // RX = pin 10, TX = pin 11
// PZEM004T communication commands
byte readVoltageCmd[] = {0xB0, 0xC0, 0xA8, 0x01, 0x01, 0x00, 0x1A};
byte response[7]; // Buffer to store response from PZEM004T
void setup() {
Serial.begin(9600); // Initialize Serial Monitor
pzemSerial.begin(9600); // Initialize PZEM004T communication
Serial.println("PZEM004T.V4-2 Energy Meter");
}
void loop() {
// Send command to read voltage
pzemSerial.write(readVoltageCmd, sizeof(readVoltageCmd));
delay(100); // Wait for response
// Read response from PZEM004T
if (pzemSerial.available() >= 7) {
for (int i = 0; i < 7; i++) {
response[i] = pzemSerial.read();
}
// Extract voltage value from response
float voltage = (response[2] << 8 | response[3]) / 10.0;
Serial.print("Voltage: ");
Serial.print(voltage);
Serial.println(" V");
}
delay(1000); // Wait 1 second before next reading
}
No Data Received via UART
Incorrect Voltage or Current Readings
Module Not Powering On
Q: Can the PZEM004T.V4-2 measure DC circuits?
A: No, the module is designed specifically for AC circuits and cannot measure DC voltage or current.
Q: What is the maximum current the module can measure?
A: The module can measure up to 100A using the provided external current transformer (CT).
Q: Can I use multiple PZEM004T modules with a single microcontroller?
A: Yes, you can connect multiple modules to a single microcontroller by assigning unique addresses to each module. Refer to the module's datasheet for address configuration.
Q: Is the module safe to use with high-voltage circuits?
A: Yes, but proper isolation and safety precautions must be followed when working with high-voltage AC circuits.
By following this documentation, users can effectively integrate the PZEM004T.V4-2 into their projects for accurate energy monitoring and data logging.