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

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

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

Introduction

The PZEM-016 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. The device is equipped with a digital display for real-time monitoring and supports UART communication, making it suitable for integration into IoT systems or remote monitoring setups.

Explore Projects Built with PZEM-016

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-016 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-016 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
Image of ESP8266 NodeMCU Based Energy Monitoring Display with PZEM004T and OLED Screen: A project utilizing PZEM-016 in a practical application
ESP8266 NodeMCU Based Energy Monitoring Display with PZEM004T and OLED Screen

This circuit is designed to monitor electrical parameters using the PZEM004t sensor and display the data on a 0.96" OLED screen. The esp8266 nodemcu serves as the central controller, interfacing with the PZEM004t sensor via serial communication (RX/TX) and with the OLED display through an I2C connection (SCK/SDA). A 5V adapter provides power to the circuit, with the nodemcu regulating down to 3.3V for the OLED display and the PZEM004t sensor receiving 5V directly.

Open Project in Cirkit Designer

Common Applications and Use Cases


Technical Specifications

Key Technical Details

Parameter Specification
Voltage Measurement 0 - 300V AC
Current Measurement 0 - 100A (with external current shunt)
Power Measurement 0 - 30kW
Energy Measurement 0 - 9999kWh
Frequency Measurement 45Hz - 65Hz
Communication Interface UART (9600 baud rate)
Power Supply 80V - 260V AC
Accuracy ±0.5%
Operating Temperature -10°C to 60°C

Pin Configuration and Descriptions

The PZEM-016 has a 4-pin UART interface for communication and a terminal block for AC input and current shunt connection.

UART Pinout

Pin Number Pin Name Description
1 VCC Power supply input (5V DC)
2 GND Ground
3 TX UART Transmit (data output)
4 RX UART Receive (data input)

Terminal Block

Terminal Description
L Live wire input for AC voltage measurement
N Neutral wire input for AC voltage measurement
I+ Positive terminal for external current shunt
I- Negative terminal for external current shunt

Usage Instructions

How to Use the PZEM-016 in a Circuit

  1. Connect the AC Input:
    • Connect the live (L) and neutral (N) wires of the AC circuit to the corresponding terminals on the PZEM-016.
  2. Connect the Current Shunt:
    • Attach the external current shunt to the I+ and I- terminals. Ensure the shunt is rated for the expected current range.
  3. Power the Module:
    • Supply 5V DC to the VCC pin and connect the GND pin to the ground of your power source.
  4. Establish UART Communication:
    • Connect the TX and RX pins to the corresponding UART pins of your microcontroller (e.g., Arduino UNO).

Important Considerations and Best Practices

Example: Interfacing with Arduino UNO

Below is an example Arduino sketch to read data from the PZEM-016 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 UART communication with PZEM-016

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

void loop() {
  // Request data from PZEM-016
  byte request[] = {0x01, 0x04, 0x00, 0x00, 0x00, 0x0A, 0x70, 0x0D};
  pzemSerial.write(request, sizeof(request));

  delay(100); // Wait for response

  // Read response from PZEM-016
  byte response[25];
  int len = pzemSerial.readBytes(response, sizeof(response));

  if (len > 0) {
    Serial.print("Received Data: ");
    for (int i = 0; i < len; i++) {
      Serial.print(response[i], HEX);
      Serial.print(" ");
    }
    Serial.println();
  } else {
    Serial.println("No response from PZEM-016");
  }

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

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Received via UART:

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

    • Cause: Improper connection of the current shunt or loose wiring.
    • Solution: Check the shunt connections and ensure all wires are securely fastened.
  3. Module Not Powering On:

    • Cause: Insufficient power supply or incorrect voltage.
    • Solution: Ensure the VCC pin is supplied with 5V DC and the GND pin is properly connected.
  4. Communication Errors:

    • Cause: Long UART cable or electrical noise.
    • Solution: Use shorter cables and shielded wires to reduce interference.

FAQs


This concludes the documentation for the PZEM-016 energy meter. For further assistance, refer to the manufacturer's datasheet or contact technical support.