Have you found an error or do you want to add more information to these pages?
You can contact me at the bottom of the home page.

Home page

Three ways to solve a CR circuit (d.c. response)

I will show you three approaches to solve this. All approaches lead to the same answer.
The techniques you need are:

Method 1 - using Vc and t


CR circuit

We have a circuit with a d.c. voltage which I will call E. VR is the volt-drop across the resistor and VC is the volt-drop across the capacitor.
First of all, we need a starting point. I know that the supply voltage will equal the sum of the volt-drops across the other components so I can start with this:
E = VR + VC
I would like to end up with an equation where I put in the time and I get the volt-drop across the capacitor. I think about what equations I can use to substitute parts of this to get what I want. First of all, I know that the volt-drop across the resistor is the current multiplied by the resistance so I can substitute VR with that:
E = iR + VC and I know that i = dq / dt. I shall replace the i term with that:
E = R dq
dt
 + VC

As there are three terms that are not constants, I still need to replace something. As the quantity of charge q is CVC, then I can replace the q part with this. As C is a constant, I can remove it from the d part:
E = CR dVC
dt
 + VC
I can put C next to the R because dq represents an infinitesimal difference between two numbers. It is similar to ΔCx = (Cx1 - Cx2) = C(x1 - x2) so I can take the constant term C from dCVC and put it outside of the d part. If you still are unsure what this means, read my article about differentiation.
The next thing that I want to do is put all the VC terms on one side. This equation permits a separation of the dVC from the dt part. It is a variable separable type of first order differential equation. This is what it looks like after transposition:
1
CR
 dt =  1
E - VC
 dVC  remember that dt
CR
 = 1
CR
 dt

I can integrate both sides now:
1
CR
 dt =  1
E - VC
 dVC
On the left, the equation is a constant. After I integrate this, I get t / CR. The other side is a bit more difficult. For this particular type of equation, I can use the functions of a linear function of x technique. The E - VC part can be changed to u.
1
u
 dVC
But now I have to change the dVC part. I can work this out by taking the u = E - VC equation and differentiating it so du / dVC = -1. I can transpose this so dVC = -du. Now I can change the dVC part of the integral with -du:
1
u
 -(du)  = - 1
u
 du = -ln(u) + K = -ln(E - VC) + K (because u = E - VC)

We now know that this equation:
1
CR
 dt =  1
E - VC
 dVC
is now:
t
CR
 = -ln(E - VC) + K (the general solution)
(bear in mind that there is only one constant of integration. If you want to know why, read my article on integration by clicking here)

In order to find what K is, we put in boundary conditions. When you first switch the circuit on at t = 0, then the volt-drop across the capacitor VC must also be 0. I put these in to the equation and transpose it for K:
0
CR
 = -ln(E - 0) + K
0 = -ln(E - 0) + K  ∴ K = ln(E)
Now we have:
t
CR
 = -ln(E - VC) + ln(E) = ln(E) - ln(E - VC) =  ln ( E
E - VC
)  because ln(a) - ln(b) = ln(a/b)

we have:
t
CR
 = ln ( E
E - VC
)

I can take the antilog of both sides in order to get VC on its own:
et/CR =  E
E - VC
If a = b / c then a-1 = c / b so I can change the equation to this:
e-t/CR =  E - VC
E
(I could have just changed it to 1 / et/CR but it is a little bit simpler to have e-t/CR)

I transpose this for VC and we get:
VC = E - Ee-t/CR = E(1 - e-t/CR)

Method 2 using q and t

Let's look at the circuit again:
CR circuit

To start with, we need a starting point. We will add the volt-drop across the components which will equal the supply voltage:
E = VR + VC

What do we know about VR? Well, it is equal to the current multiplied by the resistance so we can replace that with iR. What about VC? We can replace that with q / C which is the quantity of charge divided by the capacitance. Now we have:
E = iR +  q
C
I want to have an equation in the end that I can put time in to which I will call t. I will replace i with something. As i = dq / dt, then I can replace i with it:
E = R dq
dt
 +  q
C
Now we have something to solve. I am going to transpose it so I have dq / dt on one side and I can use the separation of variables technique:
E -  q
C
 = R dq
