Can't calculate DC operation point

I am trying to simulate the circuit from this app note:

My goal is to run a transient analysis, which does not work. So I have gone back one step and am just trying to calculate the DC operation point.

Unfortunately, it cannot find a solution. I already tried to add the .rshunt option. It also shows up in the spice netlist.
The output from ngspice is:

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.9105E-03 Warning: Further gmin increment
Trying gmin =   9.9775E-03 Warning: Further gmin increment
Trying gmin =   9.9944E-03 Warning: Further gmin increment
Trying gmin =   9.9986E-03 Warning: Further gmin increment
Trying gmin =   9.9996E-03 Warning: Last gmin step failed
Warning: Dynamic gmin stepping failed
Note: Starting true 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.9105E-03 Warning: Further gmin increment
Trying gmin =   9.9775E-03 Warning: Further gmin increment
Trying gmin =   9.9944E-03 Warning: Further gmin increment
Trying gmin =   9.9986E-03 Warning: Further gmin increment
Trying gmin =   9.9996E-03 Warning: Last gmin step failed
Warning: True gmin stepping failed
Note: Starting source stepping
Note: One successful source step
Warning: source stepping failed
Note: Transient op started
Error: Transient op failed, timestep too small
DC solution failed -
Last Node Voltages
------------------
Node                                   Last Voltage        Previous Iter
----                                   ------------        -------------
probe_int_+5v_c2                                  5                    5
+5v                                               5                    5
net-_u1a-ain-_                                 -nan                 -nan
probe_int_/aout_c1                             -nan                 -nan
/aout                                          -nan                 -nan
probe_int_/aout_r5                             -nan                 -nan
probe_int_net-_j2-in__r6                       -nan                 -nan
net-_j2-in_                                    -nan                 -nan

A lot more internal nodes of the max9000 model that are all nan (a few are 0) follow.

Any ideas on how to debug this?

Project files: 20231107_pulse-generator-sim.zip (106.4 KB)

The model itself says

* Recommendations:
*        Use SIMETRIX (or SPICE 2G6; other simulators may require translation)
*        For a quick, effective design, use a combination of: data sheet
*            specs, bench testing, and simulations with this macromodel
*        For PSpice .options ITL4=20 can be used for convergence
*     
* Supported:
*           DC Gain, Band-width, Small Signal and Large Signal Transient Analysis, Slew Rate, Hysteresis
*       Model works only at temperature 25 degree celsius
*                  
* Not Supported:
*       This model does not operate other than 27 degree celsius
*       CMRR and PSRR.

I don’t find transient or dc in the list of supported modes. Is this the original problem?

I have not been able to get this MAX9000 model up and running.

Attached you will find a slightly modified model (4 diodes have got an additional series resistance of 1mOhm, to avoid the nan, even 1microOhm would be sufficient). Then the convergence problems are gone.

max9000_mod.7z (3.3 KB)

But the circuit does not start. The v(/ref) output is 10 V ?!

I have checked with another simulator. Same result. The MAX9000 model from ADI seems to be buggy.

Maybe you start with some other dual OpAmp and a discrete reference, just to check if the circuit is o.k…

The MAX9000 downloaded yesterday from the Analog Devices web site is buggy. I have checked in the LTSPICE forum: Attached you will find an updated model with corrected pin assigments. This does run in standard ngspice (oscillation starts after 150us initialization time).

max9000_LT.7z (3.4 KB)
.

1 Like

Thank you very much!

Unfortunately, I am still having troubles, would you be so kind and share the netlist of the working transient sim?

Attached you will find the zipped project file.

MAX9000.7z (45.9 KB)

pulse-generator-sim.kicad_sch has been modified to read the bugfix model max9000_LT.lib in KiCad 7.99, using the appropriate pin sequence. I did not touch the PCB.

pulse-generator-sim.cir has been extracted from the circuit schematic and enhanced by the .tran statement and a .control section to run the simulation and plot the results with plain ngspice.

The KiCad output looks like

I have a very strong dislike for maxim chips.
They have a knack for designing specialty IC’s for specific applications, and very often their IC’s get progressively more expensive until they reach a price point no sensible person is willing to buy them anymore and then they go obsolete. Maybe this policy is a bit less worse now then it was a bunch of years ago (Maxim got boutht by some other company) but I don’t want to get shammed by them again, and mostly avoid their IC’s.

Your circuit is nothing special. It’s a comparator with hysteresis (feedback via R2) and the second opamp is an integrator. That should get you a triangular waveform with almost any generic opamp.

their choice of using particular packaging and pinouts has also a important role of their “hate me” policy. :slight_smile: