Plug-and-play ESP8266 sensor nodes map ambient decibel levels across any shared space — library, office, campus — and stream it to a live dashboard you can read at a glance.
Live-simulated spectrum — real hardware samples at 1 Hz
Sensors discover the backend by IP. The backend discovers sensors by MAC. The dashboard discovers everything automatically.
An ESP8266 node reads its KY-038 microphone 60 times per minute, applies a regression calibration to convert raw ADC counts to decibels, then averages the batch into one clean reading.
The node POSTs { mac, data } to POST /iot/receive. The Express API looks up the registered sensor by MAC and writes the reading to MySQL with a timestamp.
The React dashboard fetches all sensor histories from GET /client/data and renders each location as a colour-coded bar chart — quiet is calm, loud is loud.
Built specifically for the "plug it into a wall and forget about it" deployment model.
Each node runs on a standard USB power adapter. No batteries to change, no cables to route. Stick it on a bookshelf and leave.
Name each sensor after its physical location — "Reading Room," "Café Corner," "Study Hall 2B" — and the dashboard maps noise level to place.
Every reading is timestamped and stored indefinitely. View the full noise history of any location — peak hours, quiet windows, recurring patterns.
A linear regression formula converts the cheap KY-038 microphone's raw ADC output into accurate decibel readings — close enough for environmental monitoring.
The admin REST endpoints let you rename sensors, update their location photos, and toggle them active or inactive — no database client needed.
Database credentials and server port live in a .env file, never in source control. A checked-in .env.example documents every variable.
The dashboard flags any reading above 120 dB. Here's the full scale DeciWatcher was built around.
The KY-038 condenser microphone outputs a raw 10-bit ADC value (0–1023) that scales non-linearly with sound pressure. A linear regression was performed by recording the sensor's output against known reference levels from a calibrated sound level meter across a range of environments.
The two constants — 83.2073 (intercept shift) and 11.003 (scale factor) — are the regression coefficients. The resulting readings sit within ±2 dB of a reference meter for the 40–90 dB range that matters for workspace monitoring. Methodology adapted from Raj, A. (2018), Circuit Digest.
Each reported reading is the average of 60 samples taken one second apart, smoothing out transient spikes (a dropped book, a laugh) so the dashboard reflects sustained ambient noise rather than momentary peaks.
Each node costs roughly $4 in components and draws less power than a phone charger.
The main microcontroller. Handles WiFi, HTTP POST to the backend, and runs the sampling loop. Flashed via Arduino IDE over USB.
Analog output connected to the A0 pin. Sensitivity is fixed at the hardware level — calibrated via regression in firmware.
Any standard phone charger works. The NodeMCU draws ~80 mA at idle. No batteries, no interruptions — plug it in and forget it.
No exotic dependencies. If you've run a Node app before, you can deploy this in under five minutes.
Clone the repo, flash a sensor, run the stack. The whole thing takes about 20 minutes end-to-end.