cd /news/ai-infrastructure/the-sub-3-power-meter-measuring-edge… · home topics ai-infrastructure article
[ARTICLE · art-77884] src=pub.towardsai.net ↗ pub= topic=ai-infrastructure verified=true sentiment=· neutral

The Sub-$3 Power Meter: Measuring Edge AI Energy Consumption Without an SMU

A $3 open-source power meter built from an ESP32-C3 and INA226 sensor measures edge AI energy consumption at 850 samples per second, enough to compute energy-per-inference for model-level comparisons. Created by former Espressif employee Coben Gao, the instrument streams data over Wi-Fi and integrates with a remote benchmarking pipeline, with firmware and scripts released under the MIT License on GitHub.

read5 min views1 publishedJul 29, 2026

Every edge-AI team asks the same question sooner or later: does a given optimization — INT8 quantization, pruning, moving a layer from CPU to NPU — actually save power on the real device? A datasheet number cannot answer that. Only a measurement can. And that is usually where the plan stalls, because the standard answer is “buy a power analyzer,” and those tools start in the thousands of dollars.

This article describes a small, open-source instrument that answers the same question for about $3 in parts. It also plugs directly into a remote benchmarking pipeline I described in an earlier article, so the whole loop — from a GPU server, to a local device, to a power trace — can run as one command. All firmware and scripts are open-sourced at github.com/CobenGao/esp32_power_mon under the MIT License.

Before building anything, it is worth looking at what the industry already uses, because most edge-AI engineers have at least heard these names:

These are strong instruments, built to answer a different question than the one I had. I did not need to catch a microsecond-scale current spike inside a chip. I needed something much coarser and much more common: how many millijoules does one inference cost, end to end, on CPU versus NPU, at INT8 versus FP16? For that kind of model-level comparison, megahertz-class sampling is unnecessary, and the price that comes with it is money better spent on GPU time.

(One small disclosure, said with a smile: Espressif — the company behind the ESP32 family this project is built on — is my former employer. I have no current affiliation with them; I simply still like the chip.)

The sensing hardware is deliberately minimal, just two parts:

The INA226 measures current and bus voltage; the ESP32-C3 reads it over I2C, timestamps each sample, and streams the data out over Wi-Fi. That is the entire measurement front end, for well under $3.

Figure 1 shows the wiring. The colored leads carry I2C (SDA, SCL) and power (VCC, GND, 3.3V) between the ESP32-C3 header and the INA226 board. The device being measured is wired in series across the INA226's IN+ and IN- terminals, so all of its current passes through the sense resistor.

Figure 2 shows the same setup assembled for bench use: a USB-C cable powers the ESP32-C3, and the INA226 sits in line with whatever load is being measured.

I2C is the honest limit of this design. Reading the INA226 over I2C, driven by its conversion-ready interrupt, gives a sustained rate of about 850 samples per second — roughly one sample every 1.2 ms. That is far below the megahertz-class instruments listed above, and this tool is not meant to catch a nanosecond-scale glitch on a power rail.

For the actual question here, that rate is enough. A typical on-device inference — including pre- and post-processing — runs 50 to 500 ms. At 850 Sa/s, that window still contains dozens to hundreds of samples, which is plenty for a trapezoidal energy integral (E = ∫P dt) to converge on a stable, repeatable energy-per-inference number. The design trades sampling headroom that this task does not need for a cost that a hobbyist or small team can actually afford. Figure 3 shows a real trace captured with this setup: voltage, current, and power over about ten seconds, with a clear step change partway through — the kind of state transition, such as idle to active inference, that this method is built to catch and integrate over.

The system has three stages, and they follow the same remote/local/edge split I described in an earlier article, Seamless Remote-to-Edge AI Benchmarking:

Because the PC relay only needs a simple HTTP connection, the same reverse-tunnel pattern from the earlier article applies here without any change: the analysis server never needs a direct network route to wherever the ESP32-C3 physically sits.

This is not a replacement for a Joulescope if the job is debugging microsecond-scale power-rail transients inside a chip. It is built for a narrower, more common situation: a developer or a small team who wants a real, repeatable answer to “did this change actually help,” without a purchase order or a four-figure budget line. At about $3 in parts and an afternoon of wiring, the cost of simply measuring — instead of guessing from a datasheet — mostly disappears.

All figures in this article (Figures 1–3) were created by the author specifically for this piece, from the author’s own hardware and software. No third-party photographs, charts, or datasets were used. Figure 3 was generated by the author’s own analysis script from data captured by the author; it illustrates one test run and is not a vendor-published benchmark or third-party dataset.

Third-party instruments named in this article — Otii Arc / Arc Pro, HVPM, and Joulescope JS220 — are products of their respective manufacturers (Qoitech, Monsoon Instruments, and Jetperch). Pricing figures are the author’s own market estimates as of mid-2026, offered for general comparison only and not as an official quote from any manufacturer.

All source code referenced in this article is available under the MIT License at the linked GitHub repository; readers are welcome to reuse it under the terms of that license. No real hostnames, IP addresses, or credentials appear anywhere in this article or the linked repository.

If you found this article helpful, feel free to connect with me on LinkedIn:https://www.linkedin.com/in/cobengao

The Sub-$3 Power Meter: Measuring Edge AI Energy Consumption Without an SMU was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

── more in #ai-infrastructure 4 stories · sorted by recency
── more on @espressif 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-sub-3-power-mete…] indexed:0 read:5min 2026-07-29 ·