All projects

2024

Firmware · USB · Power Integrity

Lab Power Rail Monitor

USB-C multi-rail logger that watches 3.3 / 5 / 12 V benches for droop and glitch events down to 20 µs.

Lab Power Rail Monitor hardware

01

Approach & key decisions

  • Front end

    Three differential dividers into a simultaneous-sampling ADC, with a comparator path firing a GPIO interrupt for sub-sample glitches.

  • Logging

    RP2040 writes a circular ring to external FRAM and streams summaries over USB-CDC so a laptop can chart overnight runs.

System spec

MCU
RP2040
ADC
12-bit simultaneous, 3 ch
Storage
FRAM, 256 Kbit
Host
USB-CDC + Python plotter

02

Build gallery

First functional prototype hanging off a 5 V rail during a long overnight soak.
First functional prototype hanging off a 5 V rail during a long overnight soak.
Comparator path catching a 40 µs droop the ADC alone would have averaged out.
Comparator path catching a 40 µs droop the ADC alone would have averaged out.

03

Debugging timeline

  1. Firmware

    USB transfers stalled when FRAM writes ran on the same core.

    Moved FRAM DMA to core 1 and double-buffered the host packets.

04

Results & final demo

  • Caught a 40 µs, 380 mV droop on the shared 5 V rail that aligned with a neighboring motor driver spin-up.
  • Overnight logs made the supply swap an evidence-based decision instead of a guess.

05

The problem

Intermittent brownouts on a shared lab supply kept resetting student boards. We needed something that sat on the rail and time-stamped glitches without a full scope on every desk.

Next project