Thursday, 19 April 2018

Help with power-loss protection using capacitor


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) alt text



Answer



Using diodes to drop voltage? Yuck. Use a 3.3V regulator. It's just the right thing to do. You and/or your customers will be glad you did it.


You have the right idea, generally. Use a huge cap, although .5F might be a bit too huge.


Instead of using a comparator, you could use a voltage divider and run the output into one of the Interrupt-On-Change pins of the PIC. Set up the divider so that the input is a bit above the max Vih when the 5V is active. This has the added bonus of also pulling the 5V down faster once the source is removed.


You could also try using a battery and a power mux. When the 5V goes away, the mux will switch to battery power. http://focus.ti.com/paramsearch/docs/parametricsearch.tsp?family=analog&familyId=422&uiTemplateId=NODE_STRY_PGE_T



No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...