The PZEM-004T is a popular AC energy monitoring module used in IoT, electronics, and smart grid projects. It measures electrical parameters of mains power and sends data to microcontrollers like ESP8266, ESP32, Arduino, and Raspberry Pi through serial communication (TTL / Modbus-RTU depending on version).
Codes
#include <PZEM004Tv30.h>
#include <SoftwareSerial.h>SoftwareSerial pzemSerial(D6, D7); // RX, TX
PZEM004Tv30 pzem(pzemSerial);void setup() {
Serial.begin(115200);
Serial.println("PZEM004T Test");
}void loop() {
float voltage = pzem.voltage();
float current = pzem.current();
float power = pzem.power();
float energy = pzem.energy();
float freq = pzem.frequency();
float pf = pzem.pf();Serial.print("Voltage: "); Serial.println(voltage);
Serial.print("Current: "); Serial.println(current);
Serial.print("Power: "); Serial.println(power);
Serial.print("Energy: "); Serial.println(energy);
Serial.print("Frequency: "); Serial.println(freq);
Serial.print("Power Factor: "); Serial.println(pf);
Serial.println("--------------------");delay(2000);
}
top of page
Welcome to AmoTech Electronics
-
Empowering Innovation through SMART Electronics Solutions!
-
Our One-Stop Hub for IoT, Embedded Systems, Machine Learning, and Artificial Intelligence.
-
Shaping the future with Intelligent Technology and next-gen Automation.



Store Location
Address: Kigali, Rwanda
BRGD PLAZA KK15 Rd Opposite of RP Kigali
Email: amotechelectronics1@gmail.com
Tel: 0796594130
Shop
© 2025 All rights reserved
Customer Support
SKU: SEN456
R₣26,500Price
No Reviews YetShare your thoughts.
Be the first to leave a review.
You might also like
bottom of page



















