Author Topic: Time constant involving a resistor divider  (Read 12269 times)

0 Members and 1 Guest are viewing this topic.

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Time constant involving a resistor divider
« on: February 19, 2017, 07:26:03 pm »
Say I have a resistor divider and across the bottom resistor I place a capacitor. What is the time constant on that RC circuit? I asked somebody this once and he said that it's the parallel of the 2 resistors because I should consider the circuit with the voltage source being ideal and short it to ground. However if I do that do I consider this a parallel RC circuit? Would this take into account the fact that the resistor in parallel with the capacitor cause it to charge up more slowly and discharge more quickly. Obviously if I consider it a parallel circuit then recharging uptime becomes nil because nothing charge it or maybe infinite.

If I consider it a series RC circuit with a load and how to account for the fact that it will take longer to charge the capacitor particularly as the maximum voltage would never get applied to it and it would discharge quite quickly.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19520
  • Country: gb
  • 0999
Re: Time constant involving a resistor divider
« Reply #1 on: February 19, 2017, 07:32:45 pm »
Yes, the R is equal to the value of both resistors in parallel and V equal to the output voltage of the potential divider.

If the potential divider is connected to a push-pull driver, then the charge and discharge time constants will be the same. If it's connected to a battery, to charge and left open circuit to discharge, then when charging the resistors are in parallel and when discharging, the upper resistor is open circuit, so only the lower resistor forms part of the RC circuit, so the capacitor will discharge more slowly than charge.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: Time constant involving a resistor divider
« Reply #2 on: February 19, 2017, 07:34:57 pm »
It's a nice problem in analysis.

Consider your voltage divider output without capacitor. You can model that as Uout = Uin * R2 / (R1 + R2) where R2 is your lower leg resistor.

This can be replaced with a voltage source with a value of Uout and a series resistor with a value of R1 || R2.

Add your capacitor and it's done.

 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Time constant involving a resistor divider
« Reply #3 on: February 19, 2017, 07:35:18 pm »
So the charge and discharge is not symmetrical? Because the values of resistance change. What I'm actually aiming at here is a thermistor with a pull-up resistor and a capacitor in parallel with the thermistor to smooth out the signal. So I'm wondering what the frequency response and then becomes.
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: Time constant involving a resistor divider
« Reply #4 on: February 19, 2017, 07:36:59 pm »
I asked somebody this once and he said that it's the parallel of the 2 resistors because I should consider the circuit with the voltage source being ideal and short it to ground.
Basically, convert the two resistors and voltage source to their Thevenin equivalent. From that you should be able to answer your other questions.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21684
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Time constant involving a resistor divider
« Reply #5 on: February 19, 2017, 07:42:09 pm »
The top of the resistor divider is connected to an ideal voltage source, right?

If not, the Thevenin equivalent source resistance must be added in series with the top resistor, and then you take the parallel equivalent.

In the extreme, you might have a CCS source, in which case the top resistor is effectively open circuit, and the time constant is due to only the bottom resistor! :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline AG6QR

  • Frequent Contributor
  • **
  • Posts: 857
  • Country: us
    • AG6QR Blog
Re: Time constant involving a resistor divider
« Reply #6 on: February 19, 2017, 07:43:09 pm »
Google the term "Thevenin equivalent" (and for further understanding, "Norton equivalent").

It depends on what your resistor divider is connected to.  If we can assume the top of the resistor divider is connected to an ideal (zero impedance) voltage source, and the bottom is connected to an ideal (zero impedance) ground, then the middle of the resistor divider is equivalent to an ideal voltage source in series with a resistor, where the value of the resistor is the parallel resistance of the two resistors in your voltage divider.  This seems to be what your friend said. 

If the top and bottom of the resistor divider are connected to points in a circuit that themselves have non-negligible resistance, then the problem becomes more complicated.  You must include those impedances as you figure out what the Thevenin equivalent circuit would be.

Quote
If I consider it a series RC circuit with a load and how to account for the fact that it will take longer to charge the capacitor particularly as the maximum voltage would never get applied to it and it would discharge quite quickly.

To put some solid numbers to it, suppose you have a 15V supply, and your voltage divider is a 10K resistor on top, and a 20K resistor on the bottom, for an output of 10V.  The equivalent resistance is 10K in parallel with 20K, or about 6.7K.  So the capacitor will behave exactly the same as if you were charging it from a 10V supply through a 6.7K resistor.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Time constant involving a resistor divider
« Reply #7 on: February 19, 2017, 07:46:30 pm »


