Skip to content
OnlyProjects
Diploma (Polytechnic) · Electrical & ElectronicsFor educational purposes only
Code included

ESP32-Based Energy Monitoring and Audit Dashboard for a Polytechnic Workshop (Python + pandas)

Per-machine kWh from CT clamps, logged to a Python server and turned into an energy-audit dashboard with pandas

Mapped to your syllabusDTE Karnataka C-20 · 20CS61P Internship / Project · Semester 6

Overview

1 min read

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.

Relevant for
Karnataka
Level
Intermediate · 16 weeks · team of 3
Common at
DTE Karnataka, MSBTE, GTU (Diploma)
Updated
Nov 2026

Syllabus alignment

DTE Karnataka · C-20

20CS61P · Internship / Project · Semester 6 · 16 credits · CIE 240 + SEE 160

Subjects this project applies
  • Python (AI&ML pathway language)
  • NumPy / pandas data analysis (20CS51I pathway tools)
  • Jupyter Notebook and Git version control (20CS51I pathway tools)
  • Microcontroller interfacing and measurement (20CS61P project work)
How it is evaluated

Team: 2–3 with individual accountability; cohort ≤ 20

Also fits: MSBTE K-scheme (I-scheme legacy), GTU (Diploma) Diploma (2023 codes).

What's in the box

11 parts · 5 free · 2 previewed · 4 unlock for ₹2,000

Problem & synopsis

5 min read

Problem statement

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

  1. 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.
  2. 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.
  3. 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.
  4. 04Design a Flask API with input validation that stores machine readings in an SQLite database, with a seed script for demonstration data.
  5. 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.
  6. 06Build a Streamlit dashboard showing live power, machine-wise kWh, load profiles and the audit summary, with CSV export for records.
  7. 07Manage the whole project with Git (meaningful commits per member) and test the analysis functions with pytest.
  8. 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.

PhaseWeeksActivitiesDeliverable
Study & audit design1–2Walk-through of the workshop, list circuits, study the electricity bill and tariff, fix measurement pointsAudit plan + requirement list
Sensing chain3–4Burden-resistor sizing for the CT, bias network for the ADC, breadboard the chain, verify on a test loadWorking sensor chain on bench
Firmware increment 15–61 kHz sampling, RMS and real-power computation, local LCD/serial outputMetering node computing power
Calibration7Cross-check every channel against the plug-in reference meter on resistive and motor loads; record errorsCalibration table
Server increment8–9Flask API, SQLite schema, JSON ingestion with validation, seed scriptWorking data pipeline
Analysis increment10–11pandas/NumPy profiling, tariff cost model, off-hours analysis, Jupyter audit notebookAudit notebook v1
Dashboard increment12Streamlit app: live view, profiles, summary, CSV exportDashboard v1
Testing & audit write-up13–14pytest on analysis functions, two-week live data collection, audit summary and recommendationsTest report + audit draft
Documentation & rehearsal15–16Final report, PPT, demo dry run, individual-contribution matrixSubmission 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.

Architecture & tech stack

2 diagrams · 12 technologies · 1 min read

  • Python 3
  • ESP32 (Arduino framework, industry-standard extra)
  • 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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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

  1. Slide 1

    Workshop Energy Monitoring & Audit Dashboard

  2. Slide 2

    Introduction

  3. Slide 3

    Problem Statement

  4. Slide 4

    Existing vs Proposed System

  5. Slide 5

    Objectives

  6. Slide 6

    System Architecture

  7. Slide 7

    Metering Mathematics

  8. Slide 8

    Calibration

  9. Slide 9

    Data Pipeline & Dashboard

  10. Slide 10

    The Energy Audit — Results

  11. Slide 11

    Testing & Cost Estimate

  12. 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.

Unlock for ₹2,000

Viva questions & answers

3 of 15 answered free · 12 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 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.

  2. 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.

  3. 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”.

Source code & how to run

7 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

7 steps · source code zip

Prerequisites, install, seed data and tests, written for demo day. Plus the complete source.

Unlock for ₹2,000

READMEFIRST

277 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

277 words · ~1 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

410 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

410 words · ~2 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

8 sources

  1. Bureau of Energy Efficiency (BEE), Ministry of Power, Government of India — energy audit framework and guides
  2. Espressif ESP32 Series Datasheet
  3. ESP-IDF Programming Guide (ESP32)
  4. pandas Documentation
  5. NumPy Documentation
  6. SQLite Documentation
  7. Streamlit Documentation (industry-standard dashboard tool)
  8. W. R. Murphy and G. McKay, Energy Management, Butterworth-Heinemann

Cite this bundle

OnlyProjects. (2026). ESP32-Based Energy Monitoring and Audit Dashboard for a Polytechnic Workshop (Python + pandas): Diploma (Polytechnic) Electrical & Electronics project bundle [Educational resource]. https://onlyprojects.online/projects/diploma-eee-workshop-energy-monitor-audit-dashboard

Future scope

1 min read

  • Three-phase metering for heavier machines using a dedicated energy-metering IC, opening up the compressor and the main panel.
  • Control pilot: a relay node that can switch the lighting circuit on a schedule, turning the audit's findings into automatic savings.
  • MQTT and a lightweight broker instead of HTTP POST, with retained messages for resilience.
  • A cloud or college-server deployment with a month-on-month savings tracker and email summaries to the HOD.
  • Anomaly detection on the load profiles — a motor drawing more current than its own history is a maintenance warning.
  • Extension to the whole building with multiple nodes and a floor-plan heatmap of consumption.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.

Diploma (Polytechnic)

Mechanical Engineering

Pneumatic Bending-cum-Punching Fixture with Toggle Booster for a Rajkot Grill Fabrication Shop, with Cycle-Time Study

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
  • Two-hand control valve arrangement for punching
  • +3

intermediate14 wk4 students