Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

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

Image of CT PZEM004TDesign with CT PZEM004T in Cirkit Designer

Introduction

The CT PZEM-004T is a versatile and widely-used electronic component designed for measuring electrical parameters such as voltage, current, power, and energy. It is particularly popular in applications involving energy monitoring, smart metering, and home automation systems. The PZEM-004T is often used in conjunction with microcontrollers like the Arduino UNO to provide real-time data on electrical consumption.

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 ESP32-Controlled AC Lighting System with Power Monitoring: 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.

Open Project in Cirkit Designer
Image of ESP32-Based Smart Power Monitoring and Control System with Wi-Fi Connectivity: 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.

Open Project in Cirkit Designer

Technical Specifications

Key Technical Details

Parameter Value
Voltage Range 80-260V AC
Current Range 0-100A (with external CT)
Power Range 0-22kW
Energy Range 0-9999kWh
Frequency Range 45-65Hz
Communication TTL Serial (3.3V/5V)
Accuracy ±0.5%
Dimensions 70mm x 40mm x 20mm

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 VCC Power supply (3.3V/5V)
2 GND Ground
3 RX Serial data receive
4 TX Serial data transmit
5 A Current transformer input (A)
6 B Current transformer input (B)

Usage Instructions

How to Use the Component in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V or 5V power supply and the GND pin to the ground.
  2. Serial Communication: Connect the RX pin to the TX pin of the microcontroller and the TX pin to the RX pin of the microcontroller.
  3. Current Transformer: Connect the A and B pins to the current transformer (CT) to measure the current.

Important Considerations and Best Practices

Example Code for Arduino UNO

#include <SoftwareSerial.h>

// Create a software serial object to communicate with PZEM-004T
SoftwareSerial pzem(10, 11); // RX, TX

void setup() {
  Serial.begin(9600); // Initialize serial communication with the computer
  pzem.begin(9600);   // Initialize serial communication with PZEM-004T
}

void loop() {
  // Request data from PZEM-004T
  pzem.write(0xB0); // Command to read voltage
  delay(100);       // Wait for the response

  if (pzem.available()) {
    // Read the response from PZEM-004T
    byte response[7];
    for (int i = 0; i < 7; i++) {
      response[i] = pzem.read();
    }

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

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

Troubleshooting and FAQs

Common Issues Users Might Face

  1. No Data Received: Ensure that the RX and TX pins are correctly connected and that the baud rate matches.
  2. Inaccurate Readings: Calibrate the sensor and ensure that the current transformer is properly connected.
  3. Power Supply Issues: Verify that the VCC and GND pins are correctly connected to a stable power source.

Solutions and Tips for Troubleshooting

By following this documentation, users can effectively integrate the CT PZEM-004T into their projects, ensuring accurate and reliable measurements of electrical parameters.