Supercapacitors and ESR - Page 1
Forum section: electronics / beginners

author: skyjumper
author_rank: Regular Contributor
timestamp: June 19, 2020, 12:31:35 am
content: I'm working on a circuit with an ESP32. The device needs to stay up long enough for the mpu to finish writing and closing a file on an SD card when power is lost (there is a circuit that triggers an ISR when input power is lost). I'm experimenting with supercapacitors. I started with a 0.1F capacitor and then tried a 0.3F. Neither held my mpu up long enough. I tacked an additional 0.47F supercap on to the 0.3 and now it works as I need it to. The circuit uses 3.3V logic, and the supercap sits on the V3.3 line.Okay, it works, but why? The second capacitor I tried is a 330mF (EDLC) Supercapacitor 5.5V Radial, Can 150 Ohm @ 1kHz and this didn't do the job. The cap I added in parallel to it is an Eaton PowerStor Aerogel PM Series 5.0V 0.47F esr = 0.42 Ohm.So there is a BIG difference in esr. I'm wondering, did adding the second cap work because of the additional 0.47F, or did it work because of the much lower esr? Should I find one cap with a very low esr or one cap with a very high capacity (I found a 1F EDLS with a 300 Ohm esr). Googling about ESR and why it's important didn't reveal much.I would appreciate someone helping me understand whats happening, thank you.

author: unitedatoms
author_rank: Frequent Contributor
timestamp: June 19, 2020, 12:57:41 am
content: SD card can draw up to 200mA. So the esr needs to be very low for that reason.

author: wraper
author_rank: Unknown
timestamp: June 19, 2020, 01:07:54 am
content: Those supercaps are not made for a rapid discharge. They are for small backup power purposes. Like for running a clock or keeping settings while power is off.QuoteNow try to power you circuit from PSU through 150 Ohm resistor and see what happens.

author: skyjumper
author_rank: Regular Contributor
timestamp: June 19, 2020, 04:20:26 am
content: Quote from: unitedatoms on June 19, 2020, 12:57:41 amOkay, but how does the esr impact the discharge?

author: bdunham7
author_rank: Super Contributor
timestamp: June 19, 2020, 04:50:24 am
content: An ESR rating at 1 kHz is not a perfect model for your application, but lets say it is. Equivalent Series Resistance means just that--your available voltage will be reduced by the voltage drop across the ESR, which is the current times that resistance. If your MCU draws 10mA, your 150 ohms of ESR will cause a 1.5V drop, which I assume will cause your MCU to drop out immediately.You have multiple things working against you here. First, you are putting the supercap right on the 3.3V line, which means the voltage starts to drop immediately. If your MCU drops out at 3.0V, you have only used about 10% of the supercaps energy. If you had a 5V supply feeding your MCU through a 3.3V LDO regulator, you might be able to get four or five times more run time out of the same capacitor. Second, writing to an SD card is a variable event--it may take much longer one time than another if it decides to erase some blocks or whatever they do behind the scenes. So you can't conclude that if it works once, it will always work.To figure all this out, you need to know what voltage your MCU drops out at and what the power-off SD write event looks like in terms of time and current draw in the worst case. Then you can calculate how much capacitor you need and what the maximum ESR you can tolerate. Or you an just go Captain Overkill and spend a few bucks on a 5F 5.5V 0.2 ohm supercap which will run about 3 bucks.

author: Berni
author_rank: Super Contributor
timestamp: June 19, 2020, 05:14:53 am
content: You need to use the right kind of supercapThe ones designed to supply backup power to real time clocks and memory have a high ESR. Sometimes its >100 Ohm and this is just like a resistor in series with the capacitor, so even if you short the capacitor to 0V you only get 10s of mA out of it. Way too little to run a SD card.Later on they came up with a low ESR supercapacitor design. These caps have a ESR measured in miliOhms and so they can provide many amps of current. These are what you need. I have been using them to run things like a RaspberryPi for a few seconds from a single capacitor. The trick in getting the most runtime out of it is also to use a boost DC/DC. This makes it keep a steady 3.3V or 5V as the cap discharges from say 5V to 1V. This pulls more energy out of the capacitor due to the larger voltage change so a 1F capacitor might now last as long as a 10F capacitor otherwise would.

