I need to power power for a brief interval to a data logger circuit to save the last measurements when power is removed. This data logger is powered by the device under test and on an error condition (which we are trying to catch), the device under test shuts off the power. I need my data logger to run long enough to store the last measurements in EEPROM, so power for even a few seconds will be overkill.
The circuit shown below is what I have in mind, but it seems like it may be over-complicated. Supply voltage is 5 volts, and the micro (PIC18F25K22) should be happy do to 3 volts.
Power comes in from the left. A number of LEDs are connected directly to the 5v supply and switched by micro port pins. These do no need to function when power is removed. Power to the rest of the circuit is via D1, bypassing the super cap under normal operation. The super cap is charged via D2 and the resistor. There is no need to charge the cap quickly. Tens of minutes will suffice as the device under test runs long periods without failure. D2 is needed to keep the super cap from powering the LEDs in the event power is lost. D1 also serves to keep the super cap from supplying the LEDs if power is lost.
When power is lost, the circuit is powered from the super cap via D3. Diode D3 is required to keep the super cap from charging without the current limiting resistor in the path.
I am somewhat concerned about the voltage drops of D2 and D3. Will the voltage on the super cap via D2 eventually rise to the full supply voltage as the charge current approaches 0? I have to content with the voltage drop of D3 while the super cap is powering the circuit during power failure; I am less concerned about that if the voltage on the cap eventually reaches supply voltage.
Am I making this needlessly complicated? Suggestions on how to implement a super cap back up?
The circuit shown below is what I have in mind, but it seems like it may be over-complicated. Supply voltage is 5 volts, and the micro (PIC18F25K22) should be happy do to 3 volts.
Power comes in from the left. A number of LEDs are connected directly to the 5v supply and switched by micro port pins. These do no need to function when power is removed. Power to the rest of the circuit is via D1, bypassing the super cap under normal operation. The super cap is charged via D2 and the resistor. There is no need to charge the cap quickly. Tens of minutes will suffice as the device under test runs long periods without failure. D2 is needed to keep the super cap from powering the LEDs in the event power is lost. D1 also serves to keep the super cap from supplying the LEDs if power is lost.
When power is lost, the circuit is powered from the super cap via D3. Diode D3 is required to keep the super cap from charging without the current limiting resistor in the path.
I am somewhat concerned about the voltage drops of D2 and D3. Will the voltage on the super cap via D2 eventually rise to the full supply voltage as the charge current approaches 0? I have to content with the voltage drop of D3 while the super cap is powering the circuit during power failure; I am less concerned about that if the voltage on the cap eventually reaches supply voltage.
Am I making this needlessly complicated? Suggestions on how to implement a super cap back up?