To bridge my physical electronics workbench with this web portfolio, I engineered an automated telemetry pipeline that streams live RMS current, voltage, temperature, and Wi-Fi RSSI directly from an active ESP32 node into the hero instrument card.
#1. Firmly Isolating Sampling from Network Dispatch
The ESP32 features dual Xtensa LX6 cores. Running network stacks (Wi-Fi and HTTPS) on the same core as ADC sampling causes micro-jitter and sample drops during RF transmission bursts. We dedicated Core 0 strictly to high-priority FreeRTOS hardware timer interrupts performing 3.2 kS/s True RMS AC current sampling over 20ms mains cycles, passing aggregated metrics to Core 1 via a thread-safe FreeRTOS queue.
Edge devices should send aggregated physics (RMS, Peak, Vpp, Temperature), not raw megabytes of noisy analog samples. Keep sampling on the silicone and dispatch telemetry over HTTPS.
#2. The Supabase Edge Ingestion & Realtime Broadcast Pipeline
Every 5 seconds, the ESP32 issues an HTTPS POST to a Supabase Edge Function (`/functions/v1/ingest`). The function validates a bearer device token (`x-device-token`), clamps values to plausible physical bounds, and inserts a row into the PostgreSQL `telemetry` table. Supabase Realtime detects the insert and broadcasts it across WebSockets to connected browsers in under 45ms.
- Physical clamp meter benchmark verification ensuring ±2.4% error across 0.2A to 5.0A test loads
- Automated offline fallback: switches to calibrated bench playback if no packet is received for >60s
- HTML5 Canvas phosphor oscilloscope trace mimicking analog cathode-ray tube phosphor decay
- Zero client secrets: public browser clients subscribe via anonymous read-only RLS channels