I am trying to save the context of a microcontroller during a power loss. I already have a detection circuit which tells the microcontroller about the power loss. During a power failure, I needed some additional time for the microcontroller to perform the save operation, hence I have added a large capacitor (1000uF). Everything was working fine with this approach and I was getting more than the required time to complete my operations. Now I needed to connect some other load to the same power supply (some relays) and this reduced the capacitor's discharge rate. As a solution I added a schottky diode (SOD-123) in my circuit before the capacitor and after the relay such that the capacitor charge wont flow back to the relays. Schematic shown below.
simulate this circuit – Schematic created using CircuitLab
However I don't see much improvement in the time. My setup works fine when the relays are turned off / removed. Is my schottky rating incorrect? or do I have a better or easy way to handle this ? I won't be able to change my power supply or add too many components due to size constraints.
Note - My brownout voltage is 2.1V and blackout voltage is 1.67V. The Mosfet controls the relay and the relay also has flyback diode (not shown in diagram)