

The PZEM-004T is a multifunctional energy meter designed for monitoring and measuring key electrical parameters in AC circuits. It can measure voltage, current, power, energy consumption, and frequency, making it an essential tool for energy management and monitoring systems. The module communicates via a UART (serial) interface, enabling seamless integration with microcontrollers such as the Arduino UNO.








Below are the key technical details of the PZEM-004T module:
| Parameter | Specification |
|---|---|
| Voltage Measurement | 80V - 260V AC |
| Current Measurement | 0A - 100A (with external current transformer) |
| Power Measurement | 0W - 22kW |
| Energy Measurement | 0Wh - 9999kWh |
| Frequency Measurement | 45Hz - 65Hz |
| Communication Protocol | UART (9600 baud rate) |
| Power Supply | 5V DC |
| Accuracy | ±0.5% |
The PZEM-004T module has the following pinout:
| Pin Name | Description |
|---|---|
| VCC | Power supply input (5V DC) |
| GND | Ground connection |
| TX | UART Transmit pin (connects to RX of microcontroller) |
| RX | UART Receive pin (connects to TX of microcontroller) |
| AC Input | Connects to the live and neutral wires of the AC circuit for measurement |
| CT Input | Connects to the external current transformer (CT) for current measurement |
Below is an example Arduino sketch to interface the PZEM-004T with an Arduino UNO:
#include <PZEM004Tv30.h> // Include the PZEM-004T library
// Define the RX and TX pins for the PZEM-004T
#define RX_PIN 10
#define TX_PIN 11
// Create a PZEM object using the defined RX and TX pins
PZEM004Tv30 pzem(RX_PIN, TX_PIN);
void setup() {
Serial.begin(9600); // Initialize serial communication for debugging
Serial.println("PZEM-004T Energy Meter Example");
}
void loop() {
// Read voltage
float voltage = pzem.voltage();
if (!isnan(voltage)) {
Serial.print("Voltage: ");
Serial.print(voltage);
Serial.println(" V");
} else {
Serial.println("Error reading voltage!");
}
// Read current
float current = pzem.current();
if (!isnan(current)) {
Serial.print("Current: ");
Serial.print(current);
Serial.println(" A");
} else {
Serial.println("Error reading current!");
}
// Read power
float power = pzem.power();
if (!isnan(power)) {
Serial.print("Power: ");
Serial.print(power);
Serial.println(" W");
} else {
Serial.println("Error reading power!");
}
// Read energy
float energy = pzem.energy();
if (!isnan(energy)) {
Serial.print("Energy: ");
Serial.print(energy);
Serial.println(" kWh");
} else {
Serial.println("Error reading energy!");
}
// Read frequency
float frequency = pzem.frequency();
if (!isnan(frequency)) {
Serial.print("Frequency: ");
Serial.print(frequency);
Serial.println(" Hz");
} else {
Serial.println("Error reading frequency!");
}
delay(2000); // Wait for 2 seconds before the next reading
}
No Data Received from the Module:
Incorrect Voltage or Current Readings:
Communication Errors:
Module Not Powering On:
Q: Can the PZEM-004T measure DC circuits?
A: No, the PZEM-004T 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 when used with the appropriate current transformer (CT).
Q: Can I use multiple PZEM-004T modules with a single Arduino?
A: Yes, you can use multiple modules by assigning different UART pins for each module or using a multiplexer.
Q: Is the module safe to use with high-voltage AC circuits?
A: Yes, but proper isolation and safety precautions must be followed to prevent electrical hazards.