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

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

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

Introduction

The PZEM-022 is a multifunctional energy meter designed for monitoring and measuring key electrical parameters in AC circuits. It provides accurate readings of voltage, current, power, energy consumption, and frequency. Equipped with a digital display, the PZEM-022 allows for real-time monitoring, while its UART communication interface enables data logging and remote monitoring applications. This makes it an ideal choice for industrial automation, home energy management systems, and laboratory testing setups.

Explore Projects Built with PZEM-022

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-022 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-022 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

Technical Specifications

The PZEM-022 is designed to operate in a wide range of AC applications. Below are its key technical specifications:

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
Accuracy ±0.5%
Communication Protocol UART (9600 baud rate)
Power Supply Self-powered (via measured AC line)
Display Type Digital LCD
Operating Temperature -10°C to 60°C
Dimensions 79mm x 43mm x 48mm

Pin Configuration and Descriptions

The PZEM-022 has a simple wiring interface for both power measurement and UART communication. Below is the pin configuration:

Power Measurement Terminals

Terminal Description
L (Line) Connect to the live AC wire
N (Neutral) Connect to the neutral AC wire

UART Communication Pins

Pin Description
TX Transmit data (connect to RX of microcontroller)
RX Receive data (connect to TX of microcontroller)
GND Ground (common ground with microcontroller)

Usage Instructions

Connecting the PZEM-022

  1. Power Measurement Setup:

    • Connect the "L" terminal to the live AC wire.
    • Connect the "N" terminal to the neutral AC wire.
    • Ensure proper insulation and safety precautions when working with high-voltage AC circuits.
  2. Current Transformer (CT) Installation:

    • Place the external CT around the live wire of the AC circuit.
    • Ensure the CT is oriented correctly (arrow on CT should point toward the load).
  3. UART Communication:

    • Connect the TX pin of the PZEM-022 to the RX pin of your microcontroller (e.g., Arduino UNO).
    • Connect the RX pin of the PZEM-022 to the TX pin of your microcontroller.
    • Connect the GND pin of the PZEM-022 to the GND of your microcontroller.

Important Considerations

Example Code for Arduino UNO

Below is an example Arduino sketch to read data from the PZEM-022 using UART communication:

#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
  pzemSerial.begin(9600); // Initialize PZEM-022 communication

  Serial.println("PZEM-022 Energy Meter Example");
}

void loop() {
  // Request data from PZEM-022
  pzemSerial.write(0xB0); // Example command to request data (check datasheet)

  delay(100); // Wait for response

  // Read response from PZEM-022
  while (pzemSerial.available()) {
    byte data = pzemSerial.read();
    Serial.print("Received: ");
    Serial.println(data, HEX); // Print data in hexadecimal format
  }

  delay(1000); // Wait 1 second before next request
}

Notes:

Troubleshooting and FAQs

Common Issues

  1. No Data Received via UART:

    • Cause: Incorrect wiring or baud rate mismatch.
    • Solution: Verify the TX and RX connections. Ensure the baud rate is set to 9600.
  2. Incorrect Measurements:

    • Cause: Improper CT installation or loose connections.
    • Solution: Ensure the CT is securely clamped around the live wire and oriented correctly.
  3. Display Not Turning On:

    • Cause: No power supply to the PZEM-022.
    • Solution: Check the AC connections to the "L" and "N" terminals.
  4. UART Communication Interference:

    • Cause: Long UART cables or noisy environment.
    • Solution: Use shorter cables or shielded wires for UART communication.

FAQs

Q1: Can the PZEM-022 measure DC circuits?
A1: No, the PZEM-022 is designed specifically for AC circuits and cannot measure DC parameters.

Q2: Is the PZEM-022 compatible with 3.3V microcontrollers?
A2: Yes, but you will need a logic level converter to safely interface the 5V UART signals with a 3.3V microcontroller.

Q3: Can I reset the energy reading to zero?
A3: Yes, the PZEM-022 supports a reset command via UART. Refer to the datasheet for the specific command.

Q4: What is the maximum cable length for the CT?
A4: The CT cable should ideally be kept under 1 meter to minimize signal loss and interference.

By following this documentation, you can effectively integrate the PZEM-022 into your projects for accurate energy monitoring and data logging.