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 current transformers (CTs) 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 power consumption analysis
  • Renewable energy systems (e.g., solar, wind)
  • Smart grid and IoT-based energy management
  • Electrical equipment testing and diagnostics

Technical Specifications

The CT PZEM004T is a versatile and compact 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 (9600 baud rate, 8N1 format)
Power Supply Self-powered (via measured AC voltage)
Accuracy ±0.5%
Operating Temperature -10°C to 60°C

Pin Configuration and Descriptions

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

Pin Name Description
1 VCC Power supply for the module (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)

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

Terminal Name Description
1 AC Voltage Input Connect to the live and neutral wires of the AC system being measured
2 CT Input Connect to the current transformer (CT) for current measurement

Usage Instructions

How to Use the CT PZEM004T in a Circuit

  1. Connect the AC Voltage Input:

    • Connect the live and neutral wires of the AC system to the voltage input terminals of the module.
    • Ensure proper insulation and safety precautions when working with high-voltage AC systems.
  2. Connect the Current Transformer (CT):

    • Attach the CT to the AC line you want to monitor.
    • Connect the CT's output wires to the CT input terminals on the module.
  3. Connect to a Microcontroller:

    • Use the UART interface to connect the module to a microcontroller (e.g., Arduino UNO).
    • Connect the module's TX pin to the microcontroller's RX pin and the RX pin to the microcontroller's TX pin.
    • Provide a 5V DC power supply to the VCC pin and connect the GND pin to the microcontroller's ground.
  4. Install the Required Library:

    • For Arduino, use the "PZEM004T" library available in the Arduino Library Manager.
  5. Upload the Code:

    • Use the example code below to read data from the module.

Example Code for Arduino UNO

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

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

// Create a PZEM004T object
PZEM004T pzem(RX_PIN, TX_PIN);

void setup() {
  Serial.begin(9600); // Initialize serial communication for debugging
  Serial.println("PZEM004T Energy Meter Example");
}

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

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

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

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

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

Important Considerations and Best Practices

  • Safety First: Always ensure proper insulation and safety measures when working with high-voltage AC systems.
  • CT Orientation: Ensure the current transformer (CT) is installed in the correct orientation for accurate readings.
  • Communication Distance: The UART communication distance should not exceed 10 meters for reliable data transmission.
  • Power Supply: The module is self-powered from the AC voltage input, but the UART interface requires a 5V DC supply.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Output:

    • Ensure the UART connections (TX and RX) are correctly wired.
    • Verify that the baud rate is set to 9600 in the microcontroller code.
  2. Incorrect Readings:

    • Check the CT installation and ensure it is properly clamped around the AC line.
    • Verify that the AC voltage input is securely connected.
  3. Module Not Powering On:

    • Ensure the AC voltage input is within the specified range (80V - 260V AC).
    • Check for loose or faulty connections.
  4. Communication Errors:

    • Ensure the microcontroller and module share a common ground.
    • Verify that the RX and TX pins are not swapped.

FAQs

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

Q: What is the maximum current the module can measure?
A: The module can measure up to 100A when used with the appropriate current transformer (CT).

Q: Can I use multiple PZEM004T modules with a single microcontroller?
A: Yes, you can use multiple modules by assigning unique addresses to each module via the UART interface.

Q: Is the module compatible with 3.3V microcontrollers?
A: The module requires a 5V DC supply for UART communication. Use a level shifter if connecting to a 3.3V microcontroller.

By following this documentation, you can effectively integrate the CT PZEM004T into your energy monitoring projects.