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

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

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

Introduction

The PZEM 004-T is a multifunctional energy meter designed for monitoring and managing electrical consumption in AC circuits. It is capable of measuring key electrical parameters such as voltage, current, power, energy, frequency, and power factor. This compact and versatile module is widely used in applications like home automation, industrial energy monitoring, and power management systems. Its ability to interface with microcontrollers like Arduino makes it a popular choice for DIY projects and professional setups alike.

Explore Projects Built with PZEM 004-T

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 004-T 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 004-T 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 004-T 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-Based Smart Power Monitoring and Control System with Wi-Fi Connectivity
Image of SIM: A project utilizing PZEM 004-T in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with PZEM 004-T

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 004-T 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 004-T 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 004-T 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 SIM: A project utilizing PZEM 004-T 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.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

The PZEM 004-T offers precise measurements and supports communication via UART (serial interface), making it easy to integrate into various systems. Below are the key technical details:

General Specifications

Parameter Value
Operating Voltage 80V - 260V AC
Measurable Voltage 80V - 260V AC
Measurable Current 0A - 100A (with external CT)
Power Measurement 0W - 22kW
Energy Measurement 0kWh - 9999kWh
Frequency Range 45Hz - 65Hz
Power Factor Range 0.00 - 1.00
Communication UART (9600 baud rate)
Dimensions 70mm x 40mm x 30mm

Pin Configuration

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

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

Additionally, the module includes terminals for connecting the AC input and the current transformer (CT) for current measurement.

Usage Instructions

Connecting the PZEM 004-T

  1. Power Supply: Connect the VCC pin to a 5V DC power source and the GND pin to ground.
  2. UART Communication: Connect the RX pin of the PZEM 004-T to the TX pin of your microcontroller (e.g., Arduino), and the TX pin of the PZEM 004-T to the RX pin of the microcontroller.
  3. AC Input: Connect the AC live and neutral wires to the input terminals of the module.
  4. Current Transformer (CT): Place the CT around the live wire of the AC circuit to measure current.

Important Considerations

  • Ensure that the AC input voltage is within the specified range (80V - 260V AC).
  • The current transformer should only be placed around the live wire, not both live and neutral wires.
  • Use proper insulation and safety precautions when working with high-voltage AC circuits.
  • Avoid reversing the RX and TX connections, as this will prevent communication with the microcontroller.

Example: Using PZEM 004-T with Arduino UNO

Below is an example Arduino sketch to read data from the PZEM 004-T module using the SoftwareSerial library:

#include <SoftwareSerial.h>

// Define RX and TX pins for SoftwareSerial
#define RX_PIN 10  // Connect to TX of PZEM 004-T
#define TX_PIN 11  // Connect to RX of PZEM 004-T

SoftwareSerial pzemSerial(RX_PIN, TX_PIN);

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

void loop() {
  // Request data from PZEM 004-T
  byte request[] = {0xB0, 0xC0, 0xA8, 0x01, 0x01, 0x01, 0x00, 0x1A};
  pzemSerial.write(request, sizeof(request));

  delay(100);  // Wait for response

  // Read response from PZEM 004-T
  if (pzemSerial.available()) {
    Serial.print("Data received: ");
    while (pzemSerial.available()) {
      byte data = pzemSerial.read();
      Serial.print(data, HEX);
      Serial.print(" ");
    }
    Serial.println();
  }

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

Notes:

  • The above code sends a sample request to the PZEM 004-T and prints the received data in hexadecimal format.
  • For detailed data parsing and advanced functionality, use a dedicated library like the PZEM004T library available in the Arduino IDE Library Manager.

Troubleshooting and FAQs

Common Issues

  1. No Data Received:

    • Ensure the RX and TX connections are correct.
    • Verify that the baud rate is set to 9600 in both the code and the module.
    • Check the power supply to the module.
  2. Incorrect Measurements:

    • Ensure the current transformer is properly placed around the live wire.
    • Verify that the AC input voltage is within the specified range.
  3. Module Not Responding:

    • Check for loose connections or damaged wires.
    • Reset the module by disconnecting and reconnecting the power supply.

FAQs

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

Q: What is the maximum current the module can measure?
A: The module can measure up to 100A using the provided current transformer.

Q: Can I use multiple PZEM 004-T modules with a single microcontroller?
A: Yes, you can use multiple modules by assigning unique addresses to each module and connecting them to different UART ports or using a multiplexer.

Q: Is the PZEM 004-T safe to use with high-voltage circuits?
A: Yes, but always follow proper safety precautions and ensure all connections are insulated to prevent electrical hazards.

By following this documentation, you can effectively integrate and use the PZEM 004-T module in your projects for accurate energy monitoring and management.