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

How to Use PZEM004T.V4-2: Examples, Pinouts, and Specs

Image of PZEM004T.V4-2
Cirkit Designer LogoDesign with PZEM004T.V4-2 in Cirkit Designer

Introduction

The PZEM004T.V4-2, manufactured by Peacefair, is a multifunctional energy meter designed for monitoring and managing energy consumption in AC circuits. This compact module measures key electrical parameters, including voltage, current, power, energy, and frequency, and provides real-time data via a digital display or UART communication interface. Its versatility makes it ideal for applications such as home energy monitoring, industrial equipment diagnostics, and renewable energy systems.

Explore Projects Built with PZEM004T.V4-2

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 PZEM004T.V4-2 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 PZEM004T.V4-2 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 Power Monitoring and Control System with Wi-Fi Connectivity
Image of SIM: A project utilizing PZEM004T.V4-2 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
ESP32-Based Smart Energy Monitoring and Control System with PZEM004t and LCD Display
Image of pr1: A project utilizing PZEM004T.V4-2 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

Explore Projects Built with PZEM004T.V4-2

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 PZEM004T.V4-2 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 PZEM004T.V4-2 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 SIM: A project utilizing PZEM004T.V4-2 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
Image of pr1: A project utilizing PZEM004T.V4-2 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

Common Applications

  • Home energy monitoring systems
  • Industrial equipment diagnostics
  • Renewable energy systems (e.g., solar inverters)
  • Smart energy management solutions
  • Educational and research projects

Technical Specifications

Key Specifications

Parameter Value
Operating Voltage 80V - 260V AC
Measurable Voltage 80V - 260V AC
Measurable Current 0A - 100A (with external CT)
Power Measurement Range 0W - 22kW
Energy Measurement Range 0kWh - 9999kWh
Frequency Range 45Hz - 65Hz
Communication Interface UART (9600 baud rate)
Accuracy ±0.5%
Operating Temperature -10°C to 60°C
Dimensions 70mm x 40mm x 20mm

Pin Configuration

The PZEM004T.V4-2 module has a 4-pin interface for UART communication and power connections. Below is the pinout description:

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

Usage Instructions

Connecting the PZEM004T.V4-2

  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 module to the TX pin of your microcontroller (e.g., Arduino UNO) and the TX pin of the module to the RX pin of the microcontroller.
  3. Current Transformer (CT): Attach the included current transformer (CT) to the load wire you wish to monitor. Ensure the CT is properly oriented for accurate readings.
  4. AC Voltage Input: Connect the AC voltage input terminals to the live and neutral wires of the circuit you want to monitor. Exercise caution when handling high-voltage connections.

Important Considerations

  • Safety First: Always disconnect power before wiring the module to avoid electric shock.
  • CT Placement: Ensure the current transformer is clamped around only one conductor (live or neutral) and not both.
  • UART Communication: Use a logic level converter if interfacing with a 3.3V microcontroller to avoid damaging the module.
  • Baud Rate: The default UART baud rate is 9600. Ensure your microcontroller is configured to match this.

Example: Using with Arduino UNO

Below is an example Arduino sketch to read data from the PZEM004T.V4-2 module:

#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 communication with PZEM004T

  Serial.println("PZEM004T.V4-2 Energy Meter Example");
}

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

  delay(100); // Wait for the module to respond

  // Read response from the module
  byte response[32];
  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 PZEM004T");
  }

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

Note: The above code demonstrates basic communication with the module. For detailed data parsing, refer to the PZEM004T.V4-2 protocol documentation.


Troubleshooting and FAQs

Common Issues

  1. No Data Received via UART

    • Cause: Incorrect wiring or mismatched baud rate.
    • Solution: Double-check the RX/TX connections and ensure the baud rate is set to 9600.
  2. Inaccurate Measurements

    • Cause: Improper CT placement or loose connections.
    • Solution: Ensure the CT is clamped around a single conductor and verify all connections are secure.
  3. Module Not Powering On

    • Cause: Insufficient power supply.
    • Solution: Verify the VCC pin is receiving a stable 5V DC supply.
  4. High Noise in Readings

    • Cause: Electrical noise in the circuit.
    • Solution: Use proper shielding and grounding techniques to minimize noise.

FAQs

Q1: Can the PZEM004T.V4-2 measure DC circuits?
No, the module is designed specifically for AC circuits and cannot measure DC voltage or current.

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

Q3: Can I use the module with a 3.3V microcontroller?
Yes, but you must use a logic level converter to safely interface the 5V UART pins with a 3.3V microcontroller.

Q4: How do I reset the energy counter?
The energy counter can be reset via a specific UART command. Refer to the protocol documentation for details.


This concludes the documentation for the PZEM004T.V4-2 energy meter. For further assistance, consult the manufacturer's datasheet or contact Peacefair support.