Author Topic: So, my RC time constant is not in fact proportional to R.  (Read 1830 times)

0 Members and 1 Guest are viewing this topic.

Offline Esposch T. Tapir

  • Contributor
  • Posts: 30
  • Country: au
So, my RC time constant is not in fact proportional to R.
« on: January 30, 2016, 12:00:14 pm »
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.


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.)
« Last Edit: January 30, 2016, 12:05:30 pm by Esposch T. Tapir »
Bachelor of Engineering (ECSE) with Honours.
Every time I write a line of code or build a circuit I am reminded that, in the grand scheme of things, I know bugger all.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 3398
  • Country: au
  • Question Everything... Except This Statement
Re: So, my RC time constant is not in fact proportional to R.
« Reply #1 on: January 30, 2016, 12:05:07 pm »
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,

 

Offline Esposch T. Tapir

  • Contributor
  • Posts: 30
  • Country: au
Re: So, my RC time constant is not in fact proportional to R.
« Reply #2 on: January 30, 2016, 12:34:13 pm »
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


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).
Bachelor of Engineering (ECSE) with Honours.
Every time I write a line of code or build a circuit I am reminded that, in the grand scheme of things, I know bugger all.
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 1600
Re: So, my RC time constant is not in fact proportional to R.
« Reply #3 on: January 30, 2016, 12:35:00 pm »
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?
« Last Edit: January 30, 2016, 12:38:50 pm by Andy Watson »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 3398
  • Country: au
  • Question Everything... Except This Statement
Re: So, my RC time constant is not in fact proportional to R.
« Reply #4 on: January 30, 2016, 12:37:42 pm »
Look at the datasheet for your op amp, Source is 40mA, Sink is 50uA, that is a problem,
 

Offline Esposch T. Tapir

  • Contributor
  • Posts: 30
  • Country: au
Re: So, my RC time constant is not in fact proportional to R.
« Reply #5 on: January 30, 2016, 01:03:58 pm »
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.
Bachelor of Engineering (ECSE) with Honours.
Every time I write a line of code or build a circuit I am reminded that, in the grand scheme of things, I know bugger all.
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2407
  • Country: us
Re: So, my RC time constant is not in fact proportional to R.
« Reply #6 on: January 30, 2016, 01:18:20 pm »
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
 

Offline Esposch T. Tapir

  • Contributor
  • Posts: 30
  • Country: au
Re: So, my RC time constant is not in fact proportional to R.
« Reply #7 on: January 30, 2016, 01:32:32 pm »
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).
Bachelor of Engineering (ECSE) with Honours.
Every time I write a line of code or build a circuit I am reminded that, in the grand scheme of things, I know bugger all.
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2407
  • Country: us
Re: So, my RC time constant is not in fact proportional to R.
« Reply #8 on: January 31, 2016, 04:37:57 am »

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
 

Offline Esposch T. Tapir

  • Contributor
  • Posts: 30
  • Country: au
Re: So, my RC time constant is not in fact proportional to R.
« Reply #9 on: February 01, 2016, 10:37:30 am »

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.
« Last Edit: February 09, 2016, 03:45:40 pm by Esposch T. Tapir »
Bachelor of Engineering (ECSE) with Honours.
Every time I write a line of code or build a circuit I am reminded that, in the grand scheme of things, I know bugger all.
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2407
  • Country: us
Re: So, my RC time constant is not in fact proportional to R.
« Reply #10 on: February 01, 2016, 11: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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf