I designing a circuit will store log data to an SD card. The information will be coming form a parent circuit that this one plugs into. The parent circuit will supply 5V to my daughter card. The daughter card uses an MCU that operates at 3.3V so I am just using a couple of diodes to step down the voltage from 5V.
MY CHALLENGE IS: In the event of a power failure, I want the MCU on my daughter card to be able to sense the main power loss and then immediately flush the data from it's RAM to the SD card and then go idle before it shuts down. When writing to an SD card you can cause corruption if you lose power in the middle of a write procedure.
I am thinking about using a big capacitor to just buffer the power for a bit. I know there are some MCU Supervisor IC's out there that would do a really nice job but they are intended for cases where you need to maintain power for days. I just need a second or two at the most. But I do have to be careful about not letting the MCU "flicker" on and off as the capacitor power decreases below the IC's threshold. Does anyone have a schematic or can offer any suggestions of how I should go about this?
Here is what I have so far... (the .5F cap is my power back-up capacitor)