Capacitor with parallel & series Resistors charged with Constant Current source

Thread Starter

Bedros

Joined Jul 22, 2014
5
Given the circuit shown in the attached picture, of a constant current source (i) with a series switch to a load consisting of a resistor (P) in parallel to a capacitor (C) and resistor (S) in series. Assuming the voltage across the capacitor is initially 0; what is the equation describing the voltage across the resistor P with respect to time, assuming the switch is closed at time=0? I used Thevenin equivalent and got V(t)=iP*(1-(e^(-t/RC)* (1-S/R))) where R=P+S; but when I build and test the circuit with real components the results do not match the equation I got. The real circuit measurements match my equation only when S=0, otherwise they do not match. –
 

wahab ayad

Joined Jul 20, 2014
2
hi
in your examble the circuit is supplyed by constant current are you mean dc source ?
if dc source then the is constant so v(t)=vdc.
could you please distinguish the relation chip between cnstant current and time voltage.
best regards
 

MrAl

Joined Jun 17, 2014
11,474
Given the circuit shown in the attached picture, of a constant current source (i) with a series switch to a load consisting of a resistor (P) in parallel to a capacitor (C) and resistor (S) in series. Assuming the voltage across the capacitor is initially 0; what is the equation describing the voltage across the resistor P with respect to time, assuming the switch is closed at time=0? I used Thevenin equivalent and got V(t)=iP*(1-(e^(-t/RC)* (1-S/R))) where R=P+S; but when I build and test the circuit with real components the results do not match the equation I got. The real circuit measurements match my equation only when S=0, otherwise they do not match. –

Hi,

Maybe you just made an error somewhere while doing the calculations, or else you did not view the network requirements correctly.

Starting with the equivalent voltage source we have:
Vx=I*P

and now P and S are in series so we have:
R=P+S

The circuit is now a voltage source Vx and resistance R and cap C, so the cap voltage is:
Vc=Vx*(1-e^(-t/RC))=I*P*(1-e^(-t/RC))

Up to this point it should be clear why we did all that.

Next, we want to calculate the voltage across the two resistors in series, and the voltage is just the difference between the input source voltage Vx and the cap voltage Vc:
Vps=Vx-Vc

and substituting what we had for these two we get:
Vps=Vx-Vc=I*P-I*P*(1-e^(-t/RC))

and that is the floating voltage across P and S.
Since that's the voltage across P and S and we want the voltage from the junction of P and S to ground, we calculate the voltage of that node Vjps as:
Vjps=Vps*S/(P+S)+Vc

where it should be clear that we multiplied Vps by S/(P+S) so we could get the node voltage referenced to the cap voltage, and then added the cap voltage so that we could get the node voltage referenced to ground. (Note we could have worked it from Vx instead but this seemed more direct in line with our usual from-the-ground-up way of thinking).

Substituting what we had already into Vjps we get immediately:
Vjps=(I*P-I*P*(1-e^(-t/RC)))*S/(P+S)+I*P*(1-e^(-t/RC))

and after simplifying this, we end up with:
Vjps=(I*P*(S+P-P*e^(-t/RC)))/(S+P)

and that is the time equation for the junction of P and S referenced to ground in either the original circuit or the circuit with the equivalent voltage source.
Optionally you may wish to change the form of this last equation a little to fit your liking for example:
I*P*(1-(P*e^(-t/RC))/(S+P))
or:
I*P*(1-(P/(S+P))*e^(-t/RC))
or even:
I*P*(1-(P/R)*e^(-t/RC))
and for one last one:
(I*P^2/R)*(R/P-e^(-t/RC))
 
Last edited:

Thread Starter

Bedros

Joined Jul 22, 2014
5
Thank you very much for your help. I will try the equation against the real circuit and let you know if it matches the data.
Again I appreciate your help.
 

MrAl

Joined Jun 17, 2014
11,474
Thank you very much for your help. I will try the equation against the real circuit and let you know if it matches the data.
Again I appreciate your help.

Hi,

You're welcome.

If the equations do not match the data, then something about the real life circuit would have to be different than the circuit we used to get the equations.

Be sure to allow some margin of error due to component tolerances, especially the capacitor. If we need to we can calculate error bounds if we know the real life tolerances on all the parts.
 

Thread Starter

Bedros

Joined Jul 22, 2014
5
Hi
I have attached a simplified diagram of the circuit I am using. Essentially I am testing the Series Parallel Resistors and Capacitor. The test is performed by using a microprocessor to start charging the Unit Under Test (UUT) with a constant current of 2uA, and measuring the time it takes for the voltage across the UUT to reach three different voltage reference values. Then using the equations we have been discussing I try to equate the time it has taken to reach the various voltages to the values of P, S and C.
With the equation I had as well as the ones you derived the values for S and C come out fine. However the value for P fits the equations only when S=0;
otherwise the larger S is, the smaller computation for P.
That is why I asked the original question. I compensate for the offset voltages of the comparators and still get the same results.

At this point I am not looking at the accuracy rather if the equations are working.

If I vary the value of C, only the computations for C appropriately change and they are essentially correct.
If I vary value of P, only the computations for P appropriately change, but they are correct only if S=0.
If I vary the value of S, the computations of S change appropriately and they are essentially correct, however when S is increased the computation of P decreases and when S is decreased the computation of P increases.

I must be missing something in the equations?

Regards,
Bedros
 

Attachments

Last edited:

MrAl

Joined Jun 17, 2014
11,474
Hello again,

