LTspice - what am I doing wrong?

Status
Not open for further replies.

Pommie

Well-Known Member
Most Helpful Member
I started with a more complex circuit which made no sense. I then cut it down to a simple RC timing circuit,


And I can't get this to work. The voltage at the RC junction is a steady 12V and the current throughout the circuit is femto Amps.

I know it must be something stupid I'm doing but just can't see it.

Mike.
 
Spice starts out first thing and tries to figure out what happened before time zero. In your case V1 has charged up C1. So 12 volts is the right answer.
Click on V1 and change to advanced. Make it like I did. V1 starts at 0V, then goes to 12V after 10mS, Rise and Fall time = 1uS. on time 50mS.
Now you will see C1 start charging up after 10mS.
 
As ron noted, Spice normally does a DC bias analysis before starting the Transient analysis, which means the capacitor is charged to the 12V before the Transient analysis starts (as you found).
To prevent that, select the top or bottom Transient analysis option as shown below.
Either one will start the Transient analysis with the cap at zero volts.

Mickster's and ron's suggestion also will work.


 
Mickster's and ron's suggestion also will work.
There are many ways to get there. It is good to know more than one way.
The reason for "Initial Operating Point" is that it may take a long time to get a circuit up and running. Turn on a radio, TV (anything) it take time for the circuit to stabilize. Charging up the capacitors in you power supply takes time. So SPICE wants to get as much as possible worked out ahead of time.
Example; It might take 1/4 of a second for a FM radio to get up and running stable. You only want to look at a 1mS of operation after every thing is working. You do not want to see 250mS of pure garbage ahead of what you want to see.
On a very complicated circuit it might take one hour of computer time to get to the 250mS point.
 
Hi

Just add "startup" to the .trans directive like this:

.trans 50m startup

That will force the voltage source to ramp up from zero.

You will then see a slope from zero to 50ms at the RC junction but it wont be much time for the 10000u cap to charge.
Change the trans time to 1* RC (63%) or 5*RC (almost fully charged)

eT
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…