Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Home Automation & Smart Devices

Home Energy Monitor: Current Sensor and Dashboard Build

Home Energy Monitor: Current Sensor and Dashboard Build

March 11, 2026 /Posted byJayesh Jain / 0

Home Energy Monitor: Current Sensor and Dashboard Build

A home energy monitor gives you real-time insight into your electricity consumption — how much your AC draws at different temperatures, which appliance is causing your bill to spike, and whether your solar panels are actually saving what the installer promised. With an SCT013 current sensor, an ESP32, and a free Grafana or Home Assistant dashboard, you can build a whole-house energy monitor for under Rs. 1,500 that rivals commercial units costing Rs. 15,000-25,000.

This guide covers current transformer (CT) sensors for non-invasive monitoring (no mains wiring required), voltage sensing for accurate power factor measurement, and building a real-time dashboard that shows kilowatt-hours, cost in rupees, and per-appliance breakdowns.

Table of Contents

  1. CT Sensors and Their Types
  2. Hardware Setup
  3. EmonLib: Energy Monitoring Library
  4. PZEM-004T: Complete Energy Module
  5. Home Assistant Integration
  6. Grafana Dashboard Build
  7. Indian Electricity Tariff Calculator
  8. Frequently Asked Questions

CT Sensors and Their Types

Current transformer (CT) sensors clamp around a single wire and measure the magnetic field produced by current flow. They require no interruption to your mains wiring — just clip the CT around the live wire:

  • SCT013-000 (100A): Most popular for whole-house monitoring. Outputs 0-50 mA proportional to 0-100A. Use with burden resistor.
  • SCT013-030 (30A): Better accuracy for individual appliance monitoring (AC units, geysers). Outputs 1V max — no burden resistor needed.
  • YHDC SCT-013: Same as SCT013, OEM brand used in most Indian kits. Available from Robu.in and Quartzcomponents.
  • PZEM-004T: Complete all-in-one module with internal current transformer, voltage sensing, power factor measurement, and UART output. The most beginner-friendly option.
Important — Single Wire Clamping: The CT sensor must clamp around ONE wire only (live wire only, or neutral only — not both). Clamping around both live and neutral wires cancels the magnetic fields and gives zero reading. In a standard 2-pin Indian socket, clamp around the single wire that feeds the circuit.

Hardware Setup

For the SCT013-000 (100A current output type) with an ESP32:

Components:

  • SCT013-000 or YHDC CT sensor
  • ESP32 (12-bit ADC for better resolution than ESP8266’s 10-bit)
  • 33-ohm burden resistor (converts CT current to measurable voltage)
  • Two 10k resistors (voltage divider to bias ADC midpoint to 1.65V)
  • 10 microfarad capacitor (filter)
  • 3.5mm stereo jack socket (CT sensor has 3.5mm plug)

Circuit: The burden resistor converts the CT’s current output to a voltage. The voltage divider biases the ADC input to the midpoint of the 3.3V supply so the AC waveform swings above and below the bias point. The capacitor filters out high-frequency noise.

CT Sensor 3.5mm TIP --+-- 33 ohm --+
                      |             |
CT Sensor SLEEVE -----+     ADC1   |
                                   |
3.3V --10k-- +--10k-- GND          |
             |                     |
             +---------------------+
             |                ADC pin = ESP32 GPIO34

Recommended Product

ESP32 LoRa with OLED Display
The ESP32’s 12-bit ADC (4096 levels vs ESP8266’s 1024) gives 4x better current measurement resolution. The built-in OLED displays real-time watts and today’s kWh consumption without needing a phone or computer.

Shop ESP32 Boards

EmonLib: Energy Monitoring Library

EmonLib by OpenEnergyMonitor is the standard library for CT sensor energy monitoring. It handles RMS calculation, calibration, and apparent power computation:

#include <EmonLib.h>

EnergyMonitor emon1;

void setup() {
  Serial.begin(115200);
  // Pin 34, calibration factor
  // SCT013-000: calibration = (100A / 0.05A) / 33 ohm = 60.6
  emon1.current(34, 60.6);
}

