Resonator_Entropy: Dragging Noise Out of the ESP32
The second law of thermodynamics guarantees disorder. I just wanted a way to watch it happen in real time.

Aeon Flex is the writer behind Chaincoder, a blog about automation, infrastructure, and the quiet failures hiding inside modern systems. Their work focuses on how scripts reproduce bias, how abstraction erodes accountability, and why tools tend to drift toward control when nobody is watching. Chaincoder sits somewhere between technical analysis and cultural critique, written by someone who has spent too much time reading logs, reverse engineering workflows, and distrusting anything that claims to be clean, neutral, or finished.

Every microcontroller hums. Beneath compiled code and polished WiFi libraries, beneath the sanitized abstractions we call "digital," there's jitter. Drift. The low growl of entropy that deterministic systems pretend doesn't exist.
Most engineers ignore it. Sand it down. Filter it out.
I wanted to listen.
That itch became Resonator_Entropy: an ESP32-based device that samples raw analog chaos and serves it back in real time through a glitch-inflected web dashboard. Part entropy generator, part anomaly detector, part art installation for invisible forces.
Why Noise Matters
Randomness is not decoration. It's the skeleton key of cryptography, the foundation of Monte Carlo simulation, the thing slot machines pantomime and three-letter agencies quietly harvest. When a machine's randomness becomes predictable, the entire system rots from the center out.
So where do you find true randomness in a deterministic circuit?
You don't find it. You steal it—from the physical world. From thermal noise at the transistor level, electrical jitter in analog-to-digital conversion, the quantum foam beneath clock cycles. Resonator_Entropy puts the ESP32's ear to the wall and listens to that hidden static.
The second law of thermodynamics guarantees disorder. I just wanted a way to watch it happen in real time.
Architecture: What It Does
1. Analog Noise Harvesting
The ESP32's ADC pins (GPIO 36, 39) will never give you the same reading twice. Not because they're broken—because the universe refuses to repeat itself. Thermal drift in the silicon, electromagnetic interference from your phone scanning for networks, even cosmic ray strikes at high enough altitude. These pins wobble because reality is fundamentally noisy.
Resonator_Entropy samples them continuously as a raw entropy pool, capturing the 12-bit jitter that most firmware treats as measurement error.
2. Entropy Fusion
Raw ADC readings get XOR'd with high-resolution timing offsets from esp_timer_get_time(). Clock jitter—measured in microseconds—becomes signal. The timing between samples varies by nanoseconds depending on interrupt latency, WiFi radio activity, even CPU temperature.
Time itself, unstable and granular, layers into the noise.
3. Circular Buffer + Temporal Memory
Entropy doesn't vanish. It accumulates in a circular buffer (configurable, typically 256-512 samples) that feeds a live-updating graph on the web dashboard. Recent history informs anomaly detection: sudden deviation from the rolling mean triggers visual alerts.
The buffer loops. Data ages out. But patterns—if they exist—become visible before they dissolve.
4. Web Interface: Pocket Oscilloscope for Chaos
Connect from any device on the local network. The dashboard renders as a single-page application: HTML/CSS/JavaScript served directly from ESP32 PROGMEM (no external CDN, no HTTP library bloat). It feels like a pocket oscilloscope tuned to the invisible.
The graph updates at 10-30 Hz depending on sample rate. Sharp spikes appear when you toggle room lights. Smooth curves betray WiFi handshakes. Thermal drift tracks like a slow heartbeat across hours.
5. Runtime Configuration
Adjust sample rate (1 Hz to 1 kHz), WiFi credentials, serial logging verbosity—all without reflashing firmware. Press a button combo on boot to enter config mode. The ESP32 becomes a lab instrument, not a disposable IoT brick.
6. Minimalist Footprint
Because embedded systems demand discipline: web assets are compressed (gzip), inlined where possible, and brutally stripped of redundancy. Old-school optimization meets Y2K-aesthetic glitch visuals. The entire firmware footprint sits under 512 KB.
Living With the Device
I ran Resonator_Entropy for six days straight on my desk. Watched the entropy curve carve maps of invisible weather.
Patterns emerged:
Switching on overhead fluorescents left a sharp vertical spike—EMI from the ballast bleeding into analog ground, visible for 200-300 milliseconds.
A nearby phone scanning for WiFi networks warped the baseline. The ESP32's own radio, sharing silicon with the ADC, added constructive interference.
Thermal shifts became visible as slow sinusoidal drift. The chip warmed from 24°C to 31°C over three hours, and the entropy pool's mean value climbed by 47 ADC units. When I opened a window (October cold, 8°C outside), the curve bent back down.
Late-night silence produced flatter graphs. But never flat. Even at 3 AM, with WiFi idle and the room dark, the entropy values drifted by ±15 units—thermal noise from the ESP32's voltage regulator, maybe, or 60 Hz hum coupling through the breadboard.
It's not cryptographically strong randomness. It's biased, vulnerable to environmental modeling, trivial for a dedicated adversary to predict if they control your physical space.
But it's a stethoscope for invisible events. A way to feel when the electromagnetic air around you changes, in signals too small for ordinary sensors to bother with.
You learn to read the noise like weather: smooth curves mean calm, sharp transients mean something just happened nearby. The device becomes less a random number generator and more a peripheral nervous system for your workspace.
Limitations (And Why They Matter)
Full honesty, because good engineering requires acknowledging failure modes:
Not Cryptographically Secure
This is not a CSPRNG. Bias exists at multiple levels: ADC non-linearity, predictable thermal cycles, electromagnetic coupling. An attacker with physical access or an RF spectrum analyzer could model the noise sources and predict outputs.
If you need cryptographic randomness, use a hardware TRNG (avalanche noise, quantum shot noise) or at minimum pipe these samples through SHA-256 or ChaCha20 to whiten them.
No Automatic Calibration
Drift detection is manual. If your entropy pool skews—say, because the ESP32 overheats or a nearby device starts radiating interference—you're the one who has to notice and adjust thresholds.
Future versions need adaptive baselines, something that learns "normal" over time.
Threshold-Based Anomalies Only
Right now, an "anomaly" is just a sample exceeding a fixed deviation from the rolling mean. Real-world signals deserve better: autocorrelation checks, FFT analysis, maybe even lightweight embedded ML to detect subtle periodic patterns that emerge over hours.
UI Memory Ceiling
The web dashboard is lean (~40 KB total including inline CSS/JS), but adding heavyweight features—3D visualizations, historical replay, multi-device sync—could choke the ESP32's 520 KB SRAM.
These aren't failures. They're launchpads for version two.
Future Experiments
1. Entropy Whitening
Pipe raw samples through SHA-256 in a von Neumann corrector loop. Scrub bias, amplify unpredictability. Output becomes statistically indistinguishable from uniform random—at the cost of throughput (input:output ratio ~2:1 after debiasing).
2. Multi-Sensor Fusion
Layer entropy from:
Light sensors (photocurrent shot noise from ambient light)
Temperature (thermal noise from NTC thermistors)
Cheap RF receivers (atmospheric radio static, lightning strikes)
Audio input (environmental acoustic chaos through MAX4466 preamp)
XOR them together. Entropy accumulates like a collage, each layer contributing uncorrelated noise.
3. Adaptive Anomaly Detection
Implement rolling Z-score calculations, sigma thresholds that shift with baseline drift. Add autoregressive models (AR-1, simple enough for embedded) to predict next sample and flag deviations.
Maybe even tinyML: train a lightweight anomaly detector offline, deploy a quantized model to the ESP32. Let the chip learn what "normal" looks like in your specific environment.
4. Persistent Logging
Mount an SD card or use ESP32 flash wear-leveling. Log entropy streams to CSV with microsecond timestamps. Export for offline analysis: plot FFT spectrograms in Python, run statistical tests (NIST SP 800-22 suite), or feed it into simulation frameworks.
Build a personal archive of electromagnetic weather patterns.
5. Retro Aesthetic Overhaul
Render the graph as ANSI art in a terminal emulator. Add CRT scanlines, phosphor persistence effects, VT100 color codes. Make it look like it crawled out of a haunted VAX cluster circa 1987.
Entropy should feel ancient, not sterile.
6. Hardware Noise Amplification
If you want deeper chaos, wire it in:
Reverse-biased Zener diodes (avalanche breakdown noise, white spectrum)
Piezoelectric discs (mechanical vibration converted to voltage spikes)
Radio noise from cheap SDR dongles (cosmic microwave background, ionospheric scatter)
Feed these into the ESP32's ADC after amplification (LM358 op-amp stage). Build a Frankenstein entropy chimera from scavenged components.
Why It Matters
In an era of deterministic clouds, predictive algorithms, and surveillance capitalism, I want to be reminded that not everything is under control. That even in the most obedient silicon, chaos leaks through the seams.
Resonator_Entropy isn't just a gadget. It's a window into the world's refusal to be perfectly modeled. Watching the entropy graph shift is watching hidden forces—electromagnetic, thermal, quantum—bend your local environment in ways too subtle for human senses but stark enough for a 12-bit ADC.
Maybe that's a building block for cryptographic security.
Maybe it's an art installation about uncertainty.
Maybe it's both.
The boundary between measurement and meaning dissolves when you stare at noise long enough. You start to see patterns. Then you realize the patterns might be real. Then you're not sure. That uncertainty—that epistemic vertigo—is the point.
Try It Yourself
The source code, wiring diagrams, and UI assets live here:
Resonator_Entropy on GitHub
Fork it. Flash it to an ESP32-DevKitC. Wire GPIO 36 and 39 to floating inputs (or better: to amplified noise sources). Open the dashboard at http://resonator.local and watch static draw maps of the unseen.
Also featured on Hackaday.io, one of my favorite corners of the internet where people still build things for the sake of seeing what happens.
Noise is never silent if you listen hard enough.
Technical Specifications
Hardware: ESP32-DevKitC (ESP-WROOM-32)
ADC Resolution: 12-bit (0-4095 counts, ~0.8 mV/LSB at 3.3V reference)
Sample Rate: Configurable 1 Hz - 1 kHz
Entropy Pool: 256-512 samples (circular buffer)
Web Server: Async HTTP on port 80, mDNS responder
Power: 5V USB, ~150-200 mA draw (WiFi active)
Firmware Size: <512 KB (flash), <80 KB (SRAM runtime)
License
MIT License. Build on it. Break it. Make it stranger.
You can also check it out on Hackaday.io, one of my favorite sites.




