Two capacitors and a resistor in a circuit. - Page 1
Forum section: electronics / beginners

author: Hunter1
author_rank: Newbie
timestamp: September 20, 2013, 06:01:57 pm
content: I'd like to know which equation can be used to calculate the current flowing in the circuit below. The voltage in both capacitors are measured with a DMM. Initially the capacitor 1 is charged, and has 20 volts; the second has 0 volts.If the capacitor 1 were replaced with a voltage source, the equation would be i = Vsource/Resistance * (1-e(-t/RC)).I'm noob in both forum and electronics, so please be nice, thanks. Any explanations are welcome.

author: Zero999
author_rank: Super Contributor
timestamp: September 20, 2013, 06:18:35 pm
content: The charge will balance so the voltage across both of the capacitors is the same.The steady state voltage is the charge in C1 but spread across both capacitors connected in parallel.The formula for calculating the current will be similar, except the capacitance will be equal to both capacitors connected in series.

author: smashedProton
author_rank: Frequent Contributor
timestamp: September 20, 2013, 06:32:16 pm
content: Don't forget that there is also energy loss in the resistor. The nost precise way to do this is use conservation of energy rather than charge

author: IanB
author_rank: Super Contributor
timestamp: September 20, 2013, 06:37:26 pm
content: Quote from: smashedProton on September 20, 2013, 06:32:16 pmThat's exactly why conservation of energy is a poor way to do it.Charge is conserved in a closed circuit, energy is not conserved.The best model to use will be one where a conservation law can be applied.

author: Hunter1
author_rank: Newbie
timestamp: September 20, 2013, 06:43:42 pm
content: Quote from: Hero999 on September 20, 2013, 06:18:35 pmyou meant series in the red mark right?So, i use the same fomula, but for the capacitance i use the equivalent capacitance in series? is that right?

author: Hunter1
author_rank: Newbie
timestamp: September 20, 2013, 06:45:33 pm
content: I also tried to make transient analysis in LTSpice, but i don't know how, so if anyone can give a hint...

author: c4757p
author_rank: Super Contributor
timestamp: September 20, 2013, 06:52:34 pm
content: You can specify the initial conditions. First label a node (press F4), then press "s" and enterCode:.ic V(node_name)=node_voltageAnd give theuicoption ("skip initial operating point solution") to tell it to use the .ic statements.

author: Hunter1
author_rank: Newbie
timestamp: September 20, 2013, 07:02:05 pm
content: Quote from: c4757p on September 20, 2013, 06:52:34 pmJust done it, thanks.

author: IanB
author_rank: Super Contributor
timestamp: September 20, 2013, 07:02:30 pm
content: This is an interesting scenario.In the initial state with one capacitor charged and the other empty the energy in the system is:E1= 0.5 C V12If we now "close the switch" and allow the two capacitors to equalize their voltages, the new energy of the system is:E2= 2 [ 0.5 C (V1/2)2] = 0.25 C V12Half of the original energy has been lost.We can also note that the entropy of the system has increased. This is an irreversible process since energy has been lost to the surroundings and there is no way to get it back.Note also that the energy loss is independent of the value of the resistor. The resistor only affects how long it takes to reach equilibrium.

author: Hunter1
author_rank: Newbie
timestamp: September 20, 2013, 07:10:31 pm
content: Quote from: IanB on September 20, 2013, 07:02:30 pmInteresting right, it's always half.My teacher said an electromagnetic pulse is generated. You could think the bigger the resistance, more energy is dissipated through heat, but that's not the case...

author: Zero999
author_rank: Super Contributor
timestamp: September 20, 2013, 09:43:45 pm
content: Quote from: Hunter1 on September 20, 2013, 06:43:42 pmNo, the steady state voltage across both of the capacitors is equivalent to the charge on C1 when it's split equally between both of the capacitors which are connected in parallel.To determine the steady state voltage, calculate the charge on C1 on coulombs, then re-arrange the formula for voltage but with the sum of C1 and C2 for the capacitance.Quote from: Hunter1 on September 20, 2013, 07:10:31 pmYes in the real world EMP is generated and the intensity will depend on the physical dimensions of the circuit as well as the resistance which will determine how much energy is released as radiation.