author: skyjumper
author_rank: Regular Contributor
timestamp: June 19, 2020, 05:16:25 am
content: Thanks very much bdunham7 !!!As I am researching this I found this web page that calculates discharge time for a supercap:http://www.circuits.dk/calculator_capacitor_discharge.htmI had thought about putting the supercap ahead of the voltage converter, but the board accepts from 9VDC up to 40VDC and usually it will be about 12VDC or 24VDC. The ESP32 drops out at 2.55V, but as I check the datasheet for the ESP32-VROOM-32U I'm using I see that its 3.0V, as you said. The WiFi radio and LEDs and all can easily use 200mA without the SD card in play, but the IRS shuts these things down immediately. Assuming 250mA a 1.5F cap with an esr of 0.26ohm might give me nearly a second.So, I suspect in the case of my board, it's the 0.47 cap doing all the work while the 0.3F cap with the much higher esr is doing very little.I had not thought about the SD card considerations you mentioned, thanks for that. I think I'll get a 1.5F cap and see how that does.

author: skyjumper
author_rank: Regular Contributor
timestamp: June 19, 2020, 05:24:37 am
content: Quote from: Berni on June 19, 2020, 05:14:53 amYeah that makes sense. I did a circuit before with a tiny little DC/DC boost converter.In this case, this board can be powered by 5VDC from a USB or by voltage in from a battery. The supercap is tapped at the output of the circuit that decides which supply to use when both are connected. So it can never charge a 5.5V cap to 5.5V (unless I use a boost converter in front of it) but if I add a boost converter to the output of it I see it would work.First I'll just try a massive cap as suggested, if that works well enough I might stick with that.Thanks very much!

author: just4user
author_rank: Contributor
timestamp: September 22, 2024, 10:43:42 am
content: Hey fellas. Any idea how one may cap the current to 1A w/o simply using a resistor to charge the capacitor as fast as possible? I.e. 1A goes through the capacitor till it's full and then a sharp decrease to 0A instead of a gradual decrease. (The 1A limit is to avoid damaging the supply.)

author: jwet
author_rank: Frequent Contributor
timestamp: September 22, 2024, 04:21:09 pm
content: > Any idea how one may cap the current to 1A w/o simply using a resistor to charge the capacitor as fast as possible? I.e. 1A goes through the capacitor till it's full >and then a sharp decrease to 0A instead of a gradual decrease. (The 1A limit is to avoid damaging the supply.)The classic current limiter circuit uses a PNP with a shunt resistor (.6 ohms will drop .6v at 1 amp) between its base and emitter. The input voltage is fed into this resistor at the base. There is a 470 ohm? or so pull down on base to ground. The transistor is on and saturated normally (drops about .15v), if the current gets too high the shunt will develop more than .6 and throttle things down. You need a transistor with good beta and high current. Xetex (now Diodes Inc) make good parts in the "E Line" parts, something like ZTX751 is a favorite- beta is high at 200, Ic is 2A max and Pd is 1W. While its limiting current, it will dissipate power- its good for a watt which should be enough.You can get fancier with current mirrors of towards IC solutions like high side current sense amps, comparators. IC companies even make specialty super cap chargers- LTC4425 is one of the originals.Have Fun,John

author: just4user
author_rank: Contributor
timestamp: September 22, 2024, 08:07:05 pm
content: Thanks John. I tried simulating it but the transistor remains off. Not sure if the model parameters aren't what you have in mind. Here's the link:https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWEBmAHAJmgdgGzoRmACzICcpkORICkNNdCApgLRhgBQATjWOiOiz8EfFAn50YObiCJFUY-nIXKosrJA4BzWfN0q98yVA4BjGjjrIcChJdnIJUaBBhww8T+nR8hdnM7uHABK+oph6KgKxkSMapLQCBwALrz8yOIWVpl0bLLQ5KjkxeRYWKh+KLAIWIXo5JCCCMhgrKLocCAAJkwAZgCGAK4ANskcAO5hGcKi0yaTIvyCwvbL81kCQhvI1iY6dnQkK4eoxpoA9ihparHkgZB8HRot+PdwpLh2r3TpKBxAA.

author: jwet
author_rank: Frequent Contributor
timestamp: September 23, 2024, 01:16:23 am
content: Sorry my description was not good and I hadn't given it much thought. See circuit below- play with it in Falstad.https://tinyurl.com/29bop267At this current, power is high in PNP, might want to turn down max current to 250 mA, use 2.2 ohm for Rsense and larger base pull down 1k-2kI'm not too swift at Falstad, its an interesting tool for quick insight.Have Fun,John

