The PZEM-004T is a digital power meter designed for monitoring and measuring key electrical parameters in AC circuits. It can measure voltage, current, power, energy, and frequency with high accuracy. This module communicates via UART (Universal Asynchronous Receiver-Transmitter), making it easy to interface with microcontrollers such as the Arduino UNO. Its compact design and reliable performance make it a popular choice for energy monitoring, home automation, and industrial applications.
Below are the key technical details of the PZEM-004T module:
Parameter | Value |
---|---|
Voltage Range | 80V - 260V AC |
Current Range | 0A - 100A (with external current transformer) |
Power Range | 0W - 22kW |
Energy Range | 0kWh - 9999kWh |
Frequency Range | 45Hz - 65Hz |
Communication Protocol | UART (9600 baud rate) |
Power Supply | 5V DC (external power required) |
Accuracy | ±0.5% |
The PZEM-004T module has a simple pinout for easy integration. Below is the pin configuration:
Pin Name | Description |
---|---|
VCC | 5V DC power supply input |
GND | Ground connection |
TX | UART Transmit pin (connects to RX of microcontroller) |
RX | UART Receive pin (connects to TX of microcontroller) |
AC IN+ | Live wire input for AC voltage measurement |
AC IN- | Neutral wire input for AC voltage measurement |
To use the PZEM-004T with an Arduino UNO, follow these steps:
Below is an example Arduino sketch to read data from the PZEM-004T module using the SoftwareSerial library:
#include <SoftwareSerial.h>
// Define RX and TX pins for SoftwareSerial
SoftwareSerial pzemSerial(10, 11); // RX = pin 10, TX = pin 11
// PZEM-004T communication commands
byte readCommand[] = {0xB0, 0xC0, 0xA8, 0x01, 0x01, 0x00, 0x1A}; // Example command
void setup() {
Serial.begin(9600); // Initialize Serial Monitor
pzemSerial.begin(9600); // Initialize PZEM-004T communication
Serial.println("PZEM-004T Power Meter Example");
}
void loop() {
// Send read command to PZEM-004T
pzemSerial.write(readCommand, sizeof(readCommand));
// Wait for response
delay(100);
// Check if data is available
if (pzemSerial.available()) {
Serial.println("Data received:");
while (pzemSerial.available()) {
byte data = pzemSerial.read();
Serial.print(data, HEX); // Print data in hexadecimal format
Serial.print(" ");
}
Serial.println();
} else {
Serial.println("No data received.");
}
delay(1000); // Wait 1 second before next read
}
No Data Received
Incorrect Measurements
Module Not Responding
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 using the included current transformer.
Q: Can I use multiple PZEM-004T modules with a single Arduino?
A: Yes, you can use multiple modules by assigning unique addresses to each module and using a software or hardware UART multiplexer.
Q: Is the module safe for high-voltage applications?
A: The PZEM-004T is designed for 80V-260V AC circuits. Always follow proper safety precautions when working with high voltages.
This concludes the documentation for the PZEM-004T module. For further assistance, refer to the manufacturer's datasheet or community forums.