The CT PZEM-004T is a versatile and widely-used electronic component designed for measuring electrical parameters such as voltage, current, power, and energy. It is particularly popular in applications involving energy monitoring, smart metering, and home automation systems. The PZEM-004T is often used in conjunction with microcontrollers like the Arduino UNO to provide real-time data on electrical consumption.
Parameter | Value |
---|---|
Voltage Range | 80-260V AC |
Current Range | 0-100A (with external CT) |
Power Range | 0-22kW |
Energy Range | 0-9999kWh |
Frequency Range | 45-65Hz |
Communication | TTL Serial (3.3V/5V) |
Accuracy | ±0.5% |
Dimensions | 70mm x 40mm x 20mm |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V/5V) |
2 | GND | Ground |
3 | RX | Serial data receive |
4 | TX | Serial data transmit |
5 | A | Current transformer input (A) |
6 | B | Current transformer input (B) |
#include <SoftwareSerial.h>
// Create a software serial object to communicate with PZEM-004T
SoftwareSerial pzem(10, 11); // RX, TX
void setup() {
Serial.begin(9600); // Initialize serial communication with the computer
pzem.begin(9600); // Initialize serial communication with PZEM-004T
}
void loop() {
// Request data from PZEM-004T
pzem.write(0xB0); // Command to read voltage
delay(100); // Wait for the response
if (pzem.available()) {
// Read the response from PZEM-004T
byte response[7];
for (int i = 0; i < 7; i++) {
response[i] = pzem.read();
}
// Calculate voltage from the response
float voltage = (response[2] << 8 | response[3]) / 10.0;
Serial.print("Voltage: ");
Serial.print(voltage);
Serial.println(" V");
}
delay(1000); // Wait for a second before the next reading
}
By following this documentation, users can effectively integrate the CT PZEM-004T into their projects, ensuring accurate and reliable measurements of electrical parameters.