0
\$\begingroup\$

I built a basic schema with resistor, capacitor, ground and a battery in LTspice and MicroCap. I used transient analysis mode.

I expected to see on a chart decreasing current and increasing voltage during launch fixating at 0A and battery voltage eventually correspondingly, but I got flat lines where capacitor voltage is battery voltage from time = 0 and current 0.

I wanted to prove time to charge rule for capacitor where T = 5RC.

I played with various time ranges and time steps and no luck.

What I am doing wrong?

\$\endgroup\$
2
\$\begingroup\$

For LTSpice, you'll want to add an initial condition for the cap. There are multiple ways to do this, the simplest is to modify the part value like so:

enter image description here

On a cap the ic set the initial voltage. On an inductor is sets the initial current. You can also specify node voltages etc. ltwiki topic on initial conditions has more details.

\$\endgroup\$
  • \$\begingroup\$ Thanks. It works. Default behavior is not intuitive, because in reality nobody charges my capacitors if I would experiment with a real oscilloscope. I am curious why team made such decision cause it makes entry level higher. Lot's of beginners probably resigned from the app because of this feature. \$\endgroup\$ – Daneel S. Yaitskov Nov 26 '19 at 2:30
1
\$\begingroup\$

By default LTspice starts the simulation with capacitors charged to the steady state voltage. Here are some ways to make it start discharged.

  1. In 'Edit Simulation Command' select the option 'start external DC supply voltages at 0V', or add 'startup' to the .trans directive.

  2. Make the battery into a 'pulse' voltage starting at 0V and going to its normal voltage after a short time delay.

  3. Wire a switch or transistor across the capacitor and momentarily turn it on with a voltage pulse.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.