To put some solid numbers to it, suppose you have a 15V supply, and your voltage divider is a 10K resistor on top, and a 20K resistor on the bottom, for an output of 10V.  The equivalent resistance is 10K in parallel with 20K, or about 6.7K.  So the capacitor will behave exactly the same as if you were charging it from a 10V supply through a 6.7K resistor.


Okay fine but I'm also looking at the discharge time. As I said before the bottom resistor is a temperature sensor. So the vault is in the middle is going to vary. What I'm trying to ascertain is how fast will it keep up with a given capacitor in parallel. I think I'm going to get the signal generator out, the oscilloscope out and some parts.
 

Offline AG6QR

  • Frequent Contributor
  • **
  • Posts: 857
  • Country: us
    • AG6QR Blog
Re: Time constant involving a resistor divider
« Reply #8 on: February 19, 2017, 07:59:23 pm »
Okay fine but I'm also looking at the discharge time. As I said before the bottom resistor is a temperature sensor. So the vault is in the middle is going to vary. What I'm trying to ascertain is how fast will it keep up with a given capacitor in parallel. I think I'm going to get the signal generator out, the oscilloscope out and some parts.

To calculate the discharge time, put in whatever numbers are appropriate resistances for the situation when the capacitor discharges. 

But if the capacitor is charging and discharging due to temperature changes affecting a thermistor, don't forget that the thermistor itself won't change its temperature or resistance immediately.  There will be time constants involving the heat transfer to reach thermal equilibrium.  I don't know the context you're considering, but it wouldn't surprise me if the thermal response is much slower than the electrical response.  Anyway, run the numbers.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: Time constant involving a resistor divider
« Reply #9 on: February 19, 2017, 08:03:56 pm »
Quote
Okay fine but I'm also looking at the discharge time. As I said before the bottom resistor is a temperature sensor.

You're overanalyzing this.

If the bottom resistor is a temperature sensor, it's normally so slow that static analysis is enough.

Do a calculation for lowest value, highest value and middle value of the sensor resistance.

Your equivalent source voltages will be different, and so will the RC time constants for those three cases. But there is NO difference in charge/discharge time at a given temperature. It's a purely linear circuit (I hope! You've said nothing about the sensor).
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Time constant involving a resistor divider
« Reply #10 on: February 19, 2017, 08:14:37 pm »
It's not the sensor response I'm looking at. What I am looking at is if this was just a resistor divider with capacitor what would the frequency response be to say for example injected noise.

So what I'm actually planning to do it in my hopes of over sampling on the ADC was to inject some of the PWM output from my controller back into the input pin via a resistor. Obviously I don't want that input to change instantly so I put a capacitor in so that to some degree the voltage will swing around about the measurement point. The hope is to gain a bit more resolution (it's purely an experiment and I don't strictly need the resolution) and ultimately there is going to be noise to filter out anyway so my sampling algorithm will filter the signal. Whether or not I get the extra resolution is another matter and beside the point there is another thread on that. What I was wondering was what value of capacitor to use so that I produce a reasonable amount of noise rejection but don't over filter for my intentionally injected noise which would come via a high value resistor. So in this case the sensor and its pull-up are at around 470 ohms each. If I were to use a 470 kilo Ohm resistor from my output to my sensor input I would want to look at the change of voltage that resistor being connected first to 5 V and then to ground causes. The effect of immediately jumping the voltage up or down by a few millivolts will be delayed by the capacitor. This would allow the voltage to be moved around its actual voltage and hopefully squeeze a bit of resolution out.

So this is why I wanted to analyse what is effectively a voltage divider with a capacitor in parallel with one resistor and what it's frequency response would be given that is not just a simple RC circuit. It is in effect a circuit in which I that you consider the resistor changing rapidly or the voltage applied changing albeit by not very much.

I have just carried out an experiment and the voltage jumped about by 5 to 10 mV with a 5 V input to the divide and using the 470 Kilo Ohm resistor to inject a 5 V square wave onto the capacitor.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Time constant involving a resistor divider
« Reply #11 on: February 19, 2017, 08:19:14 pm »
But the voltage jumps quite quickly so my 470 Kilo ohm resistor is a bit on the small side. I should probably just bang a mega ohm in there and hope for the best. Like I said it's more of an experiment.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5871
  • Country: de
