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

How to Use CT PZEM004T: Examples, Pinouts, and Specs

Image of CT PZEM004T
Cirkit Designer LogoDesign with CT PZEM004T in Cirkit Designer

Introduction

The CT PZEM004T is a multifunctional energy meter designed to measure key electrical parameters such as voltage, current, power, energy, and frequency. It is commonly used in conjunction with a current transformer (CT) to monitor AC electrical systems. This component is ideal for applications requiring real-time energy monitoring, such as home automation, industrial energy management, and renewable energy systems.

Explore Projects Built with CT PZEM004T

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 CT PZEM004T 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 CT PZEM004T 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 CT PZEM004T 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 and PZEM004T-Based Smart Light Control with Current Sensing
Image of Smart Energy Meter: A project utilizing CT PZEM004T 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 CT PZEM004T

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 CT PZEM004T 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 CT PZEM004T 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 CT PZEM004T 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 Smart Energy Meter: A project utilizing CT PZEM004T 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 energy analysis
  • Renewable energy systems (e.g., solar inverters)
  • Smart grid applications
  • Load monitoring for efficiency optimization

Technical Specifications

The CT PZEM004T is a versatile module with the following key specifications:

Parameter Specification
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 Protocol UART (TTL level)
Baud Rate 9600 bps
Power Supply 5V DC (external power required)
Accuracy ±0.5%
Dimensions 48mm x 29mm x 22mm

Pin Configuration and Descriptions

The CT PZEM004T module has a simple pinout for easy integration into circuits:

Pin Name Description
1 VCC 5V DC power supply input
2 GND Ground connection
3 RX UART Receive pin (connect to TX of microcontroller)
4 TX UART Transmit pin (connect to RX of microcontroller)
5 AC Input (L) Live wire connection for AC voltage measurement
6 AC Input (N) Neutral wire connection for AC voltage measurement
7 CT Input (S1) Current transformer input (primary side of CT)
8 CT Input (S2) Current transformer input (secondary side of CT, typically connected to ground)

Usage Instructions

How to Use the CT PZEM004T in a Circuit

  1. Power Supply: Connect the VCC pin to a 5V DC power source and the GND pin to ground.
  2. AC Voltage Measurement: Connect the AC Input (L) and AC Input (N) pins to the live and neutral wires of the AC system you want to monitor.
  3. Current Measurement: Attach the current transformer (CT) to the AC line you wish to measure. Connect the CT's output wires to the CT Input (S1 and S2) pins.
  4. Communication: Use the RX and TX pins to interface with a microcontroller (e.g., Arduino UNO) via UART. Ensure proper connection of RX to TX and TX to RX.
  5. Data Reading: Use the UART protocol to read voltage, current, power, energy, and frequency data from the module.

Important Considerations and Best Practices

  • Safety First: Always handle AC connections with care. Ensure the circuit is powered off during installation.
  • Current Transformer: Use a compatible CT with the appropriate current range (e.g., 100A CT for high-current applications).
  • Isolation: Ensure proper electrical isolation between the AC side and the low-voltage DC side to prevent damage or hazards.
  • Baud Rate: Configure your microcontroller's UART to communicate at 9600 bps.
  • Data Parsing: Use the PZEM004T communication protocol to parse data correctly. Libraries are available for Arduino to simplify this process.

Example Code for Arduino UNO

Below is an example of how to interface the CT PZEM004T with an Arduino UNO using a library:

#include <PZEM004Tv30.h> // Include the PZEM004T library

// Define RX and TX pins for communication with the PZEM004T
#define RX_PIN 10
#define TX_PIN 11

// Create a PZEM004T object
PZEM004Tv30 pzem(&Serial1); // Use hardware serial (or SoftwareSerial if needed)

void setup() {
  Serial.begin(9600); // Initialize serial monitor
  Serial1.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN); // Initialize UART for PZEM004T

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

void loop() {
  // Read voltage
  float voltage = pzem.voltage();
  if (!isnan(voltage)) {
    Serial.print("Voltage: ");
    Serial.print(voltage);
    Serial.println(" V");
  } else {
    Serial.println("Error reading voltage!");
  }

  // Read current
  float current = pzem.current();
  if (!isnan(current)) {
    Serial.print("Current: ");
    Serial.print(current);
    Serial.println(" A");
  } else {
    Serial.println("Error reading current!");
  }

  // Read power
  float power = pzem.power();
  if (!isnan(power)) {
    Serial.print("Power: ");
    Serial.print(power);
    Serial.println(" W");
  } else {
    Serial.println("Error reading power!");
  }

  // Read energy
  float energy = pzem.energy();
  if (!isnan(energy)) {
    Serial.print("Energy: ");
    Serial.print(energy);
    Serial.println(" kWh");
  } else {
    Serial.println("Error reading energy!");
  }

  // Read frequency
  float frequency = pzem.frequency();
  if (!isnan(frequency)) {
    Serial.print("Frequency: ");
    Serial.print(frequency);
    Serial.println(" Hz");
  } else {
    Serial.println("Error reading frequency!");
  }

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

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Output:

    • Ensure the RX and TX pins are correctly connected (RX to TX and TX to RX).
    • Verify the baud rate is set to 9600 bps on both the PZEM004T and the microcontroller.
  2. Incorrect Readings:

    • Check the wiring of the current transformer (CT) and ensure it is properly clamped around the AC line.
    • Verify that the AC Input (L) and (N) connections are correct.
  3. Module Not Responding:

    • Ensure the module is powered with a stable 5V DC supply.
    • Check for loose connections or damaged wires.
  4. Error Messages in Code:

    • Ensure the PZEM004T library is installed correctly in the Arduino IDE.
    • Verify that the correct pins are defined for RX and TX in the code.

FAQs

Q: Can the PZEM004T measure DC voltage or current?
A: No, the PZEM004T is designed specifically for AC systems and cannot measure DC parameters.

Q: What is the maximum current the module can measure?
A: The module can measure up to 100A when used with a compatible 100A current transformer.

Q: Can I use multiple PZEM004T modules with one microcontroller?
A: Yes, you can use multiple modules by assigning unique addresses to each module and using a multiplexer or separate UART channels.

Q: Is the module safe for high-voltage applications?
A: The module is designed for 80V-260V AC systems. Ensure proper insulation and safety precautions when working with high voltages.