void loop() {
  double Irms = emon1.calcIrms(1480);  // 1480 samples
  double power = Irms * 230;  // Apparent power in VA
  double realPower = power * 0.9;  // Assume 0.9 power factor

  Serial.print("Current: "); Serial.print(Irms); Serial.println(" A");
  Serial.print("Power: "); Serial.print(power); Serial.println(" VA");

  delay(5000);
}

To calibrate the 60.6 factor: connect a known load (an incandescent bulb or electric iron is ideal — purely resistive). Adjust the calibration value until your reading matches a commercial clamp meter measurement. For India’s 230V 50Hz supply, typically 56-65 works for SCT013-000 with a 33-ohm burden resistor.

PZEM-004T: Complete Energy Module

The PZEM-004T module is the easiest approach — it measures voltage, current, power, energy (kWh), frequency, and power factor with high accuracy (+/- 0.5%):

#include <PZEM004Tv30.h>
#include <HardwareSerial.h>

// PZEM TX -> ESP32 GPIO16, PZEM RX -> GPIO17
HardwareSerial pzemSerial(2);
PZEM004Tv30 pzem(pzemSerial, 16, 17);

void loop() {
  float voltage = pzem.voltage();
  float current = pzem.current();
  float power = pzem.power();
  float energy = pzem.energy();  // kWh accumulated
  float frequency = pzem.frequency();
  float pf = pzem.pf();  // Power factor 0-1

  Serial.printf("%.1fV %.2fA %.1fW %.3fkWh PF:%.2fn",
    voltage, current, power, energy, pf);

  delay(1000);
}

The PZEM-004T is designed for Indian 230V 50Hz supply. Its energy register resets with a software command — useful for daily kWh tracking and electricity bill calculation.

Home Assistant Integration

Publish PZEM or EmonLib readings to Home Assistant via MQTT:

// MQTT publishing example
char payload[200];
snprintf(payload, sizeof(payload),
  "{"voltage":%.1f,"current":%.2f,"
  ""power":%.1f,"energy":%.3f,"pf":%.2f}",
  voltage, current, power, energy, pf);

mqttClient.publish("home/energy/main", payload);

In Home Assistant configuration.yaml:

mqtt:
  sensor:
    - name: "Main Power"
      state_topic: "home/energy/main"
      value_template: "{{ value_json.power }}"
      unit_of_measurement: "W"
      device_class: power

    - name: "Daily Energy"
      state_topic: "home/energy/main"
      value_template: "{{ value_json.energy }}"
      unit_of_measurement: "kWh"
      device_class: energy
      state_class: total_increasing

The state_class: total_increasing setting enables the Energy Dashboard in Home Assistant (Settings → Energy) which automatically calculates daily, monthly, and yearly consumption totals.

Recommended Product

ESP8266 WiFi Relay Module
Combine your energy monitor with a relay module for automatic load control — cut off high-consumption appliances when total home load exceeds a threshold. Useful during peak tariff hours or when running on solar/inverter to prevent overload.

Shop Relay Modules

Grafana Dashboard Build

For beautiful historical charts, send energy data to InfluxDB and visualise with Grafana:

  1. Install InfluxDB on your Raspberry Pi: sudo apt install influxdb influxdb-client
  2. Install Grafana: download from grafana.com for ARM
  3. Publish ESP32 readings to InfluxDB using the InfluxDB Arduino library
  4. In Grafana: add InfluxDB data source, create panels for Power (Watts), Energy (kWh), and Voltage

Key Grafana panels for an Indian home energy dashboard:

  • Real-time power gauge: shows current watts with colour zones (green=low, yellow=medium, red=high)
  • Daily bar chart: kWh consumed per day for the past 30 days
  • Monthly trend line: compare this month vs same month last year
  • Cost estimate: calculated field using your state’s DISCOM slab rates

Indian Electricity Tariff Calculator

Different states have different DISCOM slab rates. Here is an ESPHome lambda to calculate approximate monthly cost for Maharashtra (MSEDCL residential slabs):

