EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: texane on October 20, 2009, 10:39:09 pm

Title: RC constant measurement
Post by: texane on October 20, 2009, 10:39:09 pm

I am learning about caps and how to measure
their charging/discharging time, esp. in a DC
circuit where there is a cap in serie with a resistor.
The RC constant is r * c and is the time a cap gets
charged at ~ 63 % its final value. Multiplying it
by 5 would give an approximation of the charing

With a circuit of my own, I measured the discharing
time of differents RC configurations in order to
verify the above approximations. Here they are:

For a ceramic cap, 100 pico Farads:

resistor(ohms) | measured time (usecs) | 5 * RC constant
100k 50 50
200k 400 100
235k 432 162
470k 512 235

For a ceramic cap, 100000 pico Farads:

resistor(ohms) | measured time (usecs) | 5 * RC constant
3.9k 1856 1950
10k 4416 5000
175k 85200 87500
470k 199300 235000

While the second table seems coherent (except for the last value),
the measured values in the first table greatly differ from the expected
ones. My conclusion: as capacity decreases and resistor value increases,
the measured time and the expected one diverge more  and more.
Do you have any clue about that? Caps rating are not accurate as they
decrease? A friend of mine once told me high resistors are capacitive,
can it explain the divergence?

Thanks for helping,


Title: Re: RC constant measurement
Post by: jlcstrat on October 21, 2009, 08:35:20 pm
Did you change anything about the setup between the two test as far as component placing?  Capacitance can be elusive sometimes...Breadboards add  some, component lead proximity, etc.
Title: Re: RC constant measurement
Post by: texane on October 21, 2009, 10:00:26 pm

I did not change the placement.
Breadoard is the same and the
pins sizes are roughly the same.


Title: Re: RC constant measurement
Post by: jimmc on October 21, 2009, 10:17:46 pm
I do not believe that your strange results are caused by the components being non ideal.
I suspect that there is a problem in the way that you are measuring the discharge waveform.
Ignoring the 100K result for the moment, the 100pF results would be consistent with a fixed delay of about 300uS  in the measuring system.
This would give

         measured          5T
100K     50???             50
200K     100 + 300      100
235K     132 + 300      162
470K     212 + 300      235

The 10,000pF (10nF) & 470k result is probably low because of loading by the measuring equipment.

Can you tell us how you are doing the measurement?

Title: Re: RC constant measurement
Post by: texane on October 22, 2009, 06:24:25 pm

You are right regarding the constant, I
didnot notice it. I use a very inaccurate
home made circuit to test the discharging
time, not a waveform...

Basically, I have a pic18f whose one pin
is linked to a switch I can use for starting
the measurement AND the discharge. The
measurement is done by programming the
pic comparator so that it reports a timer
value as the voltage reaches ~ 0.05v, the
capacitor being considered as discharged.

The constant can come from the switch resp
time, the comparator latency... I will investigate
about this.

Again, I have no way to analogically measure
what I want, and this is why I use such a
crappy method. Any idea welcome :)

Thanks for replying,

Title: Re: RC constant measurement
Post by: jimmc on October 23, 2009, 11:09:16 am
A recap of maths first:
The equation for the discharge of a capacitor (C) through a resistor (R) is given by v = V.exp(-t/T) where T is the time constant (= R.C). Solving the equation for t/T gives t/T = ln(-v/V) where ln is the natural logarithm.  The first derivative of exp(x) is exp(x) ie the slope of the curve at any point is equal to the value at that point.

Back to the circuit:
Assuming an initial voltage (V) of 5v, when the voltage has dropped to 50mV, v/V =.01 so t/T =ln(-.01) = 4.6
ie the discharge from 5v to 50mV should take place in 4.6 time constants.  The slope of the discharge curve at this point wil be 50mV per time constant so a small voltage error will cause a relatively large error in the measured time.  It would be better to measure at 1.84v (v/V = 0.368) where t = T and the slope is 1.84v per time constant.

On a practical note are you using a mechanical switch?
If so remember that there will be contact bounce for a significant period (typically in the order of 100uS to 10mS) which will cause significant errors.  Maybe you could use an output of the PIC to switch form 5v to 0v, it shouldn't introduce significant errors for resistors above 10k.
Finally 100pF as a bit small, your method will work better with larger values (longer times).

Good luck