author: Dave
author_rank: Super Contributor
timestamp: September 20, 2013, 10:06:10 pm
content: It's really simple, actually. You replace the charged capacitor with a model circuit of a voltage source and capacitor in series. So when you have the equation i(t) = Vsrc / R * (1-e^(-t/RC)), C is actually the equivalent capacitance of the two capacitors in series (C1*C2/(C1+C2)).

author: free_electron
author_rank: Super Contributor
timestamp: September 20, 2013, 11:21:41 pm
content: i'm intrigued by this little 'problem'the voltage should be slightly lower than 10 volt as some energy was lost into heat while the charge was balancing ( current through resistor * voltage across = heat ...)should try this with a 5 ohm resistor and 1 Farad capacitors charged to 100 volts ( so we burn off some power )Let's see how much of a 'lie' spice will generate ...

author: Dave
author_rank: Super Contributor
timestamp: September 20, 2013, 11:30:59 pm
content: Quote from: free_electron on September 20, 2013, 11:21:41 pmWith ideal components, voltage will be exactly 10 volts. The energy loss is accounted for. The stored energy in a capacitor is W = 1/2 * C * V^2. If the voltage is halved, the energy is reduced to a quarter. You have two capacitors, so you have two quarters. Half of the total energy is transformed into heat.

author: free_electron
author_rank: Super Contributor
timestamp: September 20, 2013, 11:53:39 pm
content: Quote from: Dave on September 20, 2013, 11:30:59 pmthat can't be right... that equation is only valid if you are charging from a fixed voltage.in this case , as one capacitor charges, the other side discharges ( the voltage goes down )

