An ESP8266 Current Monitor Where the Web Graph Came Before the Measurement

ESP8266, current sensing, IoT

This is the read-only HTML version. For the full Visual Space experience, open the app.

ESP8266, PCB, current sensor —

ESP8266, PCB, current sensor —
ESP8266, PCB, current sensor —
ESP8266, PCB, current sensor —

Source: ESP8266 Current Monitor on Hackaday.io · Patrick McDonnell

Energy monitoring, sensor data

Patrick McDonnell’s 2015 build paired a clip-on current sensor and ATmega328P with Wi-Fi and a local dashboard. Getting readings onto a graph came quickly; turning the sensor signal into a trustworthy current measurement took more work.

Getting a sensor reading onto a web page is one milestone. Knowing what that reading means is another. Patrick McDonnell’s ESP8266 Current Monitor on Hackaday.io, started in January 2015 as a high-school science project, makes that distinction unusually clear: the network connection and dashboard were working while the current-measurement code was still taking shape.

The goal was straightforward—a small module that measures a circuit’s current and sends readings to a database for viewing in a browser. The inexpensive ESP8266 provided the incentive to turn McDonnell’s Arduino experiments into something he could use.

A sensor node, not a web server

The hardware split the work between an ATmega328P-PU, a clip-on current transformer and an ESP8266. The ATmega handled sensing, while the ESP8266 communicated with a separate web server using AT commands. It wasn’t hosting the dashboard itself.

That distinction matters because the website did more than show the latest number. In the January 21, 2015 webserver log, McDonnell described this path:

•
A timer on the monitor triggered an HTTP GET request through the ESP8266.
•
A PHP endpoint extracted the readings from the URL and inserted them into MySQL.
•
The website retrieved the previous two hours of data and plotted it, using Highcharts for the graph.

It’s a small, understandable IoT architecture: acquire a reading, transport it, store it and display it. Keeping those jobs separate also made it possible to build the dashboard before the sensing calculations were finished.

The custom PCB brought its own lesson. McDonnell reported reversing the voltage regulator footprint and destroying a regulator before spotting the mistake. He salvaged the board by mounting a replacement upside down with its leads bent to match the pads—a prototype repair, rather than a corrected board revision.

The graph was ahead of the sensor

The January 6 log already reported successful communication with the server and a working display. Sampling the fluctuating AC sensor signal was still on the to-do list.

A day later, McDonnell used a string of Christmas lights as a test load. In “Watts up”, he reported roughly 0.21–0.22 A and estimated about 25–26 W using 120 V. He described the basic sensing circuit as appearing to achieve approximately ±7% accuracy, but the comparison was against an online estimate of the lights’ wattage, not a documented reference-meter test.

That makes this an encouraging early check, not a calibration result. Current measurement and real-power measurement are different tasks: multiplying current by an assumed voltage doesn’t establish real power for every kind of load. Voltage, frequency and power-factor measurement appeared among the project’s planned additions, not its demonstrated capabilities.

The latest supplied development log, dated August 15, 2015, marks a meaningful step forward. McDonnell reported overhauling both device and website code, improving debugging and ESP8266 communication, and writing custom current-reading and calculation functions that he said tested well. The excerpt gives no new numerical accuracy results.

What remained to solve

Reporting cadence was still evolving. In July 2015, readings were being sent every 15 minutes on the device’s timer. McDonnell proposed replacing that with server requests roughly every ten seconds to support a more immediate view, but the supplied later update doesn’t confirm that change.

Scaling was similarly a goal rather than a completed feature. The overview described a dashboard for one module; in a March 2016 reply, McDonnell explained that additional sensors would require additional modules, with the aim of having several inexpensive nodes report to a central server.

Security was explicitly unfinished. The website was local, and sensor-to-server communication had no implemented protection against another machine on the network impersonating a node. A clip-on sensor also doesn’t make work inside a mains panel safe; this was an early prototype, not established equipment for operational electrical monitoring.

The useful lesson is in the gap between a working graph and a dependable instrument. This build had a clear route from sensor to browser, but the next convincing demonstration would pair readings with a reference meter across several loads—and test what happens when the network or power disappears. A dashboard can prove that data arrived; measurement validation has to prove that the data deserves trust.

Source: ESP8266 Current Monitor

Internet Of Things

2 Followers

Connect useful things with clear purpose. Explore sensors, embedded devices, networks and automation; share projects, troubleshoot integrations, and compare approaches to reliability, power use, security and maintaining connected systems.

Visual Space is built for projects like this—where creators collaborate, organize goals, and grow communities around real work.