← Projects
electronics intermediate 10 hr ago ◯ 6 min read

Build a DIY Noise Dosimeter with ESP32: Tracking Daily Shop Noise Exposure Against OSHA Limits

Build time: One weekend for assembly and firmware, plus a separate calibration session against a reference meter
Tools needed: Soldering iron, wire strippers, access to a calibrated reference sound level meter for calibration, computer for flashing ESP32 firmware
Parts List
esp32noise dosimeterhearing protectionsound leveloshashop safety

This site's existing hearing protection coverage will tell you that a CNC router, a shop vac, and a planer can all run loud enough to cause hearing damage, and it'll tell you which earmuffs and plugs actually work. What it won't tell you is how close you personally are, on any given day, to the exposure limits those numbers are based on — because noise damage isn't about the peak loudness of one cut, it's about cumulative dose over the workday. A noise dosimeter tracks exactly that: not just "how loud is it right now" but "how much of today's safe noise budget have I already spent." This project builds one from an ESP32 and a calibrated sound level sensor for a fraction of the cost of a commercial dosimeter, and while it won't carry an OSHA-certified calibration, it gives you a genuinely useful running number instead of a guess.

Why Dose, Not Just Decibels, Is the Number That Matters

OSHA's permissible exposure limit is 90 dBA averaged over an 8-hour workday (NIOSH's recommended limit is stricter, at 85 dBA), but the relationship between loudness and allowable time isn't linear — it follows an exchange rate, typically 5 dB per halving/doubling of allowable time under OSHA's rules. That means 95 dBA (a router running without a dust shoe, measured close) only gives you 4 safe hours instead of 8, and 100 dBA (many CNC routers and planers measured at typical operator distance) cuts that to 2 hours. A single loud cut isn't the danger; a full day of moderate-to-loud machine noise that silently eats your exposure budget one hour at a time is. A simple SPL meter app tells you the instantaneous number; a dosimeter integrates that number over time and tells you the thing that actually determines hearing damage risk: your accumulated percentage of today's allowed dose.

How the Math Works

A dosimeter computes dose as a running percentage using the formula D = 100 × Σ(Cn/Tn), where Cn is the time spent at a given noise level and Tn is the OSHA-permitted total exposure time at that level. In practice, this project's firmware samples sound pressure level continuously, buckets each sample into its corresponding allowed-exposure-time bracket, accumulates time spent in each bracket, and reports a running percentage of the day's 100% dose threshold. Hitting 100% means you've used your full OSHA-permissible exposure for the day; this project reports the number, it doesn't replace actual hearing protection or professional industrial hygiene monitoring, and a 100% reading is a signal to put in hearing protection and/or leave the noise source, not a hard legal compliance measurement.

ComponentRole ESP32 DevKitCSampling, dose calculation, logging, and display/alert logic I2S MEMS microphone (INMP441)Captures audio for SPL calculation; digital output avoids analog noise pickup 0.96" OLED displayShows current dBA reading and running daily dose percentage Buzzer or vibration motorAlerts when dose crosses configurable warning thresholds (e.g. 50%, 100%) LiPo battery + charge moduleMakes the unit wearable/portable rather than tethered to a wall outlet

Parts List

Calibration: The Step You Cannot Skip

An I2S microphone's raw digital output is not a calibrated SPL reading out of the box — every individual microphone unit has some sensitivity variance, and converting a digital amplitude value into an accurate dBA figure requires a reference calibration point. Borrow, rent, or buy a calibrated reference sound level meter, play a steady, stable noise source (a function generator driving a speaker at a fixed, known frequency and level works well, or a commercial acoustic calibrator if you have access to one) at two or three different known SPL levels, and record what your ESP32's raw RMS amplitude reads at each. Fit a simple linear or logarithmic correction curve between your device's raw readings and the reference meter's known-correct dBA values, and bake that correction into your firmware. Skip this step and your dosimeter will track trends consistently but the absolute dBA numbers — and therefore the dose calculation, which depends directly on those numbers — will be wrong by an unknown amount, which defeats the purpose of building a dose tracker in the first place.

Firmware Logic

Sample the microphone continuously and compute a short-window (one-second is standard practice) A-weighted RMS sound level, applying an A-weighting digital filter to approximate how human hearing perceives loudness across frequencies rather than using a flat, unweighted measurement. Convert each one-second A-weighted RMS value to dBA using your calibration curve, then feed that dBA value into the dose accumulator: look up the OSHA-permitted total exposure time for that dBA bracket (90 dBA = 8 hours, 95 dBA = 4 hours, 100 dBA = 2 hours, and so on down the 5 dB exchange rate table), and add this sample's time fraction to a running total for that bracket. Sum the fractional contributions across all brackets to get the current dose percentage, reset the accumulator at a configured time each day (midnight, or the start of your typical shop session), and log both the running dose and periodic dBA snapshots to the ESP32's flash or over WiFi to a server if you want historical data rather than just a live number.

Alerts and Display

Show the current instantaneous dBA reading and the running dose percentage simultaneously on the OLED — the instantaneous number tells you what's happening right now, the dose percentage tells you how much budget is left. Trigger a buzzer or vibration alert at a low threshold (50% dose) as an early warning and a more insistent alert at 100%, and consider a visually distinct display state (inverted colors, flashing) above 100% so an at-a-glance check from across the shop is unambiguous even without reading exact numbers.

Limitations and Honest Expectations

This project will not produce an instrument that meets ANSI S1.4 or IEC 61252 dosimeter accuracy standards, and it should not be used as the sole basis for workplace compliance documentation in a professional or regulated setting — commercial certified dosimeters exist for exactly that reason and go through calibration and certification processes this build doesn't attempt. What it's genuinely good for is personal awareness in a home or hobby shop: a running sense of how much noise exposure a day of machining, routing, or planing is actually costing you, measured instead of guessed, which is a meaningfully better starting point than relying on "it didn't feel that loud" to decide whether you needed hearing protection today.