Re: Time constant involving a resistor divider
« Reply #12 on: February 19, 2017, 08:26:47 pm »
You've now gotten the same answer several times. Your friend in your original post is correct. Period.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Time constant involving a resistor divider
« Reply #13 on: February 19, 2017, 08:30:28 pm »
Instead of putting a capacitor directly across the thermistor, why not put a separate RC filter on the output of the voltage divider? Then you can calculate the filter properties independently of the thermistor circuit. If you make the R in the RC significantly higher than the themistor resistance it will not affect the thermistor voltage response.
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: Time constant involving a resistor divider
« Reply #14 on: February 19, 2017, 08:31:15 pm »
So this is why I wanted to analyse what is effectively a voltage divider with a capacitor in parallel with one resistor and what it's frequency response would be given that is not just a simple RC circuit.
If you worked out the Thevenin equivalent you would see that it is a simple RC - first order low pass with extra attenuation due to the resistive divider.

Quote
It is in effect a circuit in which I that you consider the resistor changing rapidly or the voltage applied changing albeit by not very much.
It's not the sensor response I'm looking at. What I am looking at is if this was just a resistor divider with capacitor what would the frequency response be to say for example injected noise.

So what I'm actually planning to do it in my hopes of over sampling on the ADC was to inject some of the PWM output from my controller back into the input pin via a resistor. Obviously I don't want that input to change instantly so I put a capacitor in so that to some degree the voltage will swing around about the measurement point. The hope is to gain a bit more resolution (it's purely an experiment and I don't strictly need the resolution) and ultimately there is going to be noise to filter out anyway so my sampling algorithm will filter the signal. Whether or not I get the extra resolution is another matter and beside the point there is another thread on that. What I was wondering was what value of capacitor to use so that I produce a reasonable amount of noise rejection but don't over filter for my intentionally injected noise which would come via a high value resistor. So in this case the sensor and its pull-up are at around 470 ohms each. If I were to use a 470 kilo Ohm resistor from my output to my sensor input I would want to look at the change of voltage that resistor being connected first to 5 V and then to ground causes. The effect of immediately jumping the voltage up or down by a few millivolts will be delayed by the capacitor. This would allow the voltage to be moved around its actual voltage and hopefully squeeze a bit of resolution out.

I have just carried out an experiment and the voltage jumped about by 5 to 10 mV with a 5 V input to the divide and using the 470 Kilo Ohm resistor to inject a 5 V square wave onto the capacitor.
I think you're chasing a nonexistent rabbit into hole with this extra resolution idea. But if you are going to dither the input in order to eke out a few more bits at least use a noise source that is not correlated with your signal.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Time constant involving a resistor divider
« Reply #15 on: February 19, 2017, 08:32:41 pm »
Instead of putting a capacitor directly across the thermistor, why not put a separate RC filter on the output of the voltage divider? Then you can calculate the filter properties independently of the thermistor circuit. If you make the R in the RC significantly higher than the themistor resistance it will not affect the thermistor voltage response.

Not really possible as the resistance of the sensor is fixed and the allowed input impedance is fixed so I'd never get orders of magnitude apart. It's going to be a bit of a fudge either way and I was getting curious on a theoretical point of view regardless of how I fundge it together and see what comes out.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Time constant involving a resistor divider
« Reply #16 on: February 19, 2017, 08:39:48 pm »

If you worked out the Thevenin equivalent you would see that it is a simple RC - first order low pass with extra attenuation due to the resistive divider.

So if this was just a divider with one capacitor in it I'd have to consider it in two step, first when charging as the norton equivalent of the resulting voltage and the resistors in parallel and then in discharging where if the main voltage source has gone dead the top resistor is no longer part of the circuit so it's just the capacitor and the bottom resistor. Hence as I said it's a non symetrical charge/discharge waveform.

Quote

I think you're chasing a nonexistent rabbit into hole with this extra resolution idea. But if you are going to dither the input in order to eke out a few more bits at least use a noise source that is not correlated with your signal.


Well like I said it's just an experiment and I'm not relying on it to produce results. The PWM output I am using has nothing to do with my input signal, it just happens to be a PWM with a frequency whoes period is about the same as the time it will take to run my sample function.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Time constant involving a resistor divider
« Reply #17 on: February 19, 2017, 08:40:26 pm »
Not really possible as the resistance of the sensor is fixed and the allowed input impedance is fixed so I'd never get orders of magnitude apart. It's going to be a bit of a fudge either way and I was getting curious on a theoretical point of view regardless of how I fundge it together and see what comes out.

I don't understand this. The input to the ADC has to have a high impedance. It is not likely to influence the readings from your voltage sensor.

