# Capacitor charging indicator

#### Illum

##### Well-known member
Hello, I've hit a snag on a circuit design again and after 2 weeks of fruitless searching I decided to post a thread on it.

I need a circuit that will keep an LED on when a super capacitor is charging and turn that LED off after the charge current falls below a certain threshold, indicating that bulk charging has now been completed.

Conventionally, my circuits involving super caps have used this simple circuit to tell me whether the charging has been completed: Input of 2.5V at 1A, a 2N3906 PNP, a red LED, and a "Sense Resistor"
The sense resistor follows the equation Rsense = Vbe/If, Vbe = 0.6V. With a 6.8R resistor the charge current remains 1A and falling steadily until about 80mA, where the LED then turns off, telling me that my capacitor is done charging. This proved to be a wonderful feedback design for circuits using 10F to 50F capacitors. Coupled with a bi-colored LED [3-pin, common cathode] it will light "amber" on my control panel while its charging and stay "green" after the charging is done.

Now, my current predicament is giving me alot of trouble. I am charging 500F [that is five hundred Farads] at 2.5V with a maximum input current in excess of 2.5A. Using the same circuit as above, a cutoff threshold at 100mA will require a 6 ohm resistor that is capable of dumping close to 40W of heat during the first several seconds of bulk charging. I know of no resistors that can fit the enclosure in which I intend to use. Any ideas?

I wanted to use this circuit instead: Source: http://www.seekic.com/circuit_diagram/Basic_Circuit/DC_Current_Indicator_6.html

However, I can't find the right resistor values for an input of 3.3V as opposed to 12V. EDIT: Just realized my converter can only put out 1A at 2.5v... Been depending on the bench supply fir too long Last edited:

#### MikeAusC

##### Well-known member
Using Vbe sensing is simple, but not very efficient at high currents.

The ACS range of ground-independant current sensors produce ground-referred volts proportional to current and cost a few dollars. They're available in a range of currents. e.g. http://dx.com/p/166425

#### MikeAusC

##### Well-known member
Or use the TI INA200 - less than 1% error with a 50mV sense resistor and has a Comparator with Reference built into the chip to drive the LED.

#### SemiMan

##### Banned
Using Vbe sensing is simple, but not very efficient at high currents.

The ACS range of ground-independant current sensors produce ground-referred volts proportional to current and cost a few dollars. They're available in a range of currents. e.g. http://dx.com/p/166425

That unit is +/- current and is not ground referenced, but referenced (approximately) to Vcc/2. Emphasis on the approximately. It needs a 5V supply as well.

As well, the op needs to "step down" the voltage from 12 to 2.5

Semiman

#### SemiMan

##### Banned
Just use a MOSFET or bipolar as your "resistive" element, essentially a linear regulator.

Since you do not need a ton of accuracy, you could use a sensefet for your pass element and sense element.

Semiman

#### Steve K

##### Well-known member
How about a low value sense resistor feeding into an op-amp set up as a differential amplifier (which will produce an analog output voltage proportional to current), and feed that into a comparator that uses a reference voltage to detect when the current is above or below the threshold level? This would allow minimal power dissipation in the sense resistor, and the circuitry could operate from 3.3 or less.

The only downside is that you need to know enough to select parts, values, and circuit arrangement/design.

#### MikeAusC

##### Well-known member
. . . or just buy one INA200 and it's all designed for you and all on one chip.

Last edited:

#### MikeAusC

##### Well-known member
The discovercircuits solution certainly is simple and it enables a lower voltage across the shunt, by lowering the switch threshold voltage by biassing the input closer to the 0.6 volts sensed by the transistor.

It will be subject to temperature drift, but here you're not concerned about an accurate measurement.

To convert the design to 3.3 volts, you just need to change two resistors to maintain the same current.

R5 was 4.7k with 11.4 (12-0.6) volts across it, so with 2.7 (3.3-0.6) volts across it now, you need 4.7x2.7/11.4= 1.2k.

For R2, just use the same resistor you've been using to feed your LED currently.

Last edited:

#### Steve K

##### Well-known member
. . . or just buy one INA200 and it's all designed for you and all on one chip.

I hadn't looked at the datasheet, but after looking through it, it does look just about perfect for this application.....

#### Illum

##### Well-known member
Oh :wow:

Forgot to suscribe to my own thread :shakehead: As well, the op needs to "step down" the voltage from 12 to 2.5

Got that covered I had a couple Recom R-782.5-1.0 converters left over from a previous order.

Or use the TI INA200 - less than 1% error with a 50mV sense resistor and has a Comparator with Reference built into the chip to drive the LED.

