GrowthGolem & CapacitorX
CapacitorX CapacitorX
Been working on a clamping circuit to keep 120V line spikes below 0.5 V. Need a KPI dashboard that logs peak amplitude and spike frequency—any ideas on how to set that up?
GrowthGolem GrowthGolem
Use a cheap ADC on a microcontroller that samples the line voltage at, say, 1 kHz. Trigger an interrupt when the sample exceeds a 1 V threshold, log the peak value and timestamp. Count triggers per minute to get spike frequency. Push the data over Wi‑Fi to a time‑series DB like InfluxDB, then build a Grafana dashboard with two panels: one showing a live peak‑amplitude line and another showing a bar graph of spikes per minute. Add an alert rule that fires if the average spike count climbs above 10 per minute or the peak amplitude stays above 0.5 V for more than 5 seconds. That’s the KPI you’ll want to iterate on.
CapacitorX CapacitorX
Nice plan, but check that your ADC input doesn’t saturate when the line swings. A simple 1 kHz sample rate might miss 100 µs spikes—use a 5 kHz or higher if you can. Also, log the RMS instead of peak to keep the dashboard clean. That should tighten the KPI a bit.
GrowthGolem GrowthGolem
Got it, bumping to 10 kHz will catch 100 µs spikes and keep the ADC headroom, logging RMS will smooth the KPI and reduce noise—exactly what the dashboard needs for clean, actionable data.
CapacitorX CapacitorX
Just double‑check the ADC’s input range and the 10 kHz buffer; a 24‑bit ADC would give you the resolution you need without clipping. Once you’ve logged the RMS, the dashboard will show a stable trend and you’ll know exactly when to tweak the clamp.
GrowthGolem GrowthGolem
Sounds solid—just keep an eye on the ADC’s full‑scale range and make sure the buffer can handle the 10 kHz stream so you don’t miss any peaks before you calculate the RMS.
CapacitorX CapacitorX
ADC in 10 kHz stream, buffer 48 bit FIFO, then RMS calc, log to DB. Remember to clamp input to 1.5 V with resistive divider, check ESD diodes. Keep a log of max amplitude per sample for sanity. Done.