Precharge circuit not simulating as expected

Thread Starter

mike__MecE

Joined Feb 20, 2022
92
Hello, I am seeking some help as this basic precharge circuit simulation is not showing the behavior I expect.
When the precharge circuit switch is closed, I expected the 14000uF cap to charge in approx. 1.4 seconds and expected to see about 500mA through the resistor in the precharge circuit. Then after the cap was charged, the main switch is closed. I experimented with extremely different values for the cap and resistor, etc. but I must be doing something wrong - I am not certain the swtiches are configured correctly. I followed this (https://www.analog.com/en/resources/technical-articles/ltspiceiv-voltage-controlled-switches.html), but maybe I missed something.
Feedback is kindly requested.

1738628545733.png
 

Attachments

ronsimpson

Joined Oct 7, 2019
4,660
I had to use the .IC instruction to start out with 0V on C1.
I changed C1 value so it take a different time to charge up. Current starts out at 50mA and reduced down to very small.
1738632943074.png
 

Attachments

crutschow

Joined Mar 14, 2008
38,392
Modified circuit below:
You need to use the UIC option in the transient command so the cap voltage starts at zero.
I reduced the resistor value to 100Ω to get you desired 500mA max charging current.
The time constant is indeed 1.4s for those RC values, but that is the time it takes to charge to 0.632 of the final value.


1738633184277.png
 

Attachments

Thread Starter

mike__MecE

Joined Feb 20, 2022
92
I had to use the .IC instruction to start out with 0V on C1.
I changed C1 value so it take a different time to charge up. Current starts out at 50mA and reduced down to very small.
View attachment 341882
That's it! Thank you!
Im kicking myself because I thought of this but google said the initial condition was zero by default; I should have second guessed that. Thanks again!
 

Thread Starter

mike__MecE

Joined Feb 20, 2022
92
Modified circuit below:
You need to use the UIC option in the transient command so the cap voltage starts at zero.
I reduced the resistor value to 100Ω to get you desired 500mA max charging current.
The time constant is indeed 1.4s for those RC values, but that is the time it takes to charge to 0.632 of the final value.


View attachment 341884
Thank you very much, yes I see now that the cap voltage intitial condition must be set to zero for it to perform as expected. Great point on the time constant - I thought that was to full charge so I will make adjustments to the resistance or time as needed to fully charge before closing the main switch.

Also, unrelated, I gave you a shoutout in my last YouTube video where I made a robot drummer; it's in the acknowlegments at 6:44
Always grateful for yours and others help here.
 
Top