Looks interesting, except I'm not sure what or where does the output go. Where would the LED connect to? CMPout? It appears that the output voltage posseses a linear relationship with the current across the sense resistor. So in term the LED if connected directly would fade slowly on or fade slowly off. Is that why the comparator is there?

. . . or just buy one INA200 and it's all designed for you and all on one chip.

yeah... :thinking:
Except I'm lost in the calculations whenever I pull up the datasheet, looks interesting but, I'm not sure this demonstrative capacitor flashlight circuit needs a current sense circuit that has collectively more parts than the rest of the circuit.

It will be subject to temperature drift, but here you're not concerned about an accurate measurement.

To convert the design to 3.3 volts, you just need to change... R5 was 4.7k with 11.4 (12-0.6) volts across it, so with 2.7 (3.3-0.6) volts across it now, you need 4.7x2.7/11.4= 1.2k.

I found this part out eventually, but :thanks: for confirming it. The basic potential divider equation is relatively easy to comprehend, only the one in the discovercircuits that has 10K and 2.7K is not ground referenced but instead supplied by a input of 11.4V. I had no idea and still have no idea how 10K and 2.7K is solved for the equation. I'm moderately certain the 10K is some sort of a pull up to keep the PNP off but I'm not sure what the 2.7K is for.

Last edited:

#### SemiMan

##### Banned
Oh :wow:

Forgot to suscribe to my own thread :shakehead: Got that covered I had a couple Recom R-782.5-1.0 converters left over from a previous order.

Looks interesting, except I'm not sure what or where does the output go. Where would the LED connect to? CMPout? It appears that the output voltage posseses a linear relationship with the current across the sense resistor. So in term the LED if connected directly would fade slowly on or fade slowly off. Is that why the comparator is there?

yeah... :thinking:
Except I'm lost in the calculations whenever I pull up the datasheet, looks interesting but, I'm not sure this demonstrative capacitor flashlight circuit needs a current sense circuit that has collectively more parts than the rest of the circuit.

I found this part out eventually, but :thanks: for confirming it. The basic potential divider equation is relatively easy to comprehend, only the one in the discovercircuits that has 10K and 2.7K is not ground referenced but instead supplied by a input of 11.4V. I had no idea and still have no idea how 10K and 2.7K is solved for the equation. I'm moderately certain the 10K is some sort of a pull up to keep the PNP off but I'm not sure what the 2.7K is for.

The 10K and the 2.7K together form a voltage divider fed by the forward voltage of the 1N4148. That divided voltage plus the drop across the sense resistor is what is on the base of the transistor and what turns it on. It is all referenced to the positive rail, so the input voltage really does not matter that much, though R2 and R5 should be scaled accordingly for consistent operation.

Semiman

#### MikeAusC

##### Well-known member
. . . . The basic potential divider equation is relatively easy to comprehend, only the one in the discovercircuits that has 10K and 2.7K is not ground referenced but instead supplied by a input of 11.4V. I had no idea and still have no idea how 10K and 2.7K is solved for the equation. I'm moderately certain the 10K is some sort of a pull up to keep the PNP off but I'm not sure what the 2.7K is for.

Because the current sensing resistor is in the positive rail, you're better off thinking of everything referred to the positive rail.

Think of D1 as 0.6 volt Zener Diode being biassed on by R5.

R4 then puts a permanent current through R3 so that it always has 0.5 volt across it. Now when the shunt has 0.1 volt across it, Q1 starts to conduct - previously it needed 0.6 volt drop across it to get Q1 to conduct and light the LED.

If you really want to use the INA200, I can work out the component values for your application.

#### Illum

##### Well-known member I'm still lost on the R3 and the R4

In a conventional potential divider Top resistor = 2.7K bottom resistor 10K with an input bias of 11.4V will yield around 8.9V where the transistor base sees. So where exactly did their 11.5V come from?

I understand what the circuit is trying to do Semiman, but in terms of scaling it accordingly I have no idea because no equation I've used make sense beyond figuring out whats the new R5. I'm probably going to stick with this over the INA200, I have enough parts on hand to build this circuit many times over, and it keeps everything thru-hole.

Think of D1 as 0.6 volt Zener Diode being biassed on by R5.

R4 then puts a permanent current through R3 so that it always has 0.5 volt across it.

So with the circuit flipped upside down, it reads like this? If so, how does "Think of D1 as 0.6 volt Zener Diode being biassed on by R5." translate when the circuit is right side up? Somehow after years of working with transistors I'm completely stumped by this circuit.

Last edited:

#### MikeAusC

