Hi,
Using a Sallen-Key 2nd order low-pass filter, simulation works well with the TI LM324 model.
When using the ST TSX631 spice model, simulation failed. I am aware of the pin assignment as per the simulation model: .SUBCKT TSX631 VP VM VCCP VCCN VS
to be aligned with the schematics.
The error given by Spice simulator:
Note: Compatibility modes selected: ps lt a
Circuit: KiCad schematic
Reducing trtol to 1 for xspice ‘A’ devices
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Note: Starting dynamic gmin stepping
Trying gmin = 1.0000E-03 Warning: Further gmin increment
Trying gmin = 5.6234E-03 Warning: Further gmin increment
Trying gmin = 8.6596E-03 Warning: Further gmin increment
Trying gmin = 9.6466E-03 Warning: Further gmin increment
…
Trying gmin = 9.9996E-03 Warning: Last gmin step failed
Warning: True gmin stepping failed
Note: Starting source stepping
Supplies reduced to 0.0000%
Trying gmin = 1.0000E-02 Warning: gmin step failed
Warning: source stepping failed
Note: Transient op started
Error: Transient op failed, timestep too small
AC operating point failed -
Last Node Voltages
—————————
Node Last Voltage Previous Iter
—— —————— ——————
/vbat_adc nan nan
probe_int_/vbatout_r4 nan nan
…
v.xu1.v57#branch nan nan
r4#branch nan nan
a$poly$e.xu1.e_ro1_voh#branch_1_0 0 0
a$poly$e.xu1.e_ro1_vol#branch_1_0 0 0
doAnalyses: AC: Timestep too small; frequency = 0: trouble with xu1:diode_novd-instance d.xu1.d29
run simulation(s) aborted
Error: vector frequency not found!
Error: vector V(/VBat_ADC) not found!
Error: vector frequency not found!
Error: vector V(/VBat_ADC) not found!
Am I missing something simple ?
I can give details of the schematics, spice models and pin assignment if required.
Thanks for help
Application: KiCad x86_64 on x86_64
Version: 7.0.7, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.13.0
HarfBuzz 7.3.0
FontConfig 2.14.2
libcurl/7.88.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
Platform: macOS Ventura Version 13.4 (Build 22F66), 64 bit, Little endian, wxMac
Build Info:
Date: Aug 14 2023 15:55:50
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.82.0
OCC: 7.7.0
Curl: 7.77.0
ngspice: 38
Compiler: Clang 13.0.0 with C++ ABI 1002
Build settings:
KICAD_SPICE=ON
paul@cezanne:/etc/apt/sources.list.d$ apt search ngspice
p libngspice-kicad - Library (shared) for ngspice. Used by kicad
p libngspice-kicad-dev - Spice circuit simulator - development files for l
p libngspice-kicad-doc - Doc for library (shared) for ngspice. Used by kic
i A libngspice0 - Spice circuit simulator - library
p libngspice0-dev - Spice circuit simulator - development files for l
p ngspice - Spice circuit simulator
p ngspice-dev - Spice circuit simulator - development files for n
p ngspice-doc - Documentation for the NGspice circuit simulator
p ngspice-kicad-dev - Spice circuit simulator - development files for n
paul@cezanne:/etc/apt/sources.list.d$ sudo apt install libngspice-kicad
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libngspice0
The following NEW packages will be installed:
libngspice-kicad
0 upgraded, 1 newly installed, 1 to remove and 16 not upgraded.
...
After installing the libngspice-kicad package it worked for me too.
I created a packaging issue for this. I’m not sure if I put it in the right place, but it is the closest I could find:
Yes, it works. Thanks.
The works done are huge: Kicad side (eeschema, pcb, aso) and the integration of ngspice. Congratulations.
However, the learning curve of ngspice within Kicad is steep. Especially regarding the error messages.
In my case:
Error: Transient op failed, timestep too small
or Error: Transient op failed, timestep too small
were misleading as the error was standing in the voltage source in the schematics.
As a suggestion for improvement, before running the simulation, would it be possible perform sanity checks ? More precise error messages will help, pointing in the right direction !
Despite these hurdles, the Kicad package is of great quality and the simulation tool extremely usefull.
Best !
I too am trying to hunt down a Error: Transient op failed, timestep too small` but I do not yet understand your solution. (I will re read some more and perhaps will get it.)
But if you could restate your problem and restate the fix and why the error message appeared as it did that might help us.
As far as I remember, there was an error in my schematics with the power supplies. This was a bit hard to nail down as the error given by Spice was misleading. I had difficult times to set-up a working simulation. But once it does work, it is definitely useful.
I think I am fighting two problems. One is that I got a library part for an E POLY source with had no template. I may have overcome that. I now am trying to figure out a failure
Error: Transient op failed, timestep too small
Transient solution failed -