Keep-Alive Capacitor Sizing Calculator
Description
A keep-alive capacitor stores charge while track power is present, then feeds the decoder from that stored charge through brief power interruptions — a dirty rail joint, a dead frog, a gap at a turnout — so the locomotive doesn't stall or the sound doesn't cut out. How much capacitance you need depends on how much current the decoder and its functions draw, how long you want to ride through an interruption, and how much the capacitor's voltage is allowed to sag before the decoder stops working properly.
The default mode gives you the capacitance for a target hold time and voltage droop. The other two modes work backward from a capacitor you already have: enter its capacitance to find the hold time it gives you, or the droop it'll produce over a given hold time.
Sources
This is the standard capacitor discharge relationship for a roughly constant current (from Q = C·V): C = I × t / ΔV — plain capacitor physics, not a modeling-specific standard, the same category this site uses for its Grade & Elevation Calculator.
Disclaimer: this assumes a roughly constant current draw during the outage. Real decoder current varies (sound and lighting functions draw more than just motor current), and a real capacitor's internal resistance and the keep-alive circuit's own charging components add losses this formula doesn't capture — treat the result as a sizing starting point, not an exact guarantee, and check your decoder's own keep-alive guidance.

