Go Down

Topic: super-cap charger circuit (Read 583 times) previous topic - next topic

tjones9163

Jun 15, 2019, 04:38 pm Last Edit: Jun 15, 2019, 04:38 pm by tjones9163
Hello, i am looking into building a Super-capacitor charging circuit from the site https://circuitdigest.com/electronic-circuits/supercapacitor-charger-circuit-diagram
Here's what I know about the circuit according to the site.
12v goes through D3 and R8 to ground to let you know the circuit is getting power.
12v also feeds the input of the lm317 and puts out 5.3v regulated voltage on the output, according to the resistor feedback circuit.
R3 and R4 form a voltage divider that puts 4.86v on the non-inverting input of the amplifier when the reference voltage placed on the positive plate of the capacitor is fed into the inverting input.
So normally let's say with a dead cap, the non-inverting input will be higher than the CAp voltage and the amplifier will turn on the N-channel MOSFET, allowing current o flow from the drain of the MOSFET and out of the collector to charge the capacitor.
When the capacitor reaches higher than 4.86 volts it will put the output of the amplifier low, turning off the Gate of the Mosfet and at the same time turns on the PNP transistor Q2 lighting the Green LED to let you know that the Capacitor is charged.
Is how i explained it correct?
Thanks

ReverseEMF

#1
Jun 15, 2019, 06:27 pm Last Edit: Jun 15, 2019, 06:38 pm by ReverseEMF
Well, first, I wouldn't call the voltage on the positive terminal of the Super Cap the "Reference Voltage".  The voltage on the Non-Inverting input of U2:A is what I would call the "Ref Voltage", and I would call the Cap voltage, the "Sense Voltage".

12v also feeds the input of the lm317 and puts out 5.3v regulated voltage on the output, according to the resistor feedback circuit.
More like 5.4V

1.25V/1K = 1.25mA
3.3k*1.25mA = 4.13V
4.13V + 1.25V = 5.38V


R3 and R4 form a voltage divider that puts 4.86v on the non-inverting input of the amplifier when the reference voltage placed on the positive plate of the capacitor is fed into the inverting input.
The voltage on the Non-Inverting input will be 4.86V, regardless of what voltage is applied to the Inverting input -- as long as the voltages are within proper operating ranges.

...allowing current o flow from the drain of the MOSFET and out of the collector to charge the capacitor.
Nope.  Out of the Source of Q1.  In other words, current [conventional current] will flow through Q1 from the Drain, to the Source, and out of the Source, into the Super Cap.  Also, there is no "Collector" involved.  Also, I wouldn't even do it this way.  I would either use a P-Channel MOSFET, or an N-Channel, and place it between the Super Cap negative terminal, and ground [Drain to Super Cap neg, and Source to ground].  Especially since the worst-case Gate Threshold is 4V, and that doesn't allow much head room with the current circuit.


...and at the same time turns on the PNP transistor Q2 lighting the Green LED...
Actually, Q2 should be an NPN transistor.  Unless the idea is to use the BE junction as a Zener, but then, there would be no inversion, so the LED would light when Q1 is ON, not when it's OFF.


Other than that, pretty much correct.
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

tjones9163

Actually, Q2 should be an NPN transistor.  Unless the idea is to use the BE junction as a Zener, but then, there would be no inversion, so the LED would light when Q1 is ON, not when it's OFF.



Thank you  for the response, nut isnt Q2s base normally pulled high by 10k resistor and only when the output of the amplifier is LOW can it be activated?

ReverseEMF

... nut isnt Q2s base normally pulled high by 10k resistor and only when the output of the amplifier is LOW can it be activated?
Huh?!?
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

JCA79B

#4
Jun 16, 2019, 12:19 am Last Edit: Jun 16, 2019, 12:30 am by JCA79B
The base of Q2 is pulled LOW by pin 7 of U2-A, turning OFF Q1 and the LED.
http://www.ti.com/lit/ds/symlink/lm311.pdf
Notice LM311 output is open collector, it's either conducting to ground or high Z.

tjones9163

The base of Q2 is pulled LOW by pin 7 of U2-A, turning OFF Q1 and the LED.
http://www.ti.com/lit/ds/symlink/lm311.pdf
Notice LM311 output is open collector, it's either conducting to ground or high Z.
Thank you for the response, but dont PNP transistor get activated by pulling the base to ground?

JCA79B

#6
Jun 16, 2019, 12:50 am Last Edit: Jun 16, 2019, 12:55 am by JCA79B
Pulling LOW means connecting to ground. I don't think that LED circuit is correct. If R9 were connected between Q1 gate and the TOP of the LED it MIGHT work?

JCA79B

#7
Jun 16, 2019, 01:11 am Last Edit: Jun 16, 2019, 01:40 am by JCA79B
I think I see it now, Q2 is drawn upside down, when LM311 output pulls LOW, current will flow from +12V into Q2 emitter (should be at top), out collector (at bottom), through R6 and LED. I think.   :smiley-confuse:
Like This?

herbschwarz

Hi All,
JCA is correct: Q2 must be connected correctly so that it can turn ON!
Also, it would be better to interchange the values of R6 & R7. Now,
look at the gate of Q1: R5 & R9 form a voltage divider so the gate
rests at 6V while U2:A is off. The Vgs(on) will keep the super cap
from taking a full charge. (How can messed-up schematics like
this be published?)
Herb

Smajdalf

The whole circuit from the linked page is poor. For example I see no reason for the MOSFET part of the circuit. For charging supercaps a switching voltage regulator is much better. But if you can waste the huge amount of energy and are able to withstand the heat safely linear regulator may be used:
Set output voltage of the LM317 to a value safe for the supercap. Add a current limiting resistor between 12V and input of the LM317. If you want a "charging complete" indicator simply use a comparator to turn on the LED when voltage over the resistor is sufficiently small.
How to insert images: https://forum.arduino.cc/index.php?topic=519037.0

