RC constant measurement - Page 1
Forum section: electronics / beginners

author: texane
author_rank: Regular Contributor
timestamp: October 20, 2009, 10:39:09 pm
content: Hi,I am learning about caps and how to measuretheir charging/discharging time, esp. in a DCcircuit where there is a cap in serie with a resistor.The RC constant is r * c and is the time a cap getscharged at ~ 63 % its final value. Multiplying itby 5 would give an approximation of the charingtime.With a circuit of my own, I measured the discharingtime of differents RC configurations in order toverify the above approximations. Here they are:For a ceramic cap, 100 pico Farads:resistor(ohms) |measured time (usecs) |5 * RC constant100k5050200k400100235k432162470k512235For a ceramic cap, 100000 pico Farads:resistor(ohms) |measured time (usecs) |5 * RC constant3.9k1856195010k44165000175k8520087500470k199300235000While the second table seems coherent (except for the last value),the measured values in the first table greatly differ from the expectedones. 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 theydecrease? A friend of mine once told me high resistors are capacitive,can it explain the divergence?Thanks for helping,Regards,Fabien.

author: jlcstrat
author_rank: Newbie
timestamp: October 21, 2009, 08:35:20 pm
content: 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.

author: texane
author_rank: Regular Contributor
timestamp: October 21, 2009, 10:00:26 pm
content: Hi,I did not change the placement.Breadoard is the same and thepins sizes are roughly the same.regards,fabien.

author: jimmc
author_rank: Frequent Contributor
timestamp: October 21, 2009, 10:17:46 pm
content: 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 givemeasured 5T100K 50??? 50200K 100 + 300 100235K 132 + 300 162470K 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?Jim

author: texane
author_rank: Regular Contributor
timestamp: October 22, 2009, 06:24:25 pm
content: Hi,You are right regarding the constant, Ididnot notice it. I use a very inaccuratehome made circuit to test the dischargingtime, not a waveform...Basically, I have a pic18f whose one pinis linked to a switch I can use for startingthe measurement AND the discharge. Themeasurement is done by programming thepic comparator so that it reports a timervalue as the voltage reaches ~ 0.05v, thecapacitor being considered as discharged.The constant can come from the switch resptime, the comparator latency... I will investigateabout this.Again, I have no way to analogically measurewhat I want, and this is why I use such acrappy method. Any idea welcomeThanks for replying,Fabien.

author: jimmc
author_rank: Frequent Contributor
timestamp: October 23, 2009, 11:09:16 am
content: 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.6ie 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 luckJim