Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Variable Resistor and Capacitor in a circuit

Status
Not open for further replies.

morteza123

New Member
Hello
I want to simulate a circuit which has both variable capacitor and resistor right after changing the capacitor, resistor or both.
I will appreciate if you could help me in finding the general equation.
I have attached the circuit. 2013-09-07 20.56.41.jpg

Thanks
 
Hello
I want to simulate a circuit which has both variable capacitor and resistor right after changing the capacitor, resistor or both.
I will appreciate if you could help me in finding the general equation.
I have attached the circuit.

Thanks

hi m123 and welcome,
Your circuit shows a DC supply source, so the variable capacitor will have no effect.

I would suggest the best simulator would be LTSpice, which is a free web download.

**broken link removed**

E
 
Your circuit shows a DC supply source, so the variable capacitor will have no effect.
The voltage across the capacitor will increase as its capacitance is decreased (and vice-versa) due to conservation of charge.


You can work out the initial voltage across the capacitor using a standard resistor divider equation (ignoring R3). To work out the voltage at Vout after the capacitance is changed, first find the new voltage across the capacitor using the equation Q = CV, i.e. [LATEX]C_{old}V_{old} = C_{new}V_{new}[/LATEX]. Once you know the new voltage, you can work out the voltage at the resistor junction point using any method you want (I'd just use a Thevinen equivalent, then the voltage divider rule). Vout is simply the supply voltage minus the junction voltage.

Of course, over time, the voltage across the capacitor will revert to the same value as before you changed the capacitance as it charges/discharges to the voltage at the junction of R1/R2.
 
Of course, over time, the voltage across the capacitor will revert to the same value as before you changed the capacitance as it charges/discharges to the voltage at the junction of R1/R2.

As the OP has not posted any values for the components and not asked for instantaneous values, I would say my original Your circuit shows a DC supply source, so the variable capacitor will have no effect. is not inaccurate.

Lets hope he comes back with more details.
E
 
Hello dougy83 and ericgibbs
Thanks for your responses. Here I have a DC input voltage. Please see the attached 2013-09-08 08.09.54.jpg
I know if we have a variable resistor (case (a)), the response would be the same as (a). but I am wondering in what case I would have a response like case (b) maybe having just variable capacitor or both variable capacitor and resistor. I want to find response time and Vp. But as ericgibbs said maybe the variable capacitor has no effect in the response.

thanks in advance for your responses.
Morteza
 
I need more information.
What is happening with time?
..Is R2 changing with time?
..Does R2 make a jump in value? example: 100 to 200 ohms

--Maybe R2=100 at time 0. And the output voltage is Vo
--R2=200 and the voltage moves up to Vp then falls back to Ve.

Maybe R2=100 then moves up to 300 then moves back to 200.

Maybe Vin changes and that causes Vout to change.

Help help I don't understand
--
 
Hello there,

The voltage you have indicated as Vout does not look like that but is just an increasing exponential. Perhaps you meant the current instead.

The equation is:
Vout=Vin*C*(1-(A/D)*e^(-a*t))

and in Latex:

[LATEX]\[Vout=Vin\,*\,C\,*\,\left( 1-\frac{A}{D}\,*\,{e}^{-{a\,t}}\right) \][/LATEX]


where
A=R1*R2
B=R1+R2
C=R2/B
D=R2*R3+R1*R3+R1*R2
a=B/(D*C1)

This assumes the capacitor has 0v initially across it, and that R2 is adjusted and left alone before the voltage is applied at time t=0. If R2 is somehow adjusted during the run after t=0 then we'd have to take that into account as that would change the response based on how exactly R2 changed.

From inspection we can see that this is just a rising exponential that starts at a lower voltage and builds up to a higher voltage with no blips. So it looks almost like a capacitor charging through a resistor...

The initial Vout is:
Vout(0)=Vin*(R2*R3)/(R2*R3+R1*R3+R1*R2)

and the final Vout is:
Vout(inf)=Vin*R2/(R1+R2)

Actually, any current in this circuit is probably just a decreasing exponential with no blips either. It would start out at some higher level, then gradually decrease to some lower level. That would make sense because this is just a first order system.
 
Last edited:
Ronsimpson
In case (a), The resistor (R2) changes with time. therefore at time (t0), its value is R` and at time (t1) it increases gradually to R'' and stay there. so the response is the same as case (a). I made a simple circuit. to verify it and it was the same.what I am looking for is to find under what condition I will get a response like case (b).
 
In case A; with R2 going from R' to R'' the voltage should go from V' to V'' with out the peak. V'=Vo, V''=Ve and there is no Vp.
If you are getting a Vp then the variable resistor is probably dirty inside and is not going cleanly form R' to R''.
From your circuit, C1 will try to keep a Vp from happening. With out C1 it should not make a Vp.

In case B; your circuit should not make Vp. I can change the circuit so it will....but.....
 
Hello dougy83 and ericgibbs
Thanks for your responses. Here I have a DC input voltage. Please see the attached View attachment 75812
I know if we have a variable resistor (case (a)), the response would be the same as (a). but I am wondering in what case I would have a response like case (b) maybe having just variable capacitor or both variable capacitor and resistor. I want to find response time and Vp. But as ericgibbs said maybe the variable capacitor has no effect in the response.

thanks in advance for your responses.
Morteza


Hello,

To get the response as in (b) you would turn the pot up high, then apply voltage, then turn the pot down and then back high again. That would give a time limited blip.

To get the blib using the capacitor, you could rely on the charging to get the upper bound, then turn the pot down to get the lower voltage again. This assumes R3 is smaller than R2. If R3 is too big the cap wont do much.

To find out the exact response you have to specify what you want the function of R2 to be. Some examples are:
R2(t)=t*R where R2=0 at time t=0 and at time t=t1 the resistance is R2=t1*R and this assumes a time limit.
R2(t)=t*R+K, where it's the same as above except there is some minimum resistance K.
R2(t)=R*(1-e^(-a*t)), where a is the controlling factor and R the scaling factor, making the resistance go up until a certain time then it tapers off.
R2(t)=Ra*t^3+Rb*t^2+Rc*t+Rd, where the various R's are the constants in the curve of the resistance R2.
R2(t)=R*(1-sin(w*t))/2, where R is the scaling resistance and w is the angular frequency of the change of resistance
R2(t)=R*sin(w*t), where R is again the scaling resistance and w the same as before but we allow R2 to become a negative resistance for a time.

So you see there are many possibilities. If we had the choice of what to make R2(t) to get a blip we would have a bunch of functions we could choose from. For a given form that is well specified we then turn this problem into a curve fitting problem.

Here's a simple example where the function used was R2(t)=K-t*R and running the experiment from 0 to some end time where R=Rmin. The applied DC voltage was 10 volts.
 

Attachments

  • Blip-01b.gif
    Blip-01b.gif
    8.1 KB · Views: 343
Last edited:
Hello again,


Just to show how much more complicated the analysis gets when we use a time variable resistor, here's a solution for one kind of time variable resistor with equation:
Radj=100000*(R-t)

with R=0.01 and running t from 0 to 0.010 to look at the solution over that time period.

Watch how much more complex this gets over the usual simple exponential equation we get with all fixed resistors.


The equation:
Radj=100000*(R-t)

replaces the variable resistor and it's a function of time so it complicates the differential equation:
v'(t)-C+v(t)*(1/A+1/(B*(R-t)))=0 {note C is just a constant here, not the cap value}

The fairly complicated solution for the capacitor voltage at time t is:
v(t) = k1*e^((log(t-R))/B-t/A)+A*C*e^((R-t)/A)*((R-t)/A)^(1/B)*gamma_incomplete((B-1)/B, (R-t)/A)

Here A is R1*C1, B and R are adjusted for the time period and required resistance and for the run shown previously B=100000*C1 and R=0.01, so that gives us 1000 ohms for the pot at time t=0 and 0 ohms for the pot at t=0.010 seconds (we dont really have to go right to 0.010 seconds), and C=Vs/(R1*C1). Also, we have to solve for k1 in the above first and that may end up being a complex variable so this gets quite messy.

With R1=1000 and R2 as the pot above and the resistor in series with the cap set to zero ohms for simplicity, we get the same solution as in the previous post. It looks like a sort of mountain that rises up quickly, rounds off, then comes down slower and then a little faster later. That's the voltage across the cap.

So just because we made the resistor time variable we went from an equation like A*(1-e^(-a*t)) to the equation above for v(t). And that time variable resistor was one of the simpler possible forms for a time variable resistor. Who knows what we would end up with if we made it a more complicated function. Eventually it may not be possible to solve it analytically and we might have to resort to a numerical solution.
This is one time when a simulation really helps a lot and saves a lot of time if we dont really need a real deep analysis.
 
Thanks all for your replies. Those are very helpful.

Here I made my circuit (Case A) with a variable resistor and a fixed capacitor. R1=14Ω, R2:254-45Ω, R3:0, Capacitor:1μF, I applied 8 V DC. using matlab simulink and measured the voltage of R1 into the matlab. at time 5s I decreased the resistor to the 45 Ω manually As we can see I have a rise time, and a slow settling time.
Slide2.JPG
As our friend said by changing the capacitor (using a variable capacitor I didn't see any change while there was Voltage. or maybe there was and I couldn't sense.
Is there any way to control these settling time and make it very fast. or Is there any way to get the circuit information without knowing the specification of the capacitor/resistor to control the rise time or settling time. I think maybe it is possible to get the voltage function by resistor.

I am interested to know what is the rule of capacitor here if it changes during the changing the resistor.
Thanks all
 
Hi again,

What is it you really want to do here?

There are various ways to do things but usually a variable resistor is not the way to go unless you have a way to adjust it and do so at the right times. You can make the voltage go up or down with the pot, but if you need it sync'd to something else then you have to do it electronically.

Also, i cant seem to see the attachment but get an error.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top