Projects / FRC hardware / 2026

Voltage stabilizer

A supercapacitor-backed stabilizer that keeps a robot's sensors alive through brownouts.

I wrote the board's firmware.

  • C
  • STM32G431
  • No RTOS
  • Python tooling

The problem

With 18 motors on the robot, the 12V battery could sag to about 6V under load.

The solution

A supercapacitor bank carries the protected loads at 12V through harsh brownouts. The design is fail-safe: every power switch fails off and the bank discharges by default, so a crash or an unprogrammed board stays safe.

Power sequencing

  • An eight-state power state machine runs the whole sequence: idle, precharge, bypass, boost, output, ride-through, shutdown and fault
  • The bank is precharged with PWM to limit inrush, and the boost output is verified before the 12V output switches on
  • When the input returns, the board recovers directly, with no second precharge

Telling a brownout from its own charge current

The firmware polls input voltage every 2ms and enters ride-through when it stays below 9.75V for 15ms, but only if the bank is at least 500mV above the input. That check separates a real input loss from the bank's own charge current pulling the input down.

Faults and protection

  • Four latched fault types: precharge timeout, boost start failure, overcurrent and out-of-regulation. The fault LED blinks the fault code
  • A charge lockout above 15.5V input protects the capacitors, and cell imbalance raises a warning
  • An independent watchdog of about 1s resets a hung board into its safe state, and a watchdog reset is reported in telemetry

Tooling

  • Live telemetry over USB at about 3Hz
  • Reflashing over USB without touching a BOOT0 switch, using a 1200-baud touch to enter the bootloader
  • A Python tool handles building, flashing and monitoring

Status

Commercial sale through Wirx Systems is pending, awaiting FIRST approval.

Board specs

Input
6-16V (6V only during brownouts)
Output
12.1V regulated, 3A nominal, about 40W continuous
Energy storage
Six 10F, 2.7V supercapacitors in series: 1.67F at 16.2V, about 100J usable
Sensing
Two INA226 current and voltage monitors, plus ADC sensing of input, output, capacitor bank and bank midpoint