author: just4user
author_rank: Contributor
timestamp: September 23, 2024, 05:08:36 am
content: Thank you very much John. It does work now.If I don't find a PNP capable of 1A in nearby stores, I thought I could maybe use multiple less capable ones in parallel as in here:https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWEBmAHAJmgdgGzoRmACzICcpkORIJI6ICkDApgLRhgBQAbuDk0VR8mrQVHFEmSJjOgJOAJ2Eh2YeukkqO9JlwAudVEPbohp42FzgtdaIKwI0OZ8kqQsyFTAc4skVFjoHO5YYMie6HAgACbMAGYAhgCuADZ6nADuyqr0YPwqYpCK2WKu1KJCuvDFZQVCtYU0fpkoOBZqNMj0OVAtJN3and1dvQDGQyoj-TSVUNAQ3shEpEGkxOjIeKSBvVnmWqYokOWFLXkC9cczu0fUYtOnBuE4KqQvz1pE1BDstvaOqGcOFc-A8XmwCF8-kCwSwoXCdCisUSqXSWQ+rDetzqN2QCAGX1a7R0LTxBOotXYViKe00PXQOypLxpdDpgy6ImI1CKAHsQFgQFQUCAAB4JMCQPIMOYLawwSD4Xp8oRCgSQcjgaCKsDQF4Qej1ThAAIt works fine in the simulator but not sure if there are any gotchas IRL.Moreover though, aren't shunt resistors usually <0.1Ω ? I replaced 0.6Ω with 1Ω and the current is closer to 1A now, but I'll need a brick resistor to dissipate 1W there. Tried the circuit w/o that resistor as well and the current went to 1.6A which is still adjustable by modifying the pull-down R as you mentioned.Btw, I was playing around with the idea and I figured out another way as well using an n-MOSFET. Here's the link:https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWEBmAHAJmgdgGzoRmACzICcpkORICk4dtNApgLRhgBQA5iuncpGrI+KZDihQOAJRD5x6VKlmQlCpXTpE6YaOI1RoCDgHdeddFnRnZ6apGmyt4XI+0KJmhh4NGAZrIR5RWs1CR0kPnsAY2swF2FzWw9oCCJocnJAsAswOFQsLAM4TgAnV2dxBIrkzgB7Gnokz3IGnT1ZBuQONHAQADEIfRE2EAA1WoAbABcAQy4mDiAThe 0.1Ω is just for modeling the parasitic resistance of the cap and not important. The 1.6v can be achieved with a potentiometer but is subject to β of the transistor IRL. So the only question is whether a 1A n-MOSFET or 1A PNP is more common / cheaper.P.S. Sorry for the long links, but relying on Tinyurl means relying on a separate server which may not be there tomorrow, whereas Falstad is FOSS. I only wish this site allowed (full-link) style of inserting links, aka Markdown.

author: BrianHG
author_rank: Super Contributor
timestamp: September 23, 2024, 05:29:03 am
content: Try a normal linear regulator with a built in 1A current limiter.

author: just4user
author_rank: Contributor
timestamp: September 23, 2024, 05:34:50 am
content: QuoteIsn't that limit whatyoushouldn't exceed though? Do you know the part number?

author: BrianHG
author_rank: Super Contributor
timestamp: September 23, 2024, 05:54:03 am
content: Check out the datasheet for TI's LM317.The have a page in the datasheet which illustrates an example 6v current regulated battery charger.You would just need to adjust the resistor values for the voltage you want for your supercap.See pages 24 and 27.https://www.ti.com/lit/ds/symlink/lm317-n.pdf

author: just4user
author_rank: Contributor
timestamp: September 23, 2024, 06:03:42 am
content: QuoteThanks Brian.I forgot to mention the dropout voltage.My use-case is in line with the earlier posts in the thread i.e. a UPS sort of manner, so minimizing the dropout would be ideal.Figure 4 on page 9 shows 2v dropout at 1A and 25ºC which is quite far from ideal.Thanks again 🙏