sensor:
  - platform: template
    name: "Estimated Monthly Bill"
    unit_of_measurement: "Rs"
    lambda: |-
      // MSEDCL 2025 residential slabs (approx)
      float kwh = id(monthly_energy).state;
      float cost = 0;
      if (kwh <= 100) {
        cost = kwh * 3.26;       // Slab 1: 0-100 units
      } else if (kwh <= 300) {
        cost = 100 * 3.26 + (kwh - 100) * 5.66;  // Slab 2
      } else {
        cost = 100 * 3.26 + 200 * 5.66 + (kwh - 300) * 8.35;  // Slab 3+
      }
      return cost;
    update_interval: 3600s

Adjust the rates for your state: Delhi (BSES/TPDDL), Karnataka (BESCOM), Tamil Nadu (TANGEDCO), Gujarat (DGVCL), Rajasthan (JVVNL) all have different slab structures. Check your latest electricity bill for the exact per-unit rates.

Recommended Product

Waveshare 30-Channel Ethernet Relay
For commercial or large residential buildings, the 30-channel Ethernet relay with Modbus TCP allows individual circuit monitoring and control from a single module. Connect one PZEM-004T per circuit group for sub-meter visibility across the entire property.

Shop Multi-Channel Relays

Frequently Asked Questions

How accurate is the SCT013 vs a commercial energy meter?

With proper calibration, the SCT013 + EmonLib achieves 2-3% accuracy for resistive loads. For reactive loads (motors, inverters, LED drivers), accuracy depends on power factor compensation. The PZEM-004T achieves 0.5% accuracy and measures power factor natively — recommended for billing-grade measurements.

Can I monitor individual circuits (AC, geyser, kitchen) separately?

Yes — use one CT sensor per circuit. Multiple CT sensors can connect to the same ESP32 (different ADC pins). For a typical Indian home, monitor the AC circuit, geyser circuit, and main panel for three-circuit sub-metering with one ESP32 and three CT sensors.

Will this work in a flat where the distribution board is in the stairwell?

Yes, if you can access the DB to clip the CT sensor. The SCT013 is compact (fits around 6mm cable) and the ESP32 can be mounted near the DB with a small USB power supply. Data goes over WiFi, so no wiring from the DB to the flat.

How do I reset the PZEM-004T energy counter daily?

Use pzem.resetEnergy() in your ESP32 code, triggered by a daily schedule automation in Home Assistant or a time-based trigger in the ESP32 loop (check for midnight IST). This gives you daily kWh totals for easy bill estimation.

Can I monitor three-phase supply (used in some Indian villas and shops)?

Yes — use three PZEM-004T modules, one per phase. Address each module uniquely via Modbus and sum the readings for total three-phase power. This configuration monitors R, Y, B phase independently, which is useful for load balancing.

Monitor and Cut Your Electricity Bill

Real-time energy monitoring with current sensors and ESP32. Know exactly what is consuming power and when. Build your dashboard for under Rs. 1,500.

Shop Energy Monitor Components

Tags: current sensor, electricity bill, Energy Monitor, ESP32, Grafana, home assistant, home automation India, power monitoring, PZEM-004T, SCT013
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
PLC Programming for Beginners:...
blog plc programming for beginners ladder logic basics 599421
blog smart greenhouse ventilation fan control with co2 sensor 599434
Smart Greenhouse Ventilation: ...

Related posts

Svg%3E
Read more

MQTT for Home Automation: ESP32 + Mosquitto + Home Assistant

April 1, 2026 0
MQTT is the backbone protocol of professional home automation systems. If you are building a smart home with multiple ESP32... Continue reading
Svg%3E
Read more

Curtain and Blind Automation: Stepper Motor Controller

April 1, 2026 0
Curtain automation is one of the most satisfying smart home upgrades you can build. Imagine your curtains opening automatically at... Continue reading
Svg%3E
Read more

Smart Doorbell with Camera: ESP32-CAM Video Intercom

April 1, 2026 0
A smart doorbell with a camera lets you see who is at your door from your phone, even when you... Continue reading
Svg%3E
Read more

Blynk IoT Platform: Control Arduino and ESP32 from Mobile

April 1, 2026 0
The Blynk IoT platform is the fastest way to control your Arduino and ESP32 projects from your mobile phone. Instead... Continue reading
Svg%3E
Read more

PIR Sensor Automatic Light: Save Electricity with Motion Detection

April 1, 2026 0
PIR sensor automatic lights are the simplest and most effective way to save electricity in Indian homes. By automatically turning... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now