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), making it ideal for monitoring AC electrical systems. This component provides real-time data, enabling users to analyze energy consumption and improve energy efficiency.

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 and Use Cases

  • Home and industrial energy monitoring
  • Smart energy management systems
  • Renewable energy systems (e.g., solar inverters)
  • Load analysis and optimization
  • Electrical fault detection and diagnostics

Technical Specifications

The CT PZEM004T is a versatile and reliable energy meter 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 Modbus RTU (RS485)
Baud Rate 9600 bps
Accuracy ±0.5%
Operating Temperature -10°C to 60°C
Power Supply Self-powered (from measured AC voltage)

Pin Configuration and Descriptions

The CT PZEM004T module has the following pinout:

Pin Name Description
V+ AC voltage input (live wire)
V- AC voltage input (neutral wire)
A+ Current transformer (CT) input (primary side)
A- Current transformer (CT) input (secondary side)
5V Optional 5V DC power input (for external power supply, if required)
GND Ground connection for optional external power supply
TX RS485 communication output (transmit)
RX RS485 communication input (receive)

Usage Instructions

How to Use the CT PZEM004T in a Circuit

  1. Connect the Voltage Input:

    • Connect the V+ pin to the live wire of the AC system.
    • Connect the V- pin to the neutral wire of the AC system.
  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 A+ and A- pins of the PZEM004T.
  3. Power the Module:

    • The module is self-powered from the AC voltage input. However, if needed, you can provide an external 5V DC power supply to the 5V and GND pins.
  4. Establish Communication:

    • Use the TX and RX pins to connect the module to a microcontroller or RS485-to-USB adapter for data communication.
    • Ensure the baud rate is set to 9600 bps for proper communication.
  5. Read Data:

    • Use the Modbus RTU protocol to query the module for real-time measurements of voltage, current, power, energy, and frequency.

Important Considerations and Best Practices

  • Ensure the CT is properly rated for the current range of your application (e.g., 100A CT for loads up to 100A).
  • Avoid exposing the module to extreme temperatures or humidity to maintain accuracy and reliability.
  • Use proper insulation and safety precautions when working with high-voltage AC systems.
  • If connecting to an Arduino or other microcontroller, use an RS485-to-TTL converter for communication.

Example: Connecting to an Arduino UNO

Below is an example of how to interface the CT PZEM004T with an Arduino UNO using an RS485-to-TTL converter:

Wiring Diagram

  • Connect the TX pin of the PZEM004T to the DI pin of the RS485 module.
  • Connect the RX pin of the PZEM004T to the RO pin of the RS485 module.
  • Connect the GND pin of the PZEM004T to the GND pin of the RS485 module.
  • Connect the VCC pin of the RS485 module to the 5V pin of the Arduino.
  • Connect the GND pin of the RS485 module to the GND pin of the Arduino.

Arduino Code Example

#include <ModbusMaster.h>

// Create an instance of the ModbusMaster library
ModbusMaster node;

// Define the RS485 enable pin
#define MAX485_DE 2
#define MAX485_RE 3

void preTransmission() {
  digitalWrite(MAX485_DE, HIGH); // Enable RS485 driver
  digitalWrite(MAX485_RE, HIGH);
}

void postTransmission() {
  digitalWrite(MAX485_DE, LOW);  // Disable RS485 driver
  digitalWrite(MAX485_RE, LOW);
}

void setup() {
  // Initialize serial communication
  Serial.begin(9600);
  Serial.println("PZEM004T Energy Meter Test");

  // Initialize Modbus communication
  node.begin(1, Serial); // Set Modbus ID to 1
  node.preTransmission(preTransmission);
  node.postTransmission(postTransmission);

  // Configure RS485 enable pins
  pinMode(MAX485_DE, OUTPUT);
  pinMode(MAX485_RE, OUTPUT);
  digitalWrite(MAX485_DE, LOW);
  digitalWrite(MAX485_RE, LOW);
}

void loop() {
  uint8_t result;
  uint16_t data[6];

  // Read voltage (register 0x0000)
  result = node.readInputRegisters(0x0000, 1);
  if (result == node.ku8MBSuccess) {
    Serial.print("Voltage: ");
    Serial.print(node.getResponseBuffer(0) / 10.0); // Convert to volts
    Serial.println(" V");
  }

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

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Output:

    • Ensure the module is properly powered (check voltage input or external 5V supply).
    • Verify the RS485 connections and ensure the baud rate is set to 9600 bps.
  2. Incorrect Readings:

    • Check that the CT is securely clamped around the AC line and connected to the correct pins.
    • Ensure the CT is rated for the current range of your application.
  3. Communication Errors:

    • Verify the Modbus ID of the PZEM004T (default is 1).
    • Check the wiring between the RS485 module and the microcontroller.

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: How do I reset the energy counter?
A: The energy counter can be reset using a Modbus command. Refer to the module's datasheet for the specific command.

Q: Can I use multiple PZEM004T modules in the same system?
A: Yes, you can use multiple modules by assigning unique Modbus IDs to each device.

Q: What is the maximum cable length for RS485 communication?
A: RS485 supports cable lengths up to 1200 meters, but ensure proper termination resistors are used for long distances.