author: jwet
author_rank: Frequent Contributor
timestamp: September 23, 2024, 02:42:06 pm
content: just4...The .6 ohms is a magic number, Vbe is .6/.7 or .6 ohm x 1 amp. When you sense with the upstream 1k, you turn off the PNP.The pulldown trick won't work as well in real life. Falstad is a pretty simple simulator and assumes beta is constant- its highly variable and inconsistent and even depends a bit on temp.Get out of simulation mode and go burn your fingers. Its a classic circuit but you'll learn a lot playing with it. Transistors are very odd beasts. You'll learn if you dig in deep enough that beta is a lousy parameter- bipolars are transconductive devices- they're Ic is controlled by Vbe in a logarithmic way. Look up Ebers-Moll equation and get ready to forget what you think you knew about transistors.Edited this- backwards thinkingThis general application is called "inrush" current limiting and its pretty common- hundreds of ways to solve it. Another simple way is to use a Negative Tempco Power Thermistor- "NTC". These have a medium resistance nominally but their R decreases rapidly when they heat up- like when the cap tries to charge like a short- you can get stuff sized to do something similar- they cool off and return to normal after a bit. When first plugged in, the cap will try to draw like a short but the ohm or so of the NTC won't let it. It will decreased in value, charge the cap and then go back to their medium value- usually around an ohm. They're often used in switching power supply so the lights don't dim when you plug them in, etc.The LM-317 and MOSFET's both have the problem of large drop out and equivalent of high Vbe (1.2V for 317 and ~4v for big fet).Many ways to skin this cat...

author: just4user
author_rank: Contributor
timestamp: September 23, 2024, 03:08:28 pm
content: Thank you John.I do not yet understand the magic of the shunt resistor or why the pulldown trick won't work as well in real life.But I think you meant NTC thermistor, rather than PTC, as it needs to decrease in resistance as the capacitor gets more charged.I don't like their temperature dependence and their reset time, so I'll try transistor solutions first.Thanks for pointing out dropout voltages of FETs. I'll keep that in mind.

author: jwet
author_rank: Frequent Contributor
timestamp: September 23, 2024, 03:13:22 pm
content: NTC, you're correct, I was editting as you were writing.Play with parts on the bench. Set the current limit at 50 mA or something easy and you won't have to use big parts.You can't parallel bipolars so easily- you generally have to "ballast" them to make up for small differences.Take Care

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 23, 2024, 03:16:19 pm
content: Not uncommon to use a parallel resistor and diode: the resistor limits charging current, very dumb and simple solution; when power is lost, the diode directs capacitor charge into the rail, keeping it up (minus a modest drop, say 0.4V using a large schottky).Most applications, the RC time constant is much less than the expected / average up-time, and the capacitor gets fully charged before it's needed, and a smarter solution isn't needed.When it  is needed, a transistor as above, or even a buck converter (more efficient; note, a current-limited type is required, not the foldback or hiccup-mode types that are common) can be used to charge the capacitor; and an ideal diode (discrete circuit, or wired-OR controller) can be used in place of the passive diode.Related, there are also "energy harvesting" ICs, for diverse sources (PV, thermoelectric, piezo, etc.), storing into a supercap or battery, from which higher peak currents and low average (over sufficient time scales) can be drawn.Quote from: BrianHG on September 23, 2024, 05:29:03 amNot great, as the dropout voltage is huge: at least the VREF, or 1.25V for LM317 for example, but dropout is normally 1.5-2V for that type, useless for a 3.3V supply, barely leaving enough voltage for a CMOS (backup) RAM.LDOs are better, but have another problem: their internal current limiting is very loose, generally speaking. And you won't have a floating VREF to use like the LM317. Instead, you have to shop around to find one with continuous current limiting over a modest band -- perhaps 200-400mA would be an acceptable spread?Tim