ReverseEMF

#10
Jun 17, 2019, 07:49 am Last Edit: Jun 17, 2019, 07:49 am by ReverseEMF
Thank you for the response, but dont PNP transistor get activated by pulling the base to ground?
Wrong way of thinking of it.  BiPolar transistors are current amplifiers.  A certain amount of current flowing through the Base-Emitter junction [in terms of conventional current, from Base to Emitter for an NPN, and from Emitter to Base in a PNP] allows a greater amount of current to flow from the Collector to the Emitter, in an NPN, or from Emitter to Collector in a PNP.  In other words, a large Collector current can be controlled by a smaller Base current.  There's more to it than that, but that's the gist.
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

MorganS

Quote from: Xibit
You dude! I herd you like voltage regulators so I put a voltage regulator in your voltage regulator!
Worse than that. The reference voltage provided by resistors R3 and R4 comes from a presumably unregulated source. If you plug this thing into a 13.8V battery (very common for lead-acid batteries) then the reference voltage is out of specification. The problem mentioned right at the end of the article is due to this unregulated reference.

If the goal is voltage regulation then just set R1 and R2 to the voltage you need and leave the rest of the circuit out.

Supercapacitors are tricky beasts. I did a lot of work last year on designing a supercap to act as a load support when switching batteries in a system where there could be hundreds of milliseconds between batteries. The biggest problem is limiting the inrush current. The circuit shown is abusing the LM317 and exceeding its current rating. But only for a short period. Add a bigger supercap like 7F and you'll see the LM317 cook.

I built a lot of different circuits. I started with just resistors limiting the inrush current and a regular diode to bypass the resistors while the supercap is delivering current. With a lot of calculation and simulation of the inrush power and making some guesses on how much power a power resistor could handle for a short period, I got a good result.

Then I tried to use a MOSFET to eliminate the diode. There is a circuit called an "ideal diode" that is useful for this.

Then I used the MOSFET in linear mode to charge the supercap. I ended up with a design which still had resistors but it split the power dissipation 50-50 between the resistors and MOSFET. That design when through a lot of variations with a "current mirror" circuit and more.

The penultimate version used a LTC3824 switching regulator to charge the capacitor. This is much more efficient than resistors or transistors. At the start, when the capacitor voltage is low, it could draw only 1A from the supply but charge the capacitor at 5A. I spent many many house with LTSpice simulating this configuration. Then many more hours worrying over the PCB layout.

The final version, which I did not build, was intended to use a dedicated supercapacitor charger/discharger chip. This would be able to boost the output voltage and extract more energy from the supercap. The LTC335i has a lot of functions dedicated to this task. Unfortunately I spent too long trying to get it to fit on a 2-layer PCB when it really needed a 4-layer PCB.
"The problem is in the code you didn't post."

ReverseEMF

#12
Jun 18, 2019, 07:40 am Last Edit: Jun 18, 2019, 07:41 am by ReverseEMF
Supercapacitors are tricky beasts ... The biggest problem is limiting the inrush current.
Yes. A discharged capacitor behaves like a short.  And a discharged SuperCap behaves like one-hell-of-a-short!  So, the trick is to supply it with a source that has a very low, matching impedance, at the beginning of the charge cycle.  The best way to do that is with a current source.  A current source has an intrinsically low impedance.  That's what makes it a current source.  And, a current source capable of charging a SuperCap can be made by using an inductor to kick charge into the SuperCap at as high a frequency as possible.  A fully "charged" inductor is a low impedance source, and if that inductor is made to discharge into the SuperCap, it's a perfect marriage [with the proper selection of components vs frequency of operation, of course].
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Smajdalf

#13
Jun 18, 2019, 04:45 pm Last Edit: Jun 18, 2019, 04:46 pm by Smajdalf
I did not find suitable circuit on the internet so I made one (untested but I am sure it will work much better then the original one):


R3 MUST be power resistor. Since dropout of LM317 is about 2V connecting a discharged cap will cause 10V over R3. So its value should be 10/(maximum allowable current) Ohm. The maximum safe current for LM317 is about 1A so R3 should be at least 10 Ohm. If power source is rated for less current, R3 must be increased accordingly. I.e. for 500mA power source it should be at least 20 Ohm. Also the power rating is important. Maximum dissipation in R3 is 100/R3 W. It is 10W for 10 Ohm resistor. A huge resistor is needed to survive this!
R5+R6 sets LM317's output voltage as usual. LM317 needs minimal load current of 10mA, this divider MUST be able to sink this current. Since there will be 1.25V over R5 its value MUST be 100 Ohm or less. Otherwise output of LM317 may get out of regulation possibly destroying the supercap.
R1+D1, R2+D2 and R4+D4 are optional for monitoring of the charging. If R4+D4 is used it will inject additional current to LM317's output which must be also consumed by R5+R6 - I think for this reason it is better to use R2+D2 instead.
C1 should be used for LM317's stability according to the datasheet.
In case the supercap is charged and connected and power source is disconnected, the supercap may discharge into the power supply via LM317 possibly damaging the regulator. The R3 may be enough to protect LM317 but adding D3 "to be safe" cannot hurt.
How to insert images: https://forum.arduino.cc/index.php?topic=519037.0

MorganS

That looks like a much better circuit. And a good explanation of it too.

The wattage on R3 does not have to be equal to the peak watts. The peak current is only for a short time.
"The problem is in the code you didn't post."

Go Up