

The PZEM-017 is a multifunctional energy meter manufactured by PeaceFair. It is designed to measure key electrical parameters in AC circuits, including voltage, current, power, energy, and frequency. This component is equipped with a digital display for real-time monitoring and supports UART communication, making it ideal for integration with microcontrollers such as Arduino or Raspberry Pi.








| Parameter | Value |
|---|---|
| Operating Voltage | 80V - 260V AC |
| Measurement Voltage | 80V - 260V AC |
| Measurement Current | 0.01A - 100A (with external CT) |
| Power Measurement Range | 0 - 22kW |
| Energy Measurement Range | 0 - 9999kWh |
| Frequency Range | 45Hz - 65Hz |
| Communication Protocol | UART (9600 baud rate) |
| Power Consumption | < 1W |
| Dimensions | 79mm x 43mm x 48mm |
The PZEM-017 has a total of 4 pins for power and communication. Below is the pinout:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (5V DC) |
| 2 | GND | Ground connection |
| 3 | TX | UART Transmit pin (connect to RX of microcontroller) |
| 4 | RX | UART Receive pin (connect to TX of microcontroller) |
Below is an example Arduino sketch to read data from the PZEM-017 using UART:
#include <SoftwareSerial.h>
// Define RX and TX pins for SoftwareSerial
SoftwareSerial pzemSerial(10, 11); // RX = Pin 10, TX = Pin 11
void setup() {
Serial.begin(9600); // Initialize Serial Monitor at 9600 baud
pzemSerial.begin(9600); // Initialize PZEM-017 communication at 9600 baud
Serial.println("PZEM-017 Energy Meter Example");
}
void loop() {
// Request data from PZEM-017
byte request[] = {0xB4, 0xC0, 0xA8, 0x01, 0x01, 0x00, 0x1E};
// Example request packet to read data
pzemSerial.write(request, sizeof(request));
delay(100); // Wait for response
// Read response from PZEM-017
byte response[7];
int index = 0;
while (pzemSerial.available() > 0 && index < 7) {
response[index++] = pzemSerial.read();
}
// Check if valid response received
if (index == 7) {
Serial.print("Voltage: ");
Serial.println(response[2]); // Example: Extract voltage from response
// Add parsing logic for other parameters (current, power, etc.)
} else {
Serial.println("No valid response from PZEM-017");
}
delay(1000); // Wait 1 second before next request
}
No Data Received from PZEM-017:
Incorrect Readings:
Communication Errors:
Q: Can the PZEM-017 measure DC circuits?
A: No, the PZEM-017 is designed specifically for AC circuits and cannot measure DC parameters.
Q: What is the maximum current the PZEM-017 can measure?
A: The PZEM-017 can measure up to 100A when used with the appropriate external current transformer (CT).
Q: Can I use the PZEM-017 with a Raspberry Pi?
A: Yes, the PZEM-017 can be used with a Raspberry Pi via UART communication. Ensure proper voltage level shifting if needed.
Q: Is the PZEM-017 suitable for three-phase systems?
A: No, the PZEM-017 is designed for single-phase AC systems only.
This concludes the documentation for the PZEM-017 energy meter. For further assistance, refer to the manufacturer's datasheet or contact PeaceFair support.