Author Topic: Constant current source charging capacitor does not work in LTspice  (Read 943 times)

0 Members and 1 Guest are viewing this topic.

Offline MacIntoshCZTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: cz
What have i missed? It works when capacitor is bypassed.
 

Offline penfold

  • Frequent Contributor
  • **
  • Posts: 675
  • Country: gb
Re: Constant current source charging capacitor does not work in LTspice
« Reply #1 on: January 09, 2022, 09:17:47 am »
Spice calculates a DC operating point before it commences the transient analysis so that it has an initial condition to start from.
You stop that by enabling "start external DC voltages at zero" in the simulation dialogue. Starting external DC voltages at zero would give the impression that all sources were switched on at time=0.

A "better" way might be to change V2 to be a pulse that has a very long duration but a delay to its start, or change from a "V" to a "BV" (arbitrary behavioral voltage source) where you can set an if statement like "if(time>1m,1,0)" for example. That way, the opamp can stabilise as if it had been switched on for a long time with zero-volt input and you can see a more real view of what happens when you apply a signal to the input via V2.
 
The following users thanked this post: MacIntoshCZ

Offline moffy

  • Super Contributor
  • ***
  • Posts: 2019
  • Country: au
Re: Constant current source charging capacitor does not work in LTspice
« Reply #2 on: January 09, 2022, 09:29:00 am »
Put: .IC V(n005)=0 on your sheet.
 
The following users thanked this post: MacIntoshCZ


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf