Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use PZEM-017: Examples, Pinouts, and Specs

Image of PZEM-017Design with PZEM-017 in Cirkit Designer

Introduction

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.

Explore Projects Built with PZEM-017

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Controlled AC Lighting System with Power Monitoring: A project utilizing PZEM-017 in a practical application
ESP32-Controlled AC Lighting System with Power Monitoring

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.

Open Project in Cirkit Designer
Image of ESP32-Based Smart Power Monitoring and Control System with Wi-Fi Connectivity: A project utilizing PZEM-017 in a practical application
ESP32-Based Smart Power Monitoring and Control System with Wi-Fi Connectivity

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.

Open Project in Cirkit Designer

Common Applications and Use Cases


Technical Specifications

Key Technical Details

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

Pin Configuration and Descriptions

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)

Usage Instructions

How to Use the PZEM-017 in a Circuit

  1. Power the Module: Connect the VCC pin to a 5V DC power source and the GND pin to ground.
  2. Connect the Current Transformer (CT):
    • Attach the external CT to the load circuit you want to monitor.
    • Ensure the CT is properly clamped around one of the AC wires (live or neutral, but not both).
  3. UART Communication:
    • Connect the TX pin of the PZEM-017 to the RX pin of your microcontroller.
    • Connect the RX pin of the PZEM-017 to the TX pin of your microcontroller.
  4. Load the Code: If using an Arduino, upload the appropriate code to read data via UART.

Important Considerations and Best Practices

Example Code for Arduino UNO

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
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Received from PZEM-017:

    • Ensure the UART connections (TX and RX) are correct.
    • Verify that the baud rate is set to 9600 in your microcontroller code.
    • Check the power supply to the PZEM-017 (5V DC).
  2. Incorrect Readings:

    • Confirm that the current transformer (CT) is properly clamped around the AC wire.
    • Ensure the CT is not clamped around both live and neutral wires simultaneously.
    • Verify that the load is within the measurement range of the PZEM-017.
  3. Communication Errors:

    • Use shorter wires for UART communication to reduce noise.
    • Consider adding pull-up resistors or using shielded cables for better signal integrity.

FAQs

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.