The CT PZEM004T is a multifunctional energy meter designed to measure key electrical parameters such as voltage, current, power, energy, and frequency. It is specifically built to work with current transformers (CTs), making it ideal for monitoring AC electrical systems. This component is widely used in energy management systems, industrial automation, and home energy monitoring applications. Its ability to provide real-time data makes it a valuable tool for analyzing energy efficiency and optimizing power usage.
The CT PZEM004T is a compact and efficient energy meter with the following key specifications:
Parameter | Specification |
---|---|
Voltage Range | 80V - 260V AC |
Current Range | 0A - 100A (with external CT) |
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% (under standard conditions) |
Dimensions | 48mm x 29mm x 21mm |
The CT PZEM004T module has a simple pinout for easy integration into circuits. Below is the pin configuration:
Pin Name | Description |
---|---|
VCC | Power supply input (5V DC) |
GND | Ground connection |
TX | UART Transmit pin (connects to RX of MCU) |
RX | UART Receive pin (connects to TX of MCU) |
To use the CT PZEM004T with an Arduino UNO, follow these steps:
Wiring the Module:
VCC
pin of the PZEM004T to the 5V pin of the Arduino UNO.GND
pin of the PZEM004T to the GND pin of the Arduino UNO.TX
pin of the PZEM004T to the RX
pin of the Arduino UNO.RX
pin of the PZEM004T to the TX
pin of the Arduino UNO.Install Required Libraries:
PZEM004T
library for Arduino from the Arduino Library Manager or GitHub.Upload the Code: Use the following example code to read data from the PZEM004T and display it on the Serial Monitor:
#include <PZEM004Tv30.h> // Include the PZEM004T library
// Create a PZEM004T object with RX and TX pins
PZEM004Tv30 pzem(2, 3); // RX = pin 2, TX = pin 3
void setup() {
Serial.begin(9600); // Initialize Serial Monitor
Serial.println("PZEM004T 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");
}
// Wait 1 second before the next reading
delay(1000);
}
No Data on Serial Monitor:
TX
and RX
pins are correctly connected between the PZEM004T and the Arduino UNO.Inaccurate Readings:
Error Messages in Code:
RX
and TX
.Module Not Powering On:
VCC
pin is receiving a stable 5V DC supply.Q: Can the PZEM004T measure DC circuits?
A: No, the PZEM004T is designed specifically for AC circuits and cannot measure DC parameters.
Q: What is the maximum current the PZEM004T can measure?
A: The module can measure up to 100A when used with the appropriate current transformer (CT).
Q: Can I use multiple PZEM004T modules with a single Arduino?
A: Yes, multiple modules can be used by assigning unique addresses to each module and using a software serial library to manage communication.
Q: Is the PZEM004T safe to use with high-voltage systems?
A: Yes, but proper isolation and safety precautions must be followed when working with high-voltage AC circuits.