author: IanB
author_rank: Super Contributor
timestamp: September 20, 2013, 11:57:03 pm
content: Quote from: free_electron on September 20, 2013, 11:21:41 pmThe voltage on a fixed value capacitor depends only on the charge stored within it. Since charge is conserved (Kirchhoff's current law) the voltages measured on the capacitors will depend only on the redistribution of charge. The energy loss in the resistor does not have to be taken into account.

author: onlooker
author_rank: Frequent Contributor
timestamp: September 21, 2013, 12:08:16 am
content: Equivalent voltage source is a good way. On the other hand, it is not too hard to just directly solve,0.5*RC*dI/dt + I =0 with I|t=0= 20/R

author: Dave
author_rank: Super Contributor
timestamp: September 21, 2013, 12:23:49 am
content: Quote from: free_electron on September 20, 2013, 11:53:39 pmAs I explained in my first post, a charged capacitor can be represented with an ideal voltage source connected in series with a capacitor. The voltage source has the same voltage as your charged capacitor had, the capacitance is the same. As the capacitor in your model charges, the voltage across your whole model (source+capacitor) is reduced, everything works out.Also, the equation is always valid, as you are looking at the voltage across the capacitor, it doesn't matter how it got there.Give me some time, I'll draw up something to explain it better.

author: Jeff1946
author_rank: Regular Contributor
timestamp: September 21, 2013, 01:09:43 am
content: Let me give you a mechanical analogy. A moving vehicle hits a stationary one and they stick together after the collision. Assuming they weigh the same after the impact they will have half the velocity of the first one due to conservation of momentum and half the energy due to twice the mass but one half of the velocity. It doesn't matter if the collision is soft (say rubber bumpers) or hard as long as they are locked together after the impact, the energy loss will be one half.In a perfect elastic collision they first car will stop and the second have the velocity of the first, like the toy with suspended ball bearings. I guess for an electrical analogy you would connect the charged cap to an inductor, disconnect at zero voltage, then connect the inductor to the second cap and disconnect at max voltage. This is sort of the way buck and boost converters work.

author: Dave
author_rank: Super Contributor
timestamp: September 21, 2013, 01:16:45 am
content: I have made a simulation in LTspice to prove my theory.The first image is the waveform plot of a charged capacitor connected to an empty capacitor. The voltage on the charged one drops while the voltage on the discharged rises. They meet in the middle.(the .ic spice directives are there to set the initial voltage of the two capacitors; C1 charged at 20V and C2 discharged at 0V)The second image shows the waveform of the voltages across the model charged capacitor (voltage source + cap) and discharged cap. As you can see, the waveform is identical to the waveform in the first image (ignore the spike at t=0, that was caused by the startup condition of the transient simulation; I had to use this condition, so the simulator didn't begin the simulation with already charged capacitors).I also zoomed into the waveform at t=1h, to prove that the voltages will meet at exactly half the initial voltage (all four traces are overlapped).Here is my LTspice simulation file, feel free to test it yourself.

author: IanB
author_rank: Super Contributor
timestamp: September 21, 2013, 02:07:15 am
content: Quote from: free_electron on September 20, 2013, 11:53:39 pmThe energy equation for a charged capacitor is an equation of state. You can see this from the equation itself:E = 0.5 C V2The energy E depends only on the capacitance C and the charge voltage V. It does not depend on any other variables, such as how the voltage got there or what path it took. For an ideal capacitor that equation is universally true. There are no restrictions at all on how the capacitor got charged.

author: Hunter1
author_rank: Newbie
timestamp: September 21, 2013, 02:14:08 am
content: Quote from: Dave on September 20, 2013, 10:06:10 pmThat's the best way to understand this simple circuit and see how it behaves.

author: Zero999
author_rank: Super Contributor
timestamp: September 21, 2013, 09:54:41 pm
content: Have you tried changing the capacitor values and observing the steady state voltage?Calculate the charge on C1:C = C1q = CVNow rearrange for V but this time C = C1 + C2

author: free_electron
author_rank: Super Contributor
timestamp: September 21, 2013, 10:13:55 pm
content: Quote from: IanB on September 21, 2013, 02:07:15 amFirstlaw of nature : you cannot create energy , you cannot destroy energy. Only convert it.As current is flowing from cap 1 to cap 2 ( as long as they don;t both have the same voltage) some of that energy is converted in heat. So after charge equalisation that energy has to be removed from the equation. this will result in a net drop of the voltage across the caps.Otherwise you could create a perpeteuum mobile using three capacitors and a resistor. two in series , resistor , third. when balance has been achieved swap right one with one of the left ones and keep going...

author: onlooker
author_rank: Frequent Contributor
timestamp: September 21, 2013, 10:26:43 pm
content: QuoteYou are wrongly assuming the energy stored in a capacitor is proportional to V. But the math or physics fact is that it is proportional to V2as listed many times in this thread. Therefore, 20V drops to 10V is the correct answer and it is consistent with all known physics or math.

author: Hunter1
author_rank: Newbie
timestamp: September 21, 2013, 10:41:35 pm
content: Quote from: Hero999 on September 21, 2013, 09:54:41 pmYes, i've simulated in LTspice changing resistance, capacitance and voltage alternately maintaining the others fixed.Quote from: onlooker on September 21, 2013, 10:26:43 pmWell, i must say i didn't yet study maxwell's equations and stuff to be sure about what's happening. But i can say that as long as the electrons don't just change into something else like energy through photons or dissapear, the voltage will be EXACTLY the same in the final state(of course the voltage will be divided, so it's the algebric sum that will be the same) because the electrons generate the electric field, thus the potential difference (or voltage).

author: Dave
author_rank: Super Contributor
timestamp: September 21, 2013, 10:53:29 pm
content: Quote from: free_electron on September 21, 2013, 10:13:55 pmSeriously, read what I wrote in one of my previous posts.Quote from: Dave on September 20, 2013, 11:30:59 pmHalf of the initial energy is dissipated on the resistor, half of it is distributed between the capacitors. By having half the initial voltage on both caps, you have a quarter of the initial energy in each cap.1(initial C1) + 0 (initial C2) = 1/2 (heat) + 1/4 (C1) + 1/4 (C2)By this point I am starting to think you are just pulling my leg.

author: IanB
author_rank: Super Contributor
timestamp: September 21, 2013, 11:22:46 pm
content: Quote from: Hunter1 on September 20, 2013, 06:01:57 pmJust for completeness, here is a worked solution to the problem from first principles. (It's actually only a partial solution, because another step is needed to obtain the individual voltages V1and V2. But the other information in this thread is enough to fill that gap.)

author: free_electron
author_rank: Super Contributor
timestamp: September 22, 2013, 12:17:20 am
content: Quote from: Dave on September 21, 2013, 10:53:29 pmoh crap. i made a reasoning error. you are right. the power loss is accounted for. phew. no laws of nature were broken. ( heavy fines on that one ... )