The PZEM-004T V3, manufactured by Peacefair, is a versatile and compact energy meter designed for monitoring and measuring key electrical parameters in AC circuits. This module can measure voltage, current, power, energy, and frequency, making it an essential tool for energy management and monitoring systems. It features a UART interface for seamless communication with microcontrollers, enabling integration into IoT and automation projects.
Below are the key technical details of the PZEM-004T V3:
Parameter | Specification |
---|---|
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 | UART (9600 baud rate, 8N1 format) |
Power Supply | Self-powered (from measured AC line) |
Accuracy | ±0.5% |
Operating Temperature | -10°C to 60°C |
Dimensions | 48mm x 23mm x 22mm |
The PZEM-004T V3 has a 4-pin interface for communication and power connections. The pinout is as follows:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply for the UART interface (3.3V or 5V) |
2 | GND | Ground connection |
3 | RX | UART Receive pin (connect to TX of microcontroller) |
4 | TX | UART Transmit pin (connect to RX of microcontroller) |
Connect the Current Transformer (CT):
Connect the Module to a Microcontroller:
VCC
and GND
pins to the 5V and GND pins of the microcontroller.RX
pin of the PZEM-004T V3 to the TX
pin of the microcontroller.TX
pin of the PZEM-004T V3 to the RX
pin of the microcontroller.Power the Module:
Read Data via UART:
Below is an example Arduino sketch to interface with the PZEM-004T V3 and read voltage, current, and power data:
#include <PZEM004Tv30.h> // Include the PZEM-004T V3 library
// Define the RX and TX pins for UART communication
#define RX_PIN 10
#define TX_PIN 11
// Create a PZEM object with the specified RX and TX pins
PZEM004Tv30 pzem(RX_PIN, TX_PIN);
void setup() {
Serial.begin(9600); // Initialize serial communication for debugging
Serial.println("PZEM-004T V3 Energy Meter Example");
}
void loop() {
// Read voltage, current, and power from the PZEM-004T V3
float voltage = pzem.voltage();
float current = pzem.current();
float power = pzem.power();
// Check if the readings are valid
if (isnan(voltage) || isnan(current) || isnan(power)) {
Serial.println("Error reading data from PZEM-004T V3!");
} else {
// Print the readings to the Serial Monitor
Serial.print("Voltage: ");
Serial.print(voltage);
Serial.println(" V");
Serial.print("Current: ");
Serial.print(current);
Serial.println(" A");
Serial.print("Power: ");
Serial.print(power);
Serial.println(" W");
Serial.println("-----------------------------");
}
delay(1000); // Wait for 1 second before the next reading
}
No Data Received from the Module:
Incorrect Current or Power Readings:
Module Not Responding to Commands:
Q: Can the PZEM-004T V3 measure DC circuits?
A: No, the PZEM-004T V3 is designed specifically for AC circuits and cannot measure DC voltage or current.
Q: Can I use the module with a 3.3V microcontroller?
A: Yes, the UART interface supports both 3.3V and 5V logic levels.
Q: How do I reset the energy counter?
A: The energy counter can be reset by sending a specific command via UART. Refer to the module's command set documentation for details.
Q: Is the module safe for high-power applications?
A: Yes, the PZEM-004T V3 can measure up to 100A and 22kW, but ensure proper insulation and safety precautions when working with high-power circuits.