Also, if you wish for more sensitivity or precision from the temperature sensor, you might consider putting it in a Wheatstone bridge rather than just a simple voltage divider (but then you'd need to amplify the output signal up to the input range of the ADC, so more parts needed).
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Time constant involving a resistor divider
« Reply #18 on: February 19, 2017, 08:43:42 pm »
Not really possible as the resistance of the sensor is fixed and the allowed input impedance is fixed so I'd never get orders of magnitude apart.

BTW, it doesn't have to be orders of magnitude apart. If the thermistor is 470 ohms, a 10 k filter resistor in the RC circuit should be fine.
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: Time constant involving a resistor divider
« Reply #19 on: February 19, 2017, 08:53:52 pm »
if the main voltage source has gone dead

Dead ? Or to zero volts ? If the source is still connected, even at zero volts, it is still part of the circuit and the "top" resistor is still active.
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17815
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Time constant involving a resistor divider
« Reply #20 on: February 19, 2017, 08:57:26 pm »
if the main voltage source has gone dead

Dead ? Or to zero volts ? If the source is still connected, even at zero volts, it is still part of the circuit and the "top" resistor is still active.

Dead as is diconected. I have just verified on the breadboard. If I put a diode in series with the sig gen input to ensure only powered charge happens then the discharge time is twice the charge time. Aint theory great when you understand it (with some help)
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21684
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Time constant involving a resistor divider
« Reply #21 on: February 19, 2017, 10:25:01 pm »
ADC filter?

Ah!  Then your answer is this:

If the source impedance is varying (R depends on T!), then your filter won't be consistent.  That's bad!

How to solve?

Add a resistor in series, from the divider, to the ADC.  Make this resistor value several times larger than the thermistor's highest value.  Place the cap-to-GND after this resistor.

If you have a 10k + 10k(thermistor) divider, the maximum Thevenin resistance will be between 1 and 10k, for most temperatures you'd measure.  Add a 47k in series from this point, and follow it with, say, a 0.1uF cap, to get a time constant of 4.8 to 5.7 milliseconds. :-+

If you can't tolerate a large series resistance (maybe this application is low current, and the thermistor is huge, like 1Meg, and the ADC can't reliably read from a source resistance of 5Meg -- actually it probably will, despite what the datasheet says, but at that point, it depends), then the alternative is to buffer the signal.  You'd still use a capacitor on the thermistor, accepting that it won't do your final filtering job -- its job is only to set a maximum bandwidth.  This goes into an op-amp voltage follower, which is followed by another filter, which will have a constant cutoff frequency.  (You may also be able to use the op-amp as a Sallen-Key active filter, and get even sharper cutoff.  Not an issue for temperature inputs, but a valuable approach for faster analog inputs.)

This becomes very important at high frequencies, for example for a function generator output circuit: the DAC output needs to be AA filtered, but you can't connect the filter to the outside world because its impedance isn't constant (it depends on frequency -- that's why it's a filter, after all!).  You'd place the buffer (and you most likely need a lot of gain, anyway) after the filter, so the filter response remains constant, no matter what gain setting or load you have attached.

Tim
« Last Edit: February 19, 2017, 10:29:37 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Time constant involving a resistor divider
« Reply #22 on: February 19, 2017, 10:38:16 pm »
Add a resistor in series, from the divider, to the ADC.  Make this resistor value several times larger than the thermistor's highest value.  Place the cap-to-GND after this resistor.

That's what I said in Reply #13. I'm glad my suggestion wasn't totally crazy.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21684
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Time constant involving a resistor divider
« Reply #23 on: February 19, 2017, 10:51:21 pm »
Add a resistor in series, from the divider, to the ADC.  Make this resistor value several times larger than the thermistor's highest value.  Place the cap-to-GND after this resistor.

That's what I said in Reply #13. I'm glad my suggestion wasn't totally crazy.

Yup, it's a good way to go :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Time constant involving a resistor divider
« Reply #24 on: February 20, 2017, 01:02:07 am »

I don't understand this. The input to the ADC has to have a high impedance. It is not likely to influence the readings from your voltage sensor.

I wouldn't count on this.  The ADC input impedance of most uCs is fairly low and requires driving impedances down around 20k or less.  For the ATmega328 (Arduino), the source impedance needs to be less than 10k

Quote
The ADC is optimized for analog signals with an output impedance of approximately 10 k? or
less. If such a source is used, the sampling time will be negligible. If a source with higher impedance
is used, the sampling time will depend on how long time the source needs to charge the
S/H capacitor, with can vary widely. The user is recommended to only use low impedance
sources with slowly varying signals, since this minimizes the required charge transfer to the S/H
capacitor.


Emphasis added...

So, given that there will need to be a voltage follower from the high impedance thermistor (it is high impedance, right?), why not use the op amp as an integrator on the way by.  Put a capacitor in the feedback path. and work out the math for the RC time constant.  Or, just smooth the signal out a bit and let the uC do the integration.

« Last Edit: February 20, 2017, 01:04:13 am by rstofer »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf