A Quick LTspice Tutorial - Charging Capacitor
Вставка
- Опубліковано 2 лис 2024
- LTspice can be used to quickly and easily simulate a charging capacitor in an RC circuit using a transient analysis. The issue with the transient analysis, is that it assumes that capacitors are already fully charged and are therefore treated as open circuits. To make sure this isn't a problem, you need to set the initial conditions on the capacitor to be at 0 volts.
This video goes through all the steps you need to simulate a charging capacitor and includes a bonus tip on how to change the thickness of the lines in the simulation plot - by default, they are, in my opinion, far too skinny.
For more about charging and discharging capacitors, including more SPICE simulation, check out:
electronx.ca/e...
which includes introductory circuits courses based around the free and open source text book - Lessons in Electric Circuits by Tony Kuphaldt.
3:12 God, thank you so much for this tip!! Spent a near hour pulling my hair out trying to get a very fucking simple RC circuit working with LTSPICE. Why would the initial conditions every _not_ be 0V??? Ridiculous you have to do that...thank you very much for this though, actual life saver...
If anyone was like me wondering about the wire thickness go to Tools -> Control Panel -> Drafting options -> Pen Thickness
Thank you so much! I had been struggling to figure out why my capacitor charging circuit wasn't working in LTspice, and this video was EXACTLY what I needed!
The best explanation for Capacitor charging waveform capture, its really helpful to perform the simulation for my circuits
Thanks for your kind words
For anyone looking for the trace width in later versions, its under settings now. Tools->Settings then waveform tab.
Thanks so much , very well explained
'X Lab person ,
thanks for putting this LT spice vid together.
your posting of it is in sync with something active in my life right now.
my honda motorcycle 80cc engine flywheel coil spits out 3 successive '+' 1/2 sine waves
200 volt peak every kick - start revolution. they go directly to the CDI module.
and charge a capacitor or size about 2uF.
and while 'scoping them and not getting a spark ( faulty trig signal ) an idea arose.
to connect the 1/2 sine waves to a cap on a bd. - bd. with Rs and see how the
cap charges. and then once the Rs is found. ...quickly jumper C to the primary of
the coil and see if a spark follows .
you get the idea. i see the engine as a signal generator to experiment with.
so far as learning 'cycle ignition systems.
the bugger here is the 60's weather just ended and a new cold front is moving in.
now if i had another way to get a 200Vp sine wave then this exp. could
continue indoors here where its warm
so , can you tell me if LTspice can be coded to deliver just 3 200V 1/2 sine waves
in .050 sec (to sim' a 600 rpm kick start ) ?
Thank you for the .ic tip
Extremely helpful! Thanks a lot! I liked and subscribed and waiting for more great content like this!
Awesome, thank you!
Many thanks for the explanation.
I noticed this.
Set 10V as supply voltage (no internal resistance).
Time constant is calculated differently depending on resistance (kept capacitance constant = 1000u).
R = 0.001 -> RC = 1 us => 61.24%
R = 0.01 -> RC = 10 us => 61.18%
R = 100 -> RC = 100 ms => 63.22%
Calculating 10 x (1 - EXP(-1) ) would give 63.21 %.
Differences even with peak currents.
Is it explainable ?
Thank you again
very useful, thank you!!!
for some reasons, the current rises from negative to zero instead of falling from 1.5 mA to Zero, which isnt the typical charging function of the Current in a Capacitor...
its the discharge function. i dont get why the Current function is delayed like that.
what did i forget?
Saved my day. Thanks. It is probably me, but should the .1 step command not be in the end? So
.tran 10 .1 which is the same as maximum timestep. And if you use the Edit Simulation Command window it will also automatically insert 0 for time to start saving data. Then the complete line will look like this: .tran 0 10 0 .1 Am I understanding it false?
Are you wearing special glasses to see the blue line against the black background?
Yeah, the blue is kinda dark isn't it. It's easy enough to change the colour though. Just click on the signal name at the top of the graph and you'll get some options
This doesnt work for parallel RC circuits for some reason. Needed to put a small resistance in series with the cap to display the charging