

The PZEM-04T is a multifunctional electrical parameter measurement module designed to measure voltage, current, power, and energy. This versatile module is widely used in energy monitoring and management systems, providing accurate and real-time data for various applications. Whether you are working on a home automation project, industrial energy management, or renewable energy systems, the PZEM-04T offers a reliable solution for monitoring electrical parameters.








| Parameter | Value |
|---|---|
| Voltage Range | 80-260V AC |
| Current Range | 0-100A (with external CT) |
| Power Range | 0-22kW |
| Energy Range | 0-9999kWh |
| Frequency | 45-65Hz |
| Communication | TTL (3.3V) |
| Accuracy | ±1% |
| Power Supply | 5V DC |
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply (5V DC) |
| 2 | GND | Ground |
| 3 | RX | UART Receive (TTL 3.3V) |
| 4 | TX | UART Transmit (TTL 3.3V) |
| 5 | A | AC Voltage Input (Live) |
| 6 | B | AC Voltage Input (Neutral) |
| 7 | CT | Current Transformer Input |
#include <SoftwareSerial.h>
// Define the RX and TX pins for SoftwareSerial
SoftwareSerial pzem(10, 11); // RX, TX
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
pzem.begin(9600); // Initialize PZEM communication at 9600 baud
}
void loop() {
// Request data from PZEM-04T
pzem.write(0xB0); // Command to read voltage
delay(100); // Wait for the response
if (pzem.available()) {
// Read the response
byte response[7];
for (int i = 0; i < 7; i++) {
response[i] = pzem.read();
}
// Extract voltage value from the response
float voltage = (response[2] << 8 | response[3]) / 10.0;
// Print the voltage value to the serial monitor
Serial.print("Voltage: ");
Serial.print(voltage);
Serial.println(" V");
}
delay(1000); // Wait for 1 second before the next reading
}
By following this documentation, you should be able to effectively integrate and use the PZEM-04T module in your projects, ensuring accurate and reliable electrical parameter measurements.