dt
 now I can divide both sides by R to get:

E
R
 -  q
CR
 =  dq
dt

I want to separate the variables but to do that, I'm going to change the two fractions in to one. Once I have done that, I can invert both sides and transpose dq and dt.
ECR - qR
CR2
 =  dq
dt
 Now I can separate the variables:

1
ECR - qR
 dq =   1
CR2
 dt This is an equation that I can integrate:

1
ECR - qR
 dq =    1 
CR2
 dt 
On the left, I use the functions of a linear function of q to solve this, I make u = ECR - qR and substitute dq with -du / R in a similar way to the first method above. The equation on the right is easily integrated as 1 / CR2 is a constant. This gives us now:
- ln(ECR - qR)
R
 =    t 
CR2
 + K (where K is some constant)

The next thing to do is find the unknown constant K. As we have the variables q and t in the equation, we can change these to some known values. When t = 0, q must also be 0. This is because no electricity has flowed the instant the circuit has been switched on. Replacing q and t with 0 gives us:
- ln(ECR - 0R)
R
 =    0 
CR2
 + K which simplifies to:
- ln(ECR)
R
 =   K

We can replace K in the above which gives us:
- ln(ECR - qR)
R
 =    t 
CR2
 -  ln(ECR)
R
 but there are too many minus signs for my liking so I multiply everything by -1

ln(ECR - qR)
R
 = -   t 
CR2
 +  ln(ECR)
R
 I notice that every fraction has at least one R term so I can multiply everything by R to make things a little simpler:

ln(ECR - qR) = -    t 
CR
 + ln(ECR) I am going to put the logarithms together now:

ln(ECR - qR) - ln(ECR) = -    t 
CR

I have put the logarithms together because I know that ln(a) - ln(b) = ln(a/b) which is one of the laws of logarithms. This makes the equation look like this:
ln  ( ECR - qR
ECR
)  = -   t 
CR
 then I raise e by the both sides of the equation to get rid of the natural logarithm. I can get at q after that:

ECR - qR
ECR
 = e-t/CR  I notice that I can simplify the fraction:

1 - q
EC
 = e-t/CR

I can now get at q and put it on its own:
q = EC(1 - e-t/CR)

Now you may be wondering what the point of that equation is. It lets us calculate the volt-drop across the capacitor. As I mentioned before, VC = q / C so if I divide both sides by C, it gives us q / C = E(1 - e-t/CR) and I replace q / C with VC giving us:

VC = E(1 - e-t/CR)



Method 3 - using current


CR circuit

If we wanted to know the current in the circuit, we could take the volt-drop across the resistor and divide it by the resistance. This gives us a starting point for working things out:
i
 =  VR
R

I can think about different equations and I know that i = dq / dt. I can replace the i term with that. I can get the volt-drop across the resistor by subtracting the volt-drop across the capacitor from the supply voltage. The voltage across the capacitor VC is q / C but I sometimes like to change a fraction in to one with a multiplication. I find that easier to manipulate. I change q / C to qC-1 so I can now change the starting equation:
dq
dt
 =  E - VC
R
 = E - qC-1
R
 Now I multiply by C / C (which is equal to 1) so I can get rid of C-1

dq
dt
 =  EC - q
CR
 I transpose this to put the terms with q on one side

1
EC - q
 dq =  1
CR
 dt Now I place integral symbols in to it

1
EC - q
 dq =  1
CR
 dt

I integrate this as before. I use the function of a function rule with u = EC - q and dq = -du. This gives me:
-ln(EC - q)
 = - t
CR
 + K

I find the constant K as before by setting t = 0 and q = 0 so K = ln(E - C). The equation looks like this so far:
-ln(EC - q)
 = - t
CR
 + ln(E - C)
I solve this as I have previously done, placing the logarithms together, applying the ln(a/b) = ln(a) - ln(b) rule and taking the antilog of both sides to give me:
1 -
q
EC
 = e-t/CR
so this means that q = EC(1 - e-t/CR) as in the previous method. I can change this to the volt-drop across the capacitor by dividing the equation by C.

Have you found an error or do you want to add more information to these pages?
You can contact me at the bottom of the home page.

Home page