← Projects
electronics intermediate Aug 14, 2026 ◑ 7 views ◯ 5 min read

Build a Home Energy Monitor with ESP32 and CT Clamps: Whole-House Power Tracking in Home Assistant

Build time: 4-6 hours
Tools needed: Soldering iron, wire strippers, small screwdriver set, multimeter, hot glue gun or 3D-printed enclosure, drill (for enclosure mounting)
Parts List
esp32energy monitoringct clampcurrent transformerpower monitoringhome assistantesphomeesp32-s3non-invasivemqtt

A plug-in smart meter tells you what one outlet is drawing. It doesn't tell you what your whole panel is doing, which circuit your 3D printer farm is really costing you, or when your CNC router's spindle kicks a starting-current spike. Split-core current transformer (CT) clamps solve that without touching a single wire nut — they clip around an existing conductor and induce a proportional current on their own secondary winding, so you can measure whole-circuit or whole-panel power non-invasively. This project builds a multi-channel energy monitor around an ESP32 that reports live power, daily energy, and per-circuit breakdowns into Home Assistant.

How CT Clamps Actually Work

A CT clamp is a current transformer: the wire you clamp it around is the primary (a single-turn winding), and the clamp's internal coil is the secondary. A common 30A/1V or 100A/50mA clamp (SCT-013 series) produces a small AC signal proportional to the current flowing through the clamped conductor, which you rectify, scale, and read on the ESP32's ADC. Because it only measures current, not voltage, true wattage calculation needs either an assumed nominal voltage (fine for rough monitoring) or an actual voltage reference from a small AC-AC adapter sampled in parallel, which is what lets you calculate real power and power factor instead of just apparent current draw.

Safety First — This Involves Your Panel

Clamping a CT around an insulated conductor is non-invasive and doesn't require breaking the circuit, but you are still working inside or immediately next to a live electrical panel to get the clamp positioned. If you are not confident identifying individual circuit conductors in your panel and working safely around exposed bus bars, hire an electrician for the clamp installation step and do the electronics build yourself — the CT clamps themselves ship with the split core open specifically so they don't need to be threaded onto a wire, but you still need panel access to get them there.

Parts List

Wiring the Analog Front End

Each CT clamp's output is a small AC voltage centered on zero, which the ESP32's single-supply ADC can't read directly — you need to bias it up to sit within the 0-3.3V ADC range using a voltage divider off the 3.3V rail, typically two 10k resistors forming a mid-supply reference that the CT signal rides on top of. Feed each biased channel into an ADS1115 input rather than the ESP32's native ADC: the built-in ADC is noticeably noisy and non-linear at low signal levels, which matters a lot when you're trying to resolve a few watts of standby draw versus a running compressor.

ComponentConnects To CT clamp secondaryBurden resistor + bias divider → ADS1115 input channel AC-AC voltage referenceSeparate divider → dedicated ADS1115 channel, used for phase/voltage sampling ADS1115 SDA/SCLESP32 I2C pins (see our I2C wiring guide for pull-up requirements)

Firmware: EmonLib and ESPHome

You have two reasonable software paths. The fast path is ESPHome's built-in ct_clamp and adc sensor platforms, which handle RMS current sampling and calibration in YAML with no code, and report straight into Home Assistant over the API — this is the right choice if you just want per-circuit current and don't need true power factor correction. The more capable path is the OpenEnergyMonitor EmonLib library ported to ESP32/Arduino, which does proper real-power calculation by sampling both current and voltage in phase and multiplying instantaneous samples, giving you accurate watts and power factor rather than just apparent current × assumed voltage.

Calibration

Whichever path you choose, calibrate against a known load before trusting the numbers: plug a device with a known, stated wattage (a space heater rated for exactly 1500W is a convenient reference) into the circuit you've clamped, and adjust your calibration constant until the reported value matches. Do this per channel — CT clamps have real unit-to-unit variance, and a single global calibration constant across all channels will leave some circuits reading consistently high or low.

Getting It Into Home Assistant

Both ESPHome and raw-MQTT approaches integrate cleanly. With ESPHome, sensors show up automatically once the device is added through the ESPHome integration. With a custom Arduino/EmonLib firmware, publish readings over MQTT (see our MQTT and Node-RED on Raspberry Pi guide) and pick them up with the MQTT integration. Either way, add the resulting sensors to an Energy dashboard in Home Assistant to get long-term, per-circuit history and cost tracking rather than just a live number.

The finished box mounts near your panel, on a DIN rail if your panel has room or in a small project enclosure fastened nearby, with the CT leads routed to their clamped conductors and a single USB cable for power. It's a project that pays for itself in visibility rather than dollars — once you can see that a "vampire load" circuit is pulling 400W around the clock, or that your laser cutter's air assist compressor is a bigger draw than the laser itself, you tend to actually do something about it.