Loading simulator…
The load must continue receiving voltage briefly after SW1 disconnects the 5 V supply. A capacitor placed across R_LOAD stores energy, but its value must be chosen to satisfy both an early minimum and a later maximum voltage.
R_LOAD = 1 kΩ, the hold-up voltage after opening the switch is:C1 = 100 µF across R_LOAD. This gives:With SW1 closed, let VOUT settle near 5 V. Open it and inspect the output 20 ms and 100 ms later. Try 220 µF; it holds voltage longer but would fail the 100 ms upper-voltage requirement.