I have an RPi that I want to give enough juice to auto shutdown when the power goes down. For this I'll use 2 supercaps of 6F (2.7V) in series, giving me plenty of time. Now, I was wondering if I could charge these supercaps on the same 5V source that I connect to the RPi. The powersupply gives maximum 2.4A, but I want to limit the current into the supercaps so there is enough for the RPi and have a low voltage drop of around 0.1-0.2V. I thought something around 100-150mA, charged in 7-10 minutes, so there is a good 2A left and the eventual voltage drop would be low.

I could use an LDO with a fixed voltage and current output, analog to question 3V Current source with low voltage drop. For this I found the MIC5205-5.0YM5-TR (http://www.farnell.com/datasheets/29605.pdf) but in the datasheet it says under 'Electrical Characteristics' Vout = Vin + 1V so I guess that I can't use this one.

Other than an LDO I thought of a current limiting circuit with an MOSFET.

current limiter

The circuit has 3 parts, first the voltage source of 5V with a maximum current of 2.4A. Secondly, the current limiting part with the pMOSFET and the sense resistor, for this I thought of the PMN50EPE (http://www.farnell.com/datasheets/2621318.pdf) with Vth = -2V typically. And lastly the supercaps in series with their internal series resistance and a voltage divider to keep the voltage across both supercaps equal.


Vin = 5V    
Id,max = 0,15A
Vth = -2V

Rsens = 1 Ohm

Vgs = Rsens * Id - Vr1
Vth = -2V = Vgs,max = Id,max - Vr1
Vr1 = 2.15V
R2/R1 = 2.15

The datasheet of the MOSFET says that Rds(on),max = 0.07 Ohm, but in with lower current I guess this will be more? Is Rds = 0.2 Ohm a more realistic estimate? Then the voltage drop would be (Rsens + Rds) * Id,max = 1.3 Ohm * 0,15A = 0.2V. I suppose this would drop as the supercaps are getting charged and R3 and R4 are taking over.

Is this a good design? Can it improve? Like decreasing Rsens and playing with the ratio of R2/R1, replace with/add in parallel to R3 and 'R4' 2 2.5V zener diodes. Will it fail completely as I oversaw something?

The datasheets of pMOSFET's give broad ranges for Vth how do I know I have a 'good' one?

Some calculations to verify the mode of Q1.

Id = 0.05A
-> Vsens = 0.05V
-> Vgs = Vsens - Vr1 = 0.05V - 2.15V = -2.1V

Vds = Id * Rds = -0.15A * 0.2 Ohm = -0.3V

Vgs < Vth
Vds > Vgs and Vds < Vgs - Vth = -0.1
-> saturation mode?


Id = 0.2A
-> Vsens = 0.2V
-> Vgs = -1.95V

Vgs > Vth
-> cutoff
  • \$\begingroup\$ The principal issue I'd see with the general approach is its reliance on an accurate Vgsth value for the FET and on the variation of current with Vgs once significant conduction occurs. If you are happy to adjust the bias from the R1/R2 divider (perhaps with a pot?) or accept the effect of Vgsth variations between devices or to select one that matches what you want then it should work "OK enough". || I'd personally lean towards a circuit implementing a somewhat more formal constant current source. You could retain the high side current sense ... \$\endgroup\$
    – Russell McMahon
    Commented Jul 28, 2019 at 5:59
  • \$\begingroup\$ ... which requires either a cct that has V+ in the common mode range, or refer the current to ground with a mirror, or (my preference) put it in the low side with an N Channel FET - with the main advantage of allowing the use of any opamp that allows ground in its common mode range (eg super cheap (& olde) LM358/324 . If Vin is accurate enough you can divide Vin for a reference or add an eg TL431 for accuracy. You can then charge at whatever Imax you wish with good accuracy with it seamlessly reverting to FET full on when charged enough. | This does have the 'annoying consequence' of ... \$\endgroup\$
    – Russell McMahon
    Commented Jul 28, 2019 at 6:04
  • \$\begingroup\$ ... putting the FET in the ground lead of the RPi - which may or may not bother you. || Or as above, a high side current mirror and PFET still allow the use of high side switch and LM324 and high side sense R. || Decisions, decisions :-). \$\endgroup\$
    – Russell McMahon
    Commented Jul 28, 2019 at 6:06
  • \$\begingroup\$ Comment only: The 2 x 6F in series give you 3F - you know that. I don't know what the RPI allowed V is bit as you mention 3V, say 3V. So energy available is 1- (3^2/5^2) = 0.64 of the capacitor energy at 5V. So ~~= 0.5 x C x V^2 x 0.64 = 24 Joules. That should be ample for shut down unless you have something dependant on external timings (eg safety spin down of log chipper or .... similar :-) ). \$\endgroup\$
    – Russell McMahon
    Commented Jul 28, 2019 at 6:11
  • \$\begingroup\$ More detail / suggested circuit available if wanted. \$\endgroup\$
    – Russell McMahon
    Commented Jul 28, 2019 at 7:14

1 Answer 1


You could use a device like the TI TPS25940A eFuse to improve the circuit. It has current ramp rate control for cap charging and programmable current limit.

This particular part has a minimum current limit of 0.6A it looks like. But you can probably find a similar part with lower current specs. It will be cheaper too. The eFuse voltage drop should be very small.

You can read the application note for a similar application that you are using here: http://www.ti.com/lit/an/slva920/slva920.pdf

The app note above uses a boost converter to maintain a 5V output as the cap discharges. If your load can handle the voltage drop without the need for regulation. You could replace the boost converter with a shottkey diode or an ideal diode ("diode current switch") IC. You can find them here on digikey https://www.digikey.com/products/en/integrated-circuits-ics/pmic-or-controllers-ideal-diodes/758?k=ideal%20diode

A diode is needed to replace the boost converter so the cap only supplies the load when the main voltage goes below the cap voltage. Choose the diode based on how much voltage drop is acceptable. But the caps may discharge very quickly to below your desired threshold. You can easily calculate how long you have. So a boost converter may be needed in your application too to prolong runtime. Otherwise you are wasting a very large portion of the energy stored in the caps.

I don't know what super caps you are using, but putting super caps in series is similar to putting batteries in series. If they are not perfectly matched, they can charge at different rates and discharge into each other and damage them. This will require balancing circuitry.

You can read about this kind of super cap "UPS" system and how the ESR can change in this Analog Devices appnote. https://www.analog.com/en/technical-articles/supercap-backup-circuit-provides-reliable-uninterrupted-power.html

There are lot's more options to achieve this goal and it all depend on your exact requirements and application. Hope this helps.

  • \$\begingroup\$ Thanks for your input. The TPS25940A is an interesting part, but didn't really find a replacement for a lower current one. Or they went expensive, which I want to try to avoid. It's also a good idea to use a boost converter, which I didn't think off. This will get me more time on 5V output voltage. In the meantime I also found a better supercap rated at 5.4V ( AVX SCMT32D755SRBB0 ) so I only need one, which simplifies the circuit. \$\endgroup\$
    – Swedgin
    Commented Aug 19, 2019 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.