Using KiCAD 8.0, using ngspice to work with an op-amp circuit. The simulation works with an ideal op-amp model, but when I try a real model file from a manufacturer (TI) I get the “timestep too small” error message:
Without “Use initial conditions” checked:
doAnalyses: TRAN: Timestep too small; initial timepoint: trouble with xu1.xin11:dvnf-instance d.xu1.xin11.d1
run simulation(s) aborted
With “Use initial conditions” checked:
doAnalyses: TRAN: Timestep too small; time = 1e-19, timestep = 1.25e-20: trouble with xu1.xin11:dvnf-instance d.xu1.xin11.d1
run simulation(s) aborted
I have tried TI’s model for a TLV9151, and for an OPA2991.
.subckt pointlessrant
The circuit is more of a test of whether spice will work for me this time. Historically, spice has been a complete failure for me. I spend a lot of time attempting to simulate a circuit, then give up and either bread-board it or just layout a design. So far this experience is the same as all others. As I mentioned, this circuit works perfectly with an idealized op-amp, but not with any actual model file from a manufacturer. I uploaded both the complete schematic and the spice netlist to make it easier to diagnose the problem(s). .ends pointlessrant
What am I trying to do? The circuit simply takes a 0-5V square wave, and amplifies it to -5-+5V, so a 10V swing. The square wave is produced by the pulse definition, also in the uploaded schematic and netlist:
PULSE(0 5 1u 500n 500n 49.5u 100u)
So, V1=0, V2=5V, 1uS delay, 500nS rise time, 500nS fall time, 49.5uS high time, 100uS period. This makes a 50% DC 10KHz square wave with 0.5uS rise and fall times.
The amplifier model is for a TI OPA2991, which has a slew rate of 21V/uS; 10V/0.5uS=20V/uS, so the pulse waveform should comfortably fall within the capability of the amplifier to double the input signal. Again, it works with a simple op-amp model, but not with any real-world spice file I have tried.
Huh, weird. Did you check compatibilty mode for pspice/ltspice? The TI model is a pspice model. I am running a slightly newer version of kicad and ngspice. Maybe some issue got fixed?
Application: KiCad x64 on x64
Version: 8.0.8, release build
Libraries:
wxWidgets 3.2.6
FreeType 2.13.3
HarfBuzz 10.0.1
FontConfig 2.15.0
libcurl/8.10.1-DEV Schannel zlib/1.3.1
Platform: Windows 11 (build 26100), 64-bit edition, 64 bit, Little endian, wxMSW
OpenGL: ATI Technologies Inc., AMD Radeon(TM) Pro Graphics, 4.6.14802 Compatibility Profile Context FireGL 21.40.64.20 30.0.14064.20002
Build Info:
Date: Jan 11 2025 18:59:49
wxWidgets: 3.2.6 (wchar_t,wx containers)
Boost: 1.86.0
OCC: 7.8.1
Curl: 8.10.1-DEV
ngspice: 44
Compiler: Visual C++ 1942 without C++ ABI
Build settings:
Each last number change in version number means several dozen bugs fixed.
Where from comes the idea to use version that has probably a few hundred bugs more compared to currently available version?