EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: Esposch T. Tapir on January 30, 2016, 01:00:14 am

Title: So, my RC time constant is not in fact proportional to R.
Post by: Esposch T. Tapir on January 30, 2016, 01:00:14 am
Not sure if this is a beginner's question, but I certainly feel embarrassed asking it.
4 years of engineering school and I have no idea what could be causing this behaviour!

Anyway, as mentioned in the title, I've simply tried to measure the capacitance of a "47nF" ceramic cap, by connecting it up to a 3.3V square wave through a resistor, measuring RC, then dividing by R.
And, really oddly, my measurements showed that the time constant was either not the direct product of R and C, or that C was changing significantly depending on R.

I took multiple measurements using multiple methods (automated software which would detect the time between the 2.5V and 1V passings, then dividing this value by R*ln(2.5), doing the same thing by hand, and also checking the time from when the signal first dropped to when it reached 37% of it's initial value) multiple capacitors, and multiple resistors over multiple days.

Here is an example.
(http://i.imgur.com/kRh3Lmd.png)

All of them showed the same thing:
The higher the resistance went, the lower the capacitance went!
The measured capacitance would be roughly the same as the rated capacitance when R = 50k to 100k, and it would be about double when R = 1k to 10k.

I understand that the components are non-ideal (they're voltage-dependent, have a tolerance and there is a parasitic L and R, at least), but can I really expect the measured capacitance to double when changing from a 5k to 50k series resistor?  Is that a normal thing that happens, or am I going insane!?

Thanks,
~Chris

(P.S. Yes, I did connect the circuit up in series with the cap to GND.)
Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: Rerouter on January 30, 2016, 01:05:07 am
First up, what is the signal source, you can be dealing with the dynamic resistance of what is switching high and low, and they may no be the same,

Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: Esposch T. Tapir on January 30, 2016, 01:34:13 am
First up, what is the signal source, you can be dealing with the dynamic resistance of what is switching high and low, and they may no be the same,

Signal source is a microcontroller DAC fed into an LM324.
The LM324 is basically your standard non-inverting opamp like here:
https://en.wikipedia.org/wiki/Operational_amplifier_applications#/media/File:Op-Amp_Non-Inverting_Amplifier.svg
 (https://en.wikipedia.org/wiki/Operational_amplifier_applications#/media/File:Op-Amp_Non-Inverting_Amplifier.svg)

R2 is a 3.3k, and R1 is 2 3.3ks in parallel (so, 1.65k).
However, there is a MOSFET (2N7000) between R1 and GND, so I can swap between unity gain and 3x gain through software.
The MOSFET was turned off when making these measurements (0V on gate).
Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: Andy Watson on January 30, 2016, 01:35:00 am
There is something amiss with your measurement system. Look at the first graph, I could believe the decay is exponential up to the 37% marker, but then it becomes almost linear down to the base line.

 The LM324, does it have a negative supply or is 0V the lowest voltage in your system?
Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: Rerouter on January 30, 2016, 01:37:42 am
Look at the datasheet for your op amp, Source is 40mA, Sink is 50uA, that is a problem,
Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: Esposch T. Tapir on January 30, 2016, 02:03:58 am
There is something amiss with your measurement system. Look at the first graph, I could believe the decay is exponential up to the 37% marker, but then it becomes almost linear down to the base line.

 The LM324, does it have a negative supply or is 0V the lowest voltage in your system?

No negative supply, but I don't think that'd be the big issue (especially because below).  Good catch on the shape of the graph, I just assumed it was "normal enough" for some reason.


Look at the datasheet for your op amp, Source is 40mA, Sink is 50uA, that is a problem,

Ahh, that would make a difference.  (I think I read +-40mA somewhere on the spec sheet and assumed that it could source and sink fairly evenly).
I'll try measuring using the rising edge instead and see if the results are more reasonable.
Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: uncle_bob on January 30, 2016, 02:18:20 am
Hi

Driving this sort of thing off of a CMOS gate output actually works pretty well. The high speed stuff has reasonably low output impedances. Make sure you get a part with "buffer" in the name. It should be set up to sink and source at least 24 ma. They are also
nice in that they drive very close to both supply and ground at low currents.

Bob
Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: Esposch T. Tapir on January 30, 2016, 02:32:32 am
Ahh, thanks for the tip, Bob!  I'm sure that little fact will come in very useful throughout the career!

And thanks for the solution, Rerouter.
Everything's working now (just changed three lines of code to make it find rising edges instead of falling.  Oddly, all of the measurements seem to be about 20-30% above rated capacitance, but this is constant across all measurements so I think I can deal with it).
Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: uncle_bob on January 30, 2016, 05:37:57 pm

Everything's working now (just changed three lines of code to make it find rising edges instead of falling.  Oddly, all of the measurements seem to be about 20-30% above rated capacitance, but this is constant across all measurements so I think I can deal with it).

Hi

Is the error also consistent across changes in R as well as C? If so, that suggests a time base error. If not that suggests an un-modeled chunk of source impedance.

Have Fun!

Bob
Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: Esposch T. Tapir on January 31, 2016, 11:37:30 pm

Everything's working now (just changed three lines of code to make it find rising edges instead of falling.  Oddly, all of the measurements seem to be about 20-30% above rated capacitance, but this is constant across all measurements so I think I can deal with it).

Hi

Is the error also consistent across changes in R as well as C? If so, that suggests a time base error. If not that suggests an un-modeled chunk of source impedance.

Have Fun!

Bob

Yeah, constant across all R as well as C.  Probably just a slightly off sample rate or similar.  I should look at that today, actually.

EDIT: Don't want to bump the thread, but worked out what it was.  Was just using the wrong formula to calculate the capacitance (I wasn't subtracting the two points used from Vcc).  This just happened to give me a 20% error with the two points that I chose.
Title: Re: So, my RC time constant is not in fact proportional to R.
Post by: uncle_bob on February 01, 2016, 12:47:48 am
Yeah, constant across all R as well as C.  Probably just a slightly off sample rate or similar.  I should look at that today, actually.

Hi

Well, 20% is a whopping big error for a timebase. If the error is more than 0.02% on a modern sampling scope, I'd be surprised.

Bob