ESP32-Based Energy Monitoring and Audit Dashboard for a Polytechnic Workshop answers a question every principal asks and nobody can answer: where does the electricity bill actually go? The project instrumented our own polytechnic workshop — lathe, drilling machine, welding bay and the general lighting circuit — with split-core CT clamps and a voltage sensor read by an ESP32, which computes true RMS voltage, current, real power and cumulative kWh per machine.
Each ESP32 posts its readings over the workshop's Wi-Fi to a small Python server (Flask) that stores them in SQLite. A pandas-based analysis layer and a Streamlit dashboard then turn the raw stream into the audit: load profiles per machine, consumption during off-hours (the wastage nobody sees), power-factor behaviour of induction motors, and cost estimates using the polytechnic's actual LT tariff per kWh from its electricity bill. The audit itself is written up in a Jupyter notebook, with Git tracking every change — exactly the AI&ML-pathway toolchain the C-20 curriculum teaches.
Safety and honesty are designed in: the CT clamps clip on outside the insulation and never break the circuit, the rig runs on low-voltage sensing electronics, and every measurement is calibrated and cross-checked against a plug-in energy meter. The result is an intermediate project with a real deliverable — a workshop energy audit with numbers a decision-maker can act on.
A polytechnic workshop's electricity use is visible only as one undifferentiated monthly bill. Nobody can say which machine consumed what, when consumption actually happens, or how much energy is wasted by equipment left on after hours. Without that breakdown, saving measures are guesses, and the college cannot teach energy auditing with real data from its own plant. The problem is the absence of affordable per-machine metering and analysis. What is needed is a low-cost monitoring system that measures each machine's voltage, current, real power and energy non-invasively, stores the readings centrally, and analyses them into a proper energy audit — load profiles, wastage quantification and cost attribution — using the Python data tools the curriculum already teaches.
Synopsis
Abstract
Polytechnic workshops run motors, welders and lighting for hours with no per-machine metering; the only feedback is one monthly bill for the whole campus. This project builds a distributed energy-monitoring system: ESP32 nodes with CT clamps measure per-machine consumption, a Python server stores the data, and a pandas-driven dashboard converts it into an actionable energy audit — load profiles, off-hours wastage, power-factor behaviour and cost breakdowns at the polytechnic's own tariff.
Introduction
Energy audits in India are formalised by the Bureau of Energy Efficiency, but a professional audit costs far more than a polytechnic can justify for one workshop. Yet the data needed for a basic audit — current and voltage over time — is measurable with a few hundred rupees of sensors and the microcontroller interfacing skills the C-20 curriculum teaches. Building the audit ourselves also makes it a genuine engineering exercise: sampling, RMS computation, calibration, data pipelines and analysis, each defensible in the viva.
Existing System
The workshop shares one campus meter; the bill arrives monthly with no machine-level or time-of-day breakdown.
Machines are switched off by habit, not by schedule, and nobody knows how much a lathe left idling or lamps left burning overnight actually costs.
Any checking is done occasionally with a clamp meter — a snapshot with no history.
Limitations: no per-machine kWh, no load profile, no quantified wastage, no data to prioritise saving measures.
Proposed System
Sensing: a split-core SCT-013 CT clamp per monitored circuit (never breaking the wire) and a ZMPT101B for the supply voltage, read by the ESP32's ADC.
Metering firmware: sample both channels at about 1 kHz, compute true RMS voltage, current, real power (instantaneous product method) and cumulative kWh; batch and post readings to the server every minute as JSON over HTTP.
Server: a Flask API that validates and stores readings in SQLite; a seed script generates demo data for offline demonstration.
Analysis: pandas and NumPy resample the stream into hourly/daily profiles; a Jupyter notebook computes machine-wise costs at the polytechnic's tariff, off-hours consumption, and the top savers list.
Dashboard: a Streamlit app showing live power, machine-wise kWh, load profiles and the audit summary, with CSV export.
Calibration: every channel is cross-checked against a plug-in energy meter across resistive and motor loads, and the errors are recorded.
Feasibility Study
Technical: the measurement chain uses skills from the C-20 pathway — Python for the server and analysis, Jupyter and Git for the audit workflow — plus straightforward ESP32 interfacing; all software is free and runs on the lab PC.
Economic: about ₹2,000–₹2,500 of hardware (often less if the department owns a reference meter), no recurring cost, and realistic saving potential: even 1 kWh/day of identified wastage is over ₹2,000 a year at typical LT tariffs.
Operational: clamps install in minutes without an electrician, the dashboard runs in a browser, and the audit notebook regenerates itself whenever new data arrives.
Objectives
01Build a non-invasive measurement chain — SCT-013 CT clamp and ZMPT101B voltage sensor on the ESP32 — that computes true RMS voltage, current, real power and cumulative kWh per machine.
02Calibrate each measurement channel against a plug-in energy meter across a resistive load and an induction-motor load, and record the error for every channel.
03Implement ESP32 firmware that samples both channels at about 1 kHz, batches readings, and posts them as JSON to the server every minute over the workshop Wi-Fi.
04Design a Flask API with input validation that stores machine readings in an SQLite database, with a seed script for demonstration data.
05Use pandas and NumPy in a Jupyter notebook to build hourly and daily load profiles, compute machine-wise cost at the polytechnic's LT tariff, and quantify off-hours wastage.
06Build a Streamlit dashboard showing live power, machine-wise kWh, load profiles and the audit summary, with CSV export for records.
07Manage the whole project with Git (meaningful commits per member) and test the analysis functions with pytest.
08Produce a written energy-audit summary for the workshop with three prioritised, costed recommendations based on the measured data.
Scope
In scope
One workshop with up to four monitored circuits (lathe, drilling machine, welding bay, lighting), one ESP32 node with two CT channels in the base build and a second node optional.
Continuous monitoring during working hours, a server and dashboard on the lab PC, calibration records, and a written audit with tariff-based costs.
Demo mode: a seed script generates a realistic month of data so the system can be demonstrated anywhere without the workshop.
Out of scope (v1)
No control or automatic switching of machines — the project measures and advises; it does not actuate.
No three-phase motor metering (welding bay is monitored as a single-phase approximation; three-phase metering is future work).
No cloud deployment or mobile app; the server runs on the department PC. No billing-grade accuracy claim — the system is an audit instrument, calibrated against but not replacing the utility meter.
Methodology
The project follows an iterative model across the 16-week C-20 slot, with each increment ending in something demonstrable and every review backed by the weekly diary.
Phase
Weeks
Activities
Deliverable
Study & audit design
1–2
Walk-through of the workshop, list circuits, study the electricity bill and tariff, fix measurement points
Audit plan + requirement list
Sensing chain
3–4
Burden-resistor sizing for the CT, bias network for the ADC, breadboard the chain, verify on a test load
Working sensor chain on bench
Firmware increment 1
5–6
1 kHz sampling, RMS and real-power computation, local LCD/serial output
Metering node computing power
Calibration
7
Cross-check every channel against the plug-in reference meter on resistive and motor loads; record errors
Calibration table
Server increment
8–9
Flask API, SQLite schema, JSON ingestion with validation, seed script
Streamlit app: live view, profiles, summary, CSV export
Dashboard v1
Testing & audit write-up
13–14
pytest on analysis functions, two-week live data collection, audit summary and recommendations
Test report + audit draft
Documentation & rehearsal
15–16
Final report, PPT, demo dry run, individual-contribution matrix
Submission set
Testing approach: unit tests (pytest) cover the pure functions — RMS and power computation vectors, tariff calculations, off-hours classification — while the firmware is verified against reference loads and the plug-in meter (expected vs measured, recorded as error percentages). The full pipeline is tested end-to-end with the seed data before live deployment, and every module carries the name of the member who built it for individual accountability.
SCT-013 current transformer + ZMPT101B voltage sensor
pandas
NumPy
SQLite
Flask (industry-standard extra)
Streamlit dashboard (industry-standard extra)
Matplotlib
Jupyter Notebook
Git
pytest
The system has three tiers: measurement nodes, a server pipeline and an analysis/dashboard layer, connected over the workshop Wi-Fi.
flowchart LR
M1["Lathe (CT 1)"] --> S["ESP32 node: 1 kHz sampling"]
M2["Drilling machine (CT 2)"] --> S
V["ZMPT101B voltage tap"] --> S
S -->|"RMS, real power, kWh"| W["Wi-Fi JSON POST every 60 s"]
W --> API["Flask API with validation"]
API --> DB[("SQLite readings DB")]
NB["Jupyter + pandas + NumPy"] -->|"reads"| DB
NB --> AUD["Audit: profiles, costs, wastage"]
D["Streamlit dashboard"] -->|"reads"| DB
D --> CSV["CSV export"]
Measurement node. Each CT clamp feeds a burden resistor; a bias network lifts the signal to mid-rail so the ESP32's ADC sees the full AC waveform. Firmware samples voltage and current together at about 1 kHz, multiplies the instantaneous pairs and averages to get real power, and derives Vrms, Irms and power factor — the same mathematics a commercial meter performs, done openly so we can defend every step.
Server. The Flask API validates each JSON payload (machine id, timestamp, Vrms, Irms, watts, kWh, pf), rejects malformed rows, and appends to SQLite. The schema is deliberately small:
erDiagram
MACHINE ||--o{ READING : logs
MACHINE {
int id PK
string name
string circuit
real tariff_per_kwh
}
READING {
int id PK
int machine_id FK
datetime ts
real vrms
real irms
real watts
real kwh_cumulative
real pf
}
Analysis and dashboard. pandas resamples readings into hourly and daily frames; the audit notebook computes machine-wise kWh and rupees, flags off-hours consumption, and plots load profiles with Matplotlib. Streamlit serves the same frames live. Everything — firmware configs, server, notebook — lives in one Git repository with each member committing their own modules, and pytest guards the arithmetic: the RMS and cost functions are tested against hand-calculated vectors before any real data is trusted.
Modules
6 modules
Module 01
Measurement & Calibration Hardware (Member 1)
Member 1 sizes the CT burden resistors and ADC bias network, builds and housings the sensor chains, wires the ZMPT101B safely at the distribution board with guide supervision, and runs the full calibration campaign against the plug-in reference meter — resistive heater first, then the lathe and drill motors — recording every channel's error.
Module 02
Metering Firmware (Member 2)
Member 2 writes the ESP32 firmware in the Arduino framework: the 1 kHz paired sampling loop, RMS and real-power computation, cumulative kWh accounting, Wi-Fi reconnect logic, and the JSON POST of batched readings every sixty seconds, with a serial debug mode for bench testing without the network.
Module 03
Server & Data Pipeline (Member 3)
Member 3 builds the Flask API with schema validation, the SQLite storage layer and the seed script that generates a realistic month of demo data; writes the pytest suite for ingestion; and maintains the Git repository — branching, reviewing and merging the other members' commits.
Module 04
Audit Analysis Notebook
Jointly owned by Members 2 and 3: the Jupyter notebook that loads readings with pandas, resamples to hourly/daily profiles, computes machine-wise kWh and rupees at the polytechnic's tariff, classifies off-hours consumption, and produces the plots and the three costed recommendations that form the audit summary.
Module 05
Streamlit Dashboard
The browser dashboard with live power per machine, daily kWh bars, the load-profile chart, off-hours wastage figures and CSV export; built by Member 3 on the shared analysis functions so the dashboard and the notebook can never disagree about the numbers.
Module 06
Deployment, Safety & Documentation
The whole team mounts the nodes in enclosures at the workshop board (clamp-on only, no circuit breaking), labels the CT channels, collects two weeks of live data, and assembles the report — with the individual-contribution matrix mapping every module, test and commit to its member as C-20 requires.
Slides
12 slides · titles free · bullets, notes and the .pptx unlock
Slide 1
Workshop Energy Monitoring & Audit Dashboard
Slide 2
Introduction
Slide 3
Problem Statement
Slide 4
Existing vs Proposed System
Slide 5
Objectives
Slide 6
System Architecture
Slide 7
Metering Mathematics
Slide 8
Calibration
Slide 9
Data Pipeline & Dashboard
Slide 10
The Energy Audit — Results
Slide 11
Testing & Cost Estimate
Slide 12
Conclusion & Future Scope
Bullets, speaker notes and the .pptx · ₹2,000
The titles above are the real outline. The rest is what you present from.
Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.
01Concept
How do you compute true RMS voltage and real power in the firmware, and why is that better than multiplying average readings?
The firmware samples voltage and current together at about one kilohertz. RMS is the square root of the mean of the squared samples, and real power is the mean of the instantaneous product of voltage and current — which automatically accounts for phase differences. Multiplying averaged readings would give only apparent power and get induction motors badly wrong, because their current is not in phase with the voltage.
02Concept
Why use a CT clamp instead of measuring current with a shunt resistor in series?
A CT clamp is non-invasive: it clips around the insulated conductor, so the mains circuit is never opened and the measurement side is electrically isolated from the 230-volt wiring. A shunt would put our electronics directly in the live path, needing isolation and approvals no diploma rig should touch. The clamp also moves from machine to machine easily, which is exactly what an audit needs.
03Concept
What is the difference between kW and kWh, and where does each appear in your system?
Kilowatts is power — the rate of consumption at this instant — and kilowatt-hours is energy, the integral of power over time, which is what the bill charges for. In our system watts is computed every sampling window and shown live on the dashboard, while kWh is accumulated in the node and stored with every reading so the notebook can integrate and attribute cost per machine per day.
+12 more questions, with answers
Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.
Cylinder and toggle sizing from bending and shear forces, two-hand safety control, shop-floor build and a stopwatch comparison with hammer-and-drill work.
CAD drawings (2D AutoCAD / 3D modelling) and ISO 1219 pneumatic circuit symbols
Double-acting cylinder, 5/2 valves, FRL unit, flow-control valves