First off, when you said you had a problem with your equation i had assumed that you determined already that there was a problem with the way you wrote the equations. However, comparing your equation to mine i find that they are both the same, just in different forms. That means that your original equation was correct all along.

Now i can start to see what the problem might be. You are using measurement instruments and test parameters that can easily skew the results.

For example, 2ua is comparable to most uC chip leakage pin currents. The leakage could be 1ua plus or minus. That could easily mess up the readings just because of that alone. Depending on the component values we could also see results off by huge amounts.
Also, capacitor ESR could very well mess up the readings if S is comparable to the ESR of the capacitor. If the test resistance was 1 ohm and the ESR was 1 ohm we would be using an equation for a circuit with 1 ohm yet making measurements with a circuit that contained a 2 ohm resistor...cant expect very good correlation there.

What else i need to know at this point is what is the range of values you are using for P and S and C. Also the tolerance of those components and any tolerance associated with the regular measurement of those component values if you have tested them beforehand.

If you could increase the test current to a higher value you may see the readings improve. This would indicate that the pin leakage or even the cap leakage could be affecting the readings.

Try increasing the current and see if you can find a systematic improvement in the readings. Also, report back here about the component values and tolerances, and what type of capacitors you are using, and how you test the capacitor value to find out what it is before you run the tests.
 
Last edited:

Thread Starter

Bedros

Joined Jul 22, 2014
5
Hi,
The microprocessor is not directly connected to the UUT.
The comparators are MCP6569 with 1pA input bias current each.
The switch “SW1/2” is MAX4618 with 1nA leakage current each.
I have measured the actual values of the C’s and R’s before I substitute them in the UUT circuit.
The capacitor “C” is ceramic of type C0G NP0, low ESR, for the test I am varying the values from 20 to 200 nF.
The parallel resistor “P” is varied from 10MOhm to infinity.
The series resistor “S” is varied from 0 to 500KOhm.
I am not looking for exact measurements but general performance in the correct ranges. For example I have determined that with infinite P; the comparator and analog switch present a parallel resistance due to leakage equivalent to about 35 to 40 Mega Ohms.

1) If the UUT is (P infinite S=0 and C=47 nf). The measurements compute essentially the same values: P=37Mohm S=5KOhm C=46.5nF.

2) Then if I change P to 13.6MOhm (P=13.6M S=0 and C=47 nf), the measurements compute P=11Mohm S=5KOhm C=46.5nF. Here P seems as expected, 11M being the approximate parallel of 13.6M and 37.5M

3) Then if I change S to 200KOhm (P=13.6M S=200KOhm and C=47 nf), the measurements compute P=7Mohm S=206KOhm C=46.5nF. Of course here I expect P=11Mohm like it was in step 2.

4) If I now put P back to infinity (P infinite S=200KOhm and C=47 nf), the measurements compute P=19Mohm S=206KOhm C=46.5nF. Of course here I expect P=37Mohm like it was in step 1.

So the computations of P in steps 3 & 4 are what puzzle me.

Regards,
Bedros
 

MrAl

Joined Jun 17, 2014
11,474
Hello again,

Well, when the resolution of the measurements are not good enough to calculate the true values we might get large errors.

But first, i did not realize that you were trying to calculate all three values from one measurement. Is that really what you are doing?

Also, we did not talk about any formulation to calculate P, S, and C yet we just talked about calculating the voltage of that one node, so what formulas are you using to calculate these values?
 

Thread Starter

Bedros

Joined Jul 22, 2014
5
Hi,
Since I know the voltage and can measure the time to reach the voltage, I calculate either P,S or C using the other two.
Regards
Bedros
 

MrAl

Joined Jun 17, 2014
11,474
Hi,
Since I know the voltage and can measure the time to reach the voltage, I calculate either P,S or C using the other two.
Regards
Bedros

Hi again,

Oh ok good, you scared me there for a minute :)
I thought maybe you wanted to calculate all three values from one measurement and was thinking, that isnt going to happen.

Knowing two of the three sounds reasonable. In fact, if you allow enough time to pass before you measure the voltage, you will know P from a simple calculation:
P=V/I
where I is your applied constant current and V is the voltage measurement after a relatively long time has passed. That's because after about 5 time constants the value of V will have reached very nearly the value caused by P alone, so P is easy to calculate that way.

If your calculations are not working even after accounting for the pin leakages and pin capacitance then something else in the setup is still missing. Some error is being introduced and you'll have to find out what it is. You can sometimes find out by changing some operating parameters and seeing what causes an increase or decrease in accuracy, then trying to find out what you could do to the theoretical circuit to get that same effect and that will be what is missing.
For example, you seemed to have included the leakage current of the pin and that was converted into a constant resistance of rather high value (20M range). Inserting that into the network and then redoing the network equation would solve the problem IF the following were true:
1. There was leakage found on only one pin and it is comparable to the other currents in the network.
2. This leakage could really be represented as a constant resistance.

Are we sure the leakage can be represented as a constant resistance? If the leakage current was constant then it would have to be represented as a constant current source. So instead of adding a large resistor you would have to add a small constant current source.
To find out you might try measuring the pin leakage with various input voltages. If it does not obey i=v/R then it can not be represented as a resistance (R a constant).
This just gives you some idea what you have to do in order to improve the measurements and calculations.

Just another quick note...
If the measurement time is comparable to the ADC acquisition time then the internal capacitor is still changing while the measurement signal is fairly constant. A common remedy for this is to use a sample and hold circuit, although that brings in other complications too of course. But the main point is you probably have to check and compare these times to determine if the ADC is getting enough time to make a good measurement.
 
Last edited:
Top