Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›IoT & Wireless
  4. ›PZEM-004T AC Energy Meter Module with ESP32

Component guide · Advanced · 3 min read

PZEM-004T AC Energy Meter Module with ESP32

By Geekobot Learning Team · Updated 24 Oct 2026

On this page
Short answerWiringReading itSafetyTry itCommon mistakesFAQsParts and next steps
Short answer

The PZEM-004T is a mains energy meter module that measures AC voltage, current, power, energy, frequency and power factor. It connects to 230 V for voltage sensing, uses a current transformer clamped around one wire (100 A version), and sends readings over an isolated TTL serial link using Modbus. An ESP32 can read it and send data to Home Assistant. Only people competent with mains wiring should install it.

Key specs at a glance

Voltage
About 80 to 260 V AC
Current
0 to 10 A (internal shunt) or 0 to 100 A (split-core CT)
Measures
V, A, W, kWh, Hz, power factor
Interface
TTL UART, Modbus-RTU, 9600 baud
Isolation
Serial side optically isolated from mains
Software
PZEM004Tv30 Arduino library; ESPHome pzemac
01

Wiring

Mains side

live and neutral to the voltage terminals through a fuse; the CT clamps around the live wire only (not both wires) of the circuit you measure. Everything must be in an enclosure.

Logic side

5 V, GND, TX and RX to a UART on your board (crossed over). Version 3.0 modules talk Modbus; many work with 3.3 V boards, but check your module's version and add level shifting if readings fail.

Several PZEMs can share one serial bus if each is given a different Modbus address first.

02

Reading it

With the PZEM004Tv30 library on an ESP32: create PZEM004Tv30 pzem(Serial2, 16, 17); then read pzem.voltage(), pzem.current(), pzem.power(), pzem.energy() and pzem.pf(). NaN means no response: check wiring and that the mains side is powered, since the module needs mains voltage to answer. In ESPHome, the pzemac sensor publishes all values to Home Assistant over MQTT or the API.

03

Safety

Mains voltage is lethal. Switch off at the breaker before working, use a fused connection and proper enclosure, never touch the module or CT terminals while live, and keep low-voltage wiring separate. In many places, work on fixed household wiring must be done by a licensed electrician. A plug-in smart plug with energy metering is a safer alternative for single appliances.

04

Try it: Energy cost calculator

Change the values and the diagram and results update as you type.

05

Common mistakes to avoid

  • !Clamping the CT around both live and neutral (reads zero).
  • !Leaving mains terminals exposed.
  • !No fuse on the voltage sensing wires.
  • !Expecting readings with mains disconnected.
  • !Using two modules on one bus without changing addresses.
06

Frequently asked questions

Why does my PZEM-004T return NaN?

It is not responding. Check TX/RX crossover, power, the baud rate and that mains is connected to the voltage input.

Can the PZEM-004T measure DC?

No. Use the PZEM-017 or an INA226 for DC.

Does it work with ESP32 and Home Assistant?

Yes, with the Arduino library or ESPHome's pzemac component.

Where do I clamp the current transformer?

Around the live wire only of the circuit you want to measure.

Is it accurate?

Typically within about 0.5 to 1% for voltage and power under normal conditions; check the module's datasheet.

Parts for this guide

  • PZEM-004T AC Energy Meter
    ₹569View
Shop Meters & Testers

Calculators

Energy cost calculatorPower dissipation calculator

Terms in this guide

ModbusA simple industrial request-and-reply protocol in which a master polls numbered registers on slave devices, usually over RS-485 (Modbus RTU) or Ethernet (Modbus TCP).UARTUniversal asynchronous receiver-transmitter: two-wire serial (TX and RX) used by GPS, Bluetooth modules and debug output.True RMSA multimeter feature that measures the real effective value of non-sinusoidal AC.PowerThe rate of energy use, in watts (W). P = V x I, so a 12 V load drawing 2 A uses 24 W.OptocouplerA component that passes a signal through light between an LED and a phototransistor, electrically isolating two circuits.

Keep learning

Concept explainerIntermediateMQTT and Home Assistant for ESP32MQTT is a lightweight messaging system: devices publish messages to named topics on a broker, and anything subscribed to that topic receives them.3 min read · IoT & WirelessComponent guideBeginnerESP32 GuideThe ESP32 is a low-cost 3.3 V microcontroller from Espressif with built-in Wi-Fi and Bluetooth, used for IoT devices, smart-home controllers and web dashboards.5 min read · Boards & MicrocontrollersConcept explainerBeginnerUART and Serial CommunicationA UART sends data one bit at a time over one wire with no shared clock, so both ends must agree on the speed, called the baud rate (9600 and 115200 are common).4 min read · Electronics FundamentalsComparisonIntermediateACS712 vs INA219 Current SensorsThe ACS712 is a Hall-effect current sensor that outputs an analog voltage centred at 2.5 V, rising or falling 185, 100 or 66 mV per amp for its 5, 20 and 30 A versions.3 min read · SensorsConcept explainerBeginnerAC vs DCDirect current (DC) flows one way at a steady voltage, like a battery or USB charger.4 min read · Electronics Fundamentals

Sources

  • Peacefair PZEM-004T V3.0 user manual
  • PZEM004Tv30 library documentation
  • ESPHome PZEM AC component documentation

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWiringReading itSafetyTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide1 item · ₹569

PZEM-004T AC Energy Meter

Ask the Community

Ask a question