Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use PZEM-04T: Examples, Pinouts, and Specs

Image of PZEM-04T
Cirkit Designer LogoDesign with PZEM-04T in Cirkit Designer

Introduction

The PZEM-04T is a multifunctional energy meter designed for monitoring and measuring key electrical parameters in AC circuits. It can measure voltage, current, power, energy consumption, and frequency, making it an essential tool for energy management and monitoring systems. The module features a UART interface for seamless communication with microcontrollers, enabling data logging and remote monitoring applications. Its compact design and high accuracy make it suitable for a wide range of applications.

Explore Projects Built with PZEM-04T

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Based Smart Environmental Monitoring System with Relay Control
Image of SOCOTECO: A project utilizing PZEM-04T in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled AC Lighting System with Power Monitoring
Image of Smart Energy Meter: A project utilizing PZEM-04T in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Smart Energy Monitoring and Control System with PZEM004t and LCD Display
Image of pr1: A project utilizing PZEM-04T in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 and PZEM004T-Based Smart Light Control with Current Sensing
Image of Smart Energy Meter: A project utilizing PZEM-04T in a practical application
This circuit is designed for monitoring and controlling AC loads using an ESP32 microcontroller. It includes a PZEM004T module for measuring voltage, current, and power, and a 4-channel relay module to switch three LED bulbs. The ESP32 communicates with the PZEM004T via UART and controls the relays to manage the connected loads.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with PZEM-04T

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 SOCOTECO: A project utilizing PZEM-04T in a practical application
ESP32-Based Smart Environmental Monitoring System with Relay Control
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Smart Energy Meter: A project utilizing PZEM-04T 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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of pr1: A project utilizing PZEM-04T in a practical application
ESP32-Based Smart Energy Monitoring and Control System with PZEM004t and LCD Display
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Smart Energy Meter: A project utilizing PZEM-04T in a practical application
ESP32 and PZEM004T-Based Smart Light Control with Current Sensing
This circuit is designed for monitoring and controlling AC loads using an ESP32 microcontroller. It includes a PZEM004T module for measuring voltage, current, and power, and a 4-channel relay module to switch three LED bulbs. The ESP32 communicates with the PZEM004T via UART and controls the relays to manage the connected loads.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Home energy monitoring systems
  • Industrial equipment monitoring
  • Renewable energy systems (e.g., solar inverters)
  • IoT-based energy management solutions
  • Laboratory testing and prototyping

Technical Specifications

Key Specifications

Parameter Value
Voltage Range 80V - 260V AC
Current Range 0A - 100A (with external CT)
Power Range 0W - 22kW
Energy Range 0kWh - 9999kWh
Frequency Range 45Hz - 65Hz
Communication UART (9600 baud rate)
Power Supply Self-powered (via AC input)
Accuracy ±0.5%

Pin Configuration

The PZEM-04T module has a 4-pin interface for communication and power connections. Below is the pin configuration:

Pin Number Pin Name Description
1 VCC Power supply for the UART interface (5V)
2 GND Ground connection
3 RX UART Receive pin (connect to TX of MCU)
4 TX UART Transmit pin (connect to RX of MCU)

Usage Instructions

Connecting the PZEM-04T

  1. Power Supply: The module is self-powered through the AC input, but the UART interface requires a 5V power supply connected to the VCC and GND pins.
  2. Current Transformer (CT): Connect the external CT to the module's designated input. Ensure the CT is clamped around the live wire of the AC circuit.
  3. UART Communication: Connect the RX pin of the PZEM-04T to the TX pin of your microcontroller (e.g., Arduino UNO) and the TX pin of the PZEM-04T to the RX pin of the microcontroller.

Example Arduino Code

Below is an example of how to interface the PZEM-04T with an Arduino UNO to read voltage, current, and power:

#include <SoftwareSerial.h>

// Define RX and TX pins for SoftwareSerial
SoftwareSerial pzemSerial(10, 11); // RX = Pin 10, TX = Pin 11

// PZEM-04T communication commands
byte readVoltage[] = {0xB0, 0xC0, 0xA8, 0x01, 0x01, 0x00, 0x1A};
byte response[7];

void setup() {
  Serial.begin(9600);          // Initialize Serial Monitor
  pzemSerial.begin(9600);      // Initialize PZEM-04T communication
  Serial.println("PZEM-04T Test");
}

void loop() {
  // Send command to read voltage
  pzemSerial.write(readVoltage, sizeof(readVoltage));
  delay(100); // Wait for response

  // Read response from PZEM-04T
  if (pzemSerial.available() >= 7) {
    for (int i = 0; i < 7; i++) {
      response[i] = pzemSerial.read();
    }

    // Calculate voltage from response
    float voltage = (response[3] << 8 | response[4]) / 10.0;
    Serial.print("Voltage: ");
    Serial.print(voltage);
    Serial.println(" V");
  }

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

Important Considerations

  • Safety: Ensure proper insulation and handling when working with high-voltage AC circuits.
  • CT Orientation: The current transformer must be clamped in the correct orientation for accurate readings.
  • Baud Rate: The UART communication operates at a fixed baud rate of 9600. Ensure your microcontroller is configured accordingly.
  • Data Parsing: The PZEM-04T sends data in a specific format. Refer to the datasheet for detailed communication protocols.

Troubleshooting and FAQs

Common Issues

  1. No Data Received via UART

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

    • Cause: Improper CT installation or loose connections.
    • Solution: Ensure the CT is securely clamped around the live wire and verify all connections.
  3. Module Not Powering On

    • Cause: No AC input or faulty module.
    • Solution: Check the AC input voltage and ensure it is within the specified range (80V - 260V AC).

FAQs

Q: Can the PZEM-04T measure DC circuits?
A: No, the PZEM-04T is designed specifically for AC circuits and cannot measure DC parameters.

Q: Can I use multiple PZEM-04T modules with a single microcontroller?
A: Yes, but each module must have a unique address. Refer to the datasheet for instructions on setting module addresses.

Q: What is the maximum distance for UART communication?
A: The maximum reliable distance for UART communication is typically around 15 meters. For longer distances, consider using RS485 converters.


This concludes the documentation for the PZEM-04T module. For further details, refer to the official datasheet or contact the manufacturer.