##### Well-known member
So with the circuit flipped upside down, it reads like this? If so, how does "Think of D1 as 0.6 volt Zener Diode being biassed on by R5." translate when the circuit is right side up? Somehow after years of working with transistors I'm completely stumped by this circuit.

No, you've got it wrong. R1 is 2.7k and R2 is 10k. So V2 is 0.6 x 10 /12.7 = 0.47v.

So when the Shunt resistor has 0.13 v across it, it will add to the 0.47v, giving 0.6 v across the Base-Emitter of the transistor.

#### Steve K

##### Well-known member
If this doesn't confuse things too much.. let me offer my two cents worth...

Going back to the original schematic, you can run the calculations without much trouble.
You know that you are generating 0.6v (approximately) across the two resistors in series. These are R3 and R4.
The current through R3 and R4 is given by: 0.6v / (10k + 2.7k), which simplifies to 47uA.
To find the voltage at the low side of R3, subtract the voltage drop across R3 from 12v, or: 12v - (47uA x 10k), or 11.5v

It's a nice circuit... instead of having to generate 0.6v across the sense resistor, the network creates 0.5v, and only requires about 0.1v to be generated across the sense resistor. I'll have to file this one away in case I need to use it myself. #### Illum

##### Well-known member
My brain fried running around in circles on this for a couple hours, decided tonight to try it again.

To find the voltage at the low side of R3, subtract the voltage drop across R3 from 12v, or: 12v - (47uA x 10k), or 11.5v

So far... Source: http://www.seekic.com/circuit_diagram/Basic_Circuit/DC_Current_Indicator_6.html

Code:
``````+R2+

{[Input] - [Q1 Vdrop] - [D2 Vdrop]} / [D2 forward current] = [R2]
{12V     - 0.6V       - 2V}         / 0.01                 = 940R ~1K

+R3, R4+

Know 0.6V across the two in series
[0.6V] / [R3 + R4]    = Current across R3 + R4
[0.6V] / [10K + 2.7K] = 0.047A ~ 47uA

R3 Low side, that is, the side connected to the base of the 2N3906
[Input] -  [I(R3) x R(R3)] = Voltage across R3
12      -  [0.047 x 10K]   = 11.5275V

+R5+

[Input] - [D1 Vdrop] = Voltage across R5
12      -  0.6V      = 11.4V

So for 3.3V input

3.3     -  0.6V      = 2.7V

[4.7k]/[11.4v] = [NewR5]/[2.7V], NewR5 = 1.1113K, ~1.2K``````

So I assume that R4 (2.7K)'s high side is the bottom end where its fed by R5 and the 4818.
Code:
``````[Input] -  [I(R4) x R(R4)] = Voltage across R4
11.4      -  [0.047 x 2.7K]  = 11.2731V``````

R2 at 0.05R with a 12V input equates to 240A forward current by ohms law, that's confusing as it is. Where does that 0.1V its supposed to generate computed?
Can someone just give me the values of R3 and R4 for 3.3V please? breadboarding didn't help at all 1K,

All the online tools for resistor dividers are referenced to ground,, I cannot find in this vast space called internet a calculator that can help me mathematically visualize whats going on in a divider referenced to the positive rail. Checked all my textbooks relevant to this subject and found not one example! I need to see the equation to understand it, and for the better part of me just keeps hitting that wall.  Last edited:

#### MikeAusC

##### Well-known member
. . . . All the online tools for resistor dividers are referenced to ground,, I cannot find in this vast space called internet a calculator that can help me mathematically visualize whats going on in a divider referenced to the positive rail. Checked all my textbooks relevant to this subject and found not one example! I need to see the equation to understand it, and for the better part of me just keeps hitting that wall. . . . . . .

Put the circuit diagram into image-editing software, turn the image upside down, enter that circuit into your modelling software . . . . . . or just use the answers I provided in Post #8.

#### Illum

##### Well-known member
Finally did figure it out.

I took this: converted into this: Original equation
Vout = [R2/(R1+R2)] x Vin

rearranged to
{VinA x [R2A/(R1A+R2A)]} + {VinB x [R2B/(R1B+R2B)]} = Vout

Simplify using R1A = R2B, R2A = R1B and ended up with:
[(VinA x R1B) + (VinB x R2B)]/(R2B + R1B) = Vout or [(VinA x R2A) + (VinB x R1A)]/(R1A + R2A) = Vout

Solving for VinA = 12V, R1B = 2.7K, VinB = 11.4, R2B = 10K got Vout = 11.5V

Of all the ways resistor dividers have been drawn and illustrated, surprisingly this image never showed up in any of my textbooks 