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

How to Use pzem-004t: Examples, Pinouts, and Specs

Image of pzem-004t
Cirkit Designer LogoDesign with pzem-004t in Cirkit Designer

Introduction

The PZEM-004T is a multifunctional energy meter designed for monitoring and measuring key electrical parameters in AC circuits. It provides real-time data on voltage, current, power, energy consumption, frequency, and power factor. This module communicates via UART (Universal Asynchronous Receiver-Transmitter), making it easy to interface with microcontrollers such as the Arduino UNO (manufacturer part ID: UNO).

Explore Projects Built with pzem-004t

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

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-004t 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-004t 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 Energy Consumption Monitoring: A project utilizing pzem-004t 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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of SIM: A project utilizing pzem-004t 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

Common Applications and Use Cases

  • Home energy monitoring systems
  • Industrial equipment monitoring
  • Smart home automation
  • Data logging for energy consumption analysis
  • Power quality monitoring in AC circuits

Technical Specifications

The PZEM-004T is a compact and efficient energy meter with the following key specifications:

Parameter Value
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
Power Factor Range 0.00 - 1.00
Communication Protocol UART (9600 baud rate, 8N1 format)
Operating Temperature -10°C to 60°C
Power Supply Self-powered (from the measured AC line)

Pin Configuration and Descriptions

The PZEM-004T module has a simple pinout for easy integration:

Pin Name Description
V+ AC voltage input (connect to live wire)
V- AC voltage input (connect to neutral wire)
TX UART transmit pin (connect to RX of microcontroller)
RX UART receive pin (connect to TX of microcontroller)
GND Ground (common ground with microcontroller)

Usage Instructions

How to Use the PZEM-004T in a Circuit

  1. Connect the Voltage Input:

    • Connect the V+ pin to the live wire of the AC circuit.
    • Connect the V- pin to the neutral wire of the AC circuit.
  2. Connect the Current Transformer (CT):

    • Place the CT around the live wire of the AC circuit to measure current.
    • Ensure the CT is oriented correctly (arrow on the CT should point toward the load).
  3. Connect to a Microcontroller:

    • Connect the TX pin of the PZEM-004T to the RX pin of the Arduino UNO.
    • Connect the RX pin of the PZEM-004T to the TX pin of the Arduino UNO.
    • Connect the GND pin of the PZEM-004T to the GND of the Arduino UNO.
  4. Power the Module:

    • The PZEM-004T is self-powered from the AC line, so no external power supply is needed.

Important Considerations and Best Practices

  • Safety First: Always handle the PZEM-004T with care when working with high-voltage AC circuits. Ensure all connections are insulated and secure.
  • Common Ground: Ensure the PZEM-004T and the microcontroller share a common ground for proper UART communication.
  • Baud Rate: The default UART baud rate is 9600. Ensure your microcontroller is configured to match this setting.
  • Current Transformer Placement: The CT should only enclose the live wire, not both live and neutral wires, to measure current correctly.

Example Code for Arduino UNO

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

#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-004T communication

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

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

  delay(100); // Wait for response

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

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

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

Notes on the Code

  • The SoftwareSerial library is used to communicate with the PZEM-004T on pins 10 and 11 of the Arduino UNO.
  • The example sends a Modbus RTU request to the PZEM-004T and prints the raw response to the Serial Monitor.
  • For detailed data parsing, refer to the PZEM-004T Modbus protocol documentation.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Response from the PZEM-004T:

    • Ensure the UART connections (TX, RX, and GND) are correct.
    • Verify that the baud rate is set to 9600 in your code.
    • Check that the PZEM-004T is properly connected to the AC circuit.
  2. Incorrect Readings:

    • Ensure the current transformer (CT) is properly placed around the live wire.
    • Verify that the voltage input connections (V+ and V-) are secure.
  3. Communication Errors:

    • Ensure the microcontroller and PZEM-004T share a common ground.
    • Check for electrical noise or interference in the circuit.

FAQs

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

Q: What is the maximum current the PZEM-004T can measure?
A: The PZEM-004T can measure up to 100A using the included current transformer.

Q: Can I use multiple PZEM-004T modules with one Arduino?
A: Yes, you can use multiple modules by assigning unique Modbus addresses to each PZEM-004T and connecting them to the same UART bus.

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

This concludes the documentation for the PZEM-004T energy meter. For further assistance, refer to the manufacturer's datasheet or support resources.