2
\$\begingroup\$

I am new to KICAD and trying to simulate a simple voltage regulator with LM2596.

Schematic

And I got the spice model of LM2596 from TI website and SS34 spice from taiwan semi.

Now when I try to simulate the circuit, the output is not as desired.

Here is the simulation log

Note: Codel model file loading path is C:\Users\user\Downloads\kicad-simulation-test\ Background thread stopped with timeout = 0 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 Using SPARSE 1.3 as Direct Linear Solver Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Reference value : 1.00000e+00 Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Reference value : 5.00000e+00 Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Reference value : 1.00000e+01 Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully Note: Starting dynamic gmin stepping Warning: Dynamic gmin stepping failed Note: Starting true gmin stepping Warning: True gmin stepping failed Note: Starting source stepping Warning: source stepping failed Note: Transient op started Note: Transient op finished successfully No. of Data Rows : 12 

I see there are warnings in the simulation LOG, but I quite don't understand what those warnings are.

Here is the simulation output

enter image description here

Here is the simulation model PIN assignment of LM2596

enter image description here

Can someone please guide me on this and let me know how to rectify the warnings and get the desired 5V at the output?

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

Look in the model file for all these details: d_d1 PARAMS: and delete PARAMS: everywhere. There are no defined parameters for the d_d1 diode, so this is a bug in the factory model. You can see from this detail that it occurs in many places. Delete only after d_d1, not elsewhere where there are actual parameters after it. After the cleanup the model will be functional.

enter image description here

Edit:

This is a TRANSIENT model, it only works in time domain.

enter image description here

Edit2:

DC sweeping the input voltage: enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ I have done that, but can't get it working on kicad.. I am trying LTSpice now and while reading more about the model on TI forum, I saw that it is a TRASIENT model and must be simulated on a time domain. I really don't understand. If I do a transient simulation on LTSpice, I see that the output voltage is increasing slowly and it takes lot of time. I wanted to test a DC sweep to check the output voltage. \$\endgroup\$ Commented Aug 25, 2024 at 7:24
  • 1
    \$\begingroup\$ You can use a time-varying input voltage and in that time domain you will see all the parameters, including the output voltage. \$\endgroup\$ Commented Aug 25, 2024 at 9:11
  • \$\begingroup\$ Okay will do that. Can you tell me which software did you use to take the above measurements? \$\endgroup\$ Commented Aug 25, 2024 at 19:51
  • \$\begingroup\$ For similar tasks, I use the Tina or Tina-TI SPICE based simulation programs (v.9.3). Tina-TI is free, downloadable from the Texas web site. It has a few less convenience features, but it works well usable. I use the older version of Tina to make it compatible with the Texas version in both directions. \$\endgroup\$ Commented Aug 26, 2024 at 6:46
  • \$\begingroup\$ Ahh TINA, thanks.. \$\endgroup\$ Commented Aug 26, 2024 at 10:55
1
\$\begingroup\$

I get convergence error in the transient analysis without the changes stated below. DC sweeping the input voltage is not working. You will have to "sweep" the source manually. I gave the electrolytic caps some ESR and added an additional 10uF ceramic cap at the ouput. No changes were made to the LM2596 model.

  • Relative tolerance (RELTOL): 0.01

  • Integration method (METHOD): trapezoidal

optional:

  • Transient tolerance (TRTOL): 7 (with a value of 1 there is less noise/ripple but the sim takes longer)

enter image description here

With TRTOL = 7

enter image description here

Somewhat less noise with TRTOL = 1

enter image description here

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.