The PZEM-017 is a power monitoring module designed for measuring key electrical parameters in AC circuits. It can measure voltage, current, power, energy, and frequency, providing real-time data for energy management and monitoring applications. The module communicates via UART, making it easy to integrate with microcontrollers and other systems. Its compact design and reliable performance make it ideal for use in smart homes, industrial automation, and energy monitoring systems.
Explore Projects Built with PZEM
Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
This is a smart environmental monitoring and control system featuring an ESP32 microcontroller interfaced with a PZEM004T for power monitoring, relay modules for actuating bulbs and a fan, and an LCD for user interface. It includes flame, gas, and vibration sensors for safety monitoring purposes.
This circuit is a monitoring and control system using an ESP32 microcontroller. It integrates multiple PZEM004t energy meters, a rain gauge, a light sensor, and an LCD display for data visualization. Additionally, it controls a relay module to switch a bulb on or off based on sensor inputs.
This circuit is a smart power monitoring and control system using an ESP32 microcontroller. It features multiple sensors and components, including PZEM-004T AC modules for voltage and current measurement, DS18B20 temperature sensors, an LCD for display, and solid-state relays for controlling power outlets. The system is integrated with Blynk for remote monitoring and control, and includes pushbuttons for local interaction.
This circuit features an ESP32 microcontroller interfaced with a PZEM004T power monitoring module and a 4-channel relay module controlling multiple AC LED bulbs. The ESP32 uses GPIO pins to control the relays, which in turn switch the LED bulbs on and off. The PZEM004T is connected to the ESP32 for communication and to a current sensor for monitoring power consumption of the connected load through the relay contacts.
The PZEM-017 module is designed to operate in AC circuits and provides accurate measurements of electrical parameters. Below are the key technical details:
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 Interface
UART (9600 baud rate)
Power Supply
5V DC
Accuracy
±0.5%
Operating Temperature
-10°C to 60°C
Dimensions
70mm x 40mm x 20mm
Pin Configuration
The PZEM-017 module has a simple pinout for easy integration. Below is the pin configuration:
Pin Name
Description
VCC
5V DC power supply input
GND
Ground
TX
UART Transmit (connect to RX of microcontroller)
RX
UART Receive (connect to TX of microcontroller)
AC-IN
AC voltage input (connect to live and neutral wires)
CT-IN
Current transformer input (connect to external CT sensor)
Usage Instructions
Connecting the PZEM-017
Power Supply: Connect the VCC pin to a 5V DC power source and the GND pin to ground.
AC Input: Connect the AC-IN terminals to the live and neutral wires of the AC circuit you want to monitor.
Current Transformer: Attach the external current transformer (CT) to the CT-IN terminals. Ensure the CT is clamped around the live wire of the AC circuit.
UART Communication: Connect the TX pin of the PZEM-017 to the RX pin of your microcontroller, and the RX pin of the PZEM-017 to the TX pin of your microcontroller.
Important Considerations
Ensure proper insulation and safety precautions when working with AC circuits.
Use a compatible current transformer (e.g., 100A/50mA) for accurate current measurement.
Avoid exceeding the specified voltage and current ranges to prevent damage to the module.
Use a stable 5V DC power supply to ensure reliable operation.
Example Code for Arduino UNO
Below is an example Arduino sketch to interface the PZEM-017 with an Arduino UNO using UART communication:
#include <SoftwareSerial.h>
// Define RX and TX pins for SoftwareSerial
SoftwareSerial pzemSerial(10, 11); // RX = Pin 10, TX = Pin 11
// Command to read voltage (example command for PZEM-017)
byte readVoltageCmd[] = {0xB0, 0xC0, 0xA8, 0x01, 0x01, 0x00, 0x1A};
// Function to send command and read response
void sendCommand(byte* cmd, int cmdLength) {
pzemSerial.write(cmd, cmdLength); // Send command to PZEM
delay(100); // Wait for response
while (pzemSerial.available()) {
byte response = pzemSerial.read(); // Read response byte by byte
Serial.print(response, HEX); // Print response in HEX format
Serial.print(" ");
}
Serial.println();
}
void setup() {
Serial.begin(9600); // Initialize Serial Monitor
pzemSerial.begin(9600); // Initialize SoftwareSerial for PZEM
Serial.println("PZEM-017 Power Monitoring Module");
}
void loop() {
Serial.print("Reading Voltage: ");
sendCommand(readVoltageCmd, sizeof(readVoltageCmd)); // Send voltage read command
delay(2000); // Wait 2 seconds before next reading
}
Notes:
Replace readVoltageCmd with appropriate commands to read other parameters (e.g., current, power).
Ensure the RX and TX pins are correctly connected between the Arduino and PZEM-017.
Troubleshooting and FAQs
Common Issues
No Data Received from the Module
Solution: Check the UART connections (TX and RX). Ensure the TX of the PZEM-017 is connected to the RX of the microcontroller and vice versa.
Solution: Verify the baud rate is set to 9600 in your code.
Incorrect Voltage or Current Readings
Solution: Ensure the AC-IN terminals are properly connected to the live and neutral wires.
Solution: Verify the current transformer is securely clamped around the live wire and is compatible with the module.
Module Not Powering On
Solution: Check the 5V DC power supply and ensure proper connections to the VCC and GND pins.
FAQs
Can the PZEM-017 measure DC circuits?
No, the PZEM-017 is designed specifically for AC circuits.
What is the maximum current the module can measure?
The module can measure up to 100A when used with a compatible current transformer.
Can I use the PZEM-017 with a Raspberry Pi?
Yes, the PZEM-017 can be used with a Raspberry Pi via UART communication. Use appropriate libraries or write custom code to interface with the module.
How do I reset the energy counter?
The energy counter can be reset by sending a specific command via UART. Refer to the manufacturer's documentation for the reset command.
By following this documentation, you can effectively integrate the PZEM-017 into your projects for accurate power monitoring and energy management.