author: just4user
author_rank: Contributor
timestamp: September 23, 2024, 03:42:16 pm
content: Thanks Tim. To add to the many ways of skinning this...A (LDO?!) buck converter with a soft-starter mode. If you choose the ramp slope just right, it'll draw 1A.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 23, 2024, 06:10:54 pm
content: Nah not soft start -- that'll take too long, and have other drawbacks (e.g. a 100uF+ SS cap being discharged through ESD diodes when powered off, maybe who knows?). You'd have to somehow match the SS and supercap (initial) voltages and values, or take much longer for it to reach that point, it's weird?Just current limit, so it delivers constant current into the load, and the load does whatever it does (i.e., I/C = dV/dt).The downside is if it ever ends up shorted, it's just sitting there cooking forever, drawing supply current and dissipating some power (not necessarily problematic, just that it's more than zero). Maybe a foldback or hiccup limit, just with a lower threshold voltage, or a much longer timeout before faulting occurs, would be most attractive here? But again, keep in mind, this is already looking beyond a single failure event, and needless to say, the backup cap isn't backing up anything if it (or something connected to it) has failed shorted, and a lot of designs just aren't concerned with how they fail beyond a single event.And yeah actually, it might need to be a low dropout buck. This is usually specified as having a high maximum duty cycle, >95% say, or 100% specifically. Then the output can be steady on, and the regulator acts like a low-drop switch between VIN and VCAP. It could also be a regular type, supplied from a higher rail, with the Vout feedback set appropriately (say, 5V supply charging a two-cell cap up to 3.3V for 3.3V logic use).The LDO comments specifically are in regards to a pure analog solution, using a Low Drop-Out (LDO) regulator instead of switching. More power is dissipated, but only while charging, and then it can act as a low-drop switch from VIN to VCAP.You wouldn't usually use "LDO" to describe a switching converter. But in the same sense that that applies (the maximum duty cycle), yes.Tim

author: just4user
author_rank: Contributor
timestamp: September 27, 2024, 08:53:09 pm
content: @jwetQuoteHey John. I was looking around but couldn't find whence you came up with the 4v. The voltage drop across a MOSFET seems to be I*RDS_ON in the ohmic region and RDS_ON is quite low for power MOSFETs (as otherwise they wouldn't bePower.) Furthermore, the current limiting is a feature of the saturated region, not ohmic.Only dropout related thing I found for MOSFETs seems to be the parasitic source-drain diode of Power-MOSFETs as described here:https://www.ti.com/lit/ab/snvaa86/snvaa86.pdf?ts=1727432071033, which is unrelated to our discussion.Here's an example (costing $1.5) with RDS_ON in the mΩ range:https://www.mouser.com/datasheet/2/389/stp160n3ll-1851328.pdf. Based on table 4, Lower GS voltage doesn't seem to significantly increase this value either.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 27, 2024, 08:55:28 pm
content: Think about what Vg must be for a high-side N-MOS near Rds(on) range.Tim

author: just4user
author_rank: Contributor
timestamp: September 27, 2024, 09:00:47 pm
content: But in the circuit I sent a link for, I used it in low-side.If the dropout you guys know about is in the datasheet, I'd really appreciate it if you tell me where exactly that's hidden.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 27, 2024, 09:14:37 pm
content: What circuit? The post you quoted was (I believe) in context of a high-side or in-line device, where Vgs(on) does matter (or a much more complicated solution is required).Tim

author: Smokey
author_rank: Super Contributor
timestamp: September 27, 2024, 09:45:38 pm
content: If you are using the ESP32 wireless, make sure you disable that when you go into shutdown. It has a much higher current draw when transmitting.

author: ArdWar
author_rank: Frequent Contributor
timestamp: September 28, 2024, 01:40:09 am
content: Quote from: just4user on September 27, 2024, 09:00:47 pmIt won't be on the datasheet explicitly since the dropout is related to circuit implementation. For simple current source/sink, a BJT need to drop at least a VBEalthough it's more common to use 2*VBE, a MOSFET need to drop at least a VGS(TH), a linear regulator need to drop at least a VREF.You can get lower dropout by using amplified current sense and/or lower reference voltage, but that won't be "simple" anymore. Some switching converter optimized for constant current (LED drivers) also have very low VREF(usually something like 0.2V) specifically to reduce dropout.In my opinion, I don't think dropout is even a problem here since you're using it to charge a capacitor, where the current will taper off to zero and the dropout will also be zero.

author: just4user
author_rank: Contributor
timestamp: September 28, 2024, 03:08:57 pm
content: Yeah, I think the only problem could be that once VDS goes lower than VGS, it'll be in ohmic mode i.e. act just like a resistor. Now the bigger the FET, the higher the threshold and the sooner we encounter the ohmic mode. Put another way, instead of charging the cap @1A from 0v to 3.4v (=5-1.6) and then taper off the current (as in the example I linked to before), it'll charge at the current only from 0v to 1v (=5-4) and start tapering off thereafter.Nota voltage dropout per se but worth keeping in mind.

author: jwet
author_rank: Frequent Contributor
timestamp: September 29, 2024, 11:18:56 pm
content: You could use a PMOS and avoid some of this but take on some other funny issues in a different direction. The road goes on forever.Like I said before, there are several ways to skin this cat... as there usually are. This is why good engineers demand such incredible dough!Keep it simple.

author: just4user
author_rank: Contributor
timestamp: September 30, 2024, 04:17:23 am
content: Dishonest mechanics and stupid doctors demand even more though. Engineering is quite underpaid IMO.