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 specifically built to work with current transformers (CTs) for monitoring AC electrical systems. This component is widely used in energy management systems, industrial automation, and home energy monitoring applications. Its ability to provide real-time data makes it an essential tool for analyzing energy efficiency and optimizing power usage.

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 management
  • Renewable energy systems (e.g., solar inverters)
  • Smart grid applications
  • Electrical load analysis and diagnostics

Technical Specifications

The CT PZEM004T is a compact and 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 (9600 baud rate)
Power Supply Self-powered (via measured AC voltage)
Accuracy ±0.5%
Dimensions 48mm x 29mm x 21mm

Pin Configuration

The CT PZEM004T module has a simple pinout for easy integration into circuits. Below is the pin configuration:

Pin Name Description
VCC Power input (5V DC) for UART communication
GND Ground connection
TX UART Transmit pin (connects to RX of microcontroller)
RX UART Receive pin (connects to TX of microcontroller)
AC Input Connects to the AC voltage to be measured
CT Input Connects to the current transformer (CT)

Usage Instructions

How to Use the CT PZEM004T in a Circuit

  1. Connect the AC Input: Wire the AC voltage to the AC input terminals of the module. Ensure the voltage is within the specified range (80V - 260V AC).
  2. Connect the Current Transformer (CT): Attach the CT to the CT input terminals. The CT should be clamped around the live wire of the AC circuit to measure current.
  3. Power the Module: The module is self-powered from the AC input. However, for UART communication, provide 5V DC to the VCC pin and connect the GND pin to the ground of your microcontroller.
  4. Connect to a Microcontroller: Use the TX and RX pins to establish UART communication with a microcontroller (e.g., Arduino UNO). Ensure the baud rate is set to 9600.

Important Considerations

  • Safety First: Always handle AC connections with care. Ensure the circuit is powered off during installation.
  • CT Orientation: Ensure the CT is installed in the correct orientation as indicated by the markings on the CT.
  • Isolation: Use proper electrical isolation techniques to prevent damage to the module or connected devices.
  • UART Communication: Use a logic level converter if your microcontroller operates at 3.3V logic levels, as the PZEM004T uses 5V logic.

Example Code for Arduino UNO

Below is an example Arduino sketch to read data from the CT PZEM004T using UART communication:

#include <SoftwareSerial.h>

// Define RX and TX pins for SoftwareSerial
SoftwareSerial pzemSerial(10, 11); // RX = pin 10, TX = pin 11

// PZEM004T communication commands
byte readVoltage[] = {0xB0, 0xC0, 0xA8, 0x01, 0x01, 0x00, 0x1A};
byte response[7]; // Buffer to store the response

void setup() {
  Serial.begin(9600);          // Initialize Serial Monitor
  pzemSerial.begin(9600);      // Initialize SoftwareSerial for PZEM004T
  Serial.println("PZEM004T Test");
}

void loop() {
  // Send voltage read command
  pzemSerial.write(readVoltage, sizeof(readVoltage));
  delay(100); // Wait for the response

  // Read response from PZEM004T
  if (pzemSerial.available() >= 7) {
    for (int i = 0; i < 7; i++) {
      response[i] = pzemSerial.read();
    }

    // Calculate voltage from response
    float voltage = (response[2] << 8 | response[3]) / 10.0;
    Serial.print("Voltage: ");
    Serial.print(voltage);
    Serial.println(" V");
  }

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

Notes on the Code

  • The example code demonstrates how to send a command to read voltage and interpret the response.
  • Modify the code to read other parameters (e.g., current, power) by using the appropriate commands from the PZEM004T datasheet.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Received via UART

    • Ensure the TX and RX pins are correctly connected (crossed: TX to RX, RX to TX).
    • Verify the baud rate is set to 9600 in both the code and the microcontroller.
  2. Incorrect Voltage or Current Readings

    • Check the AC input connections and ensure the voltage is within the specified range.
    • Verify the CT is properly clamped around the live wire and oriented correctly.
  3. Module Not Powering On

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

    • Use shorter wires for UART communication to reduce noise.
    • If using a 3.3V microcontroller, ensure a logic level converter is used.

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 the appropriate current transformer (CT).

Q: Can I use multiple PZEM004T modules with one microcontroller?
A: Yes, you can connect multiple modules by assigning unique addresses to each module using the UART protocol.

Q: Is the module safe to use with high-voltage systems?
A: Yes, but proper safety precautions and electrical isolation must be implemented to ensure safe operation.