He who controls the SPICE, controls the universe!
Moderators: pompeiisneaks, Colossal
- Colossal
- Posts: 5205
- Joined: Sat Oct 20, 2007 9:04 pm
- Location: Moving through Kashmir
1 others liked this
He who controls the SPICE, controls the universe!
Anyone here really proficient with LTSpice? I have gone down the rabbit hole of modeling and have had good success. It's a great tool for trying ideas before sitting down at the bench. I've incorporated transformers into my designs and have run into something odd with LTSpice. As a preface, models are only as good as their assumptions; I understand that. As such, for modeling an upcoming build, I took inductance and other measurements from the power transformer I will be using, so that I could tune the model to be as accurate as possible. I also powered up the transformer and looked at the unloaded secondary voltage. For LTSpice, I am using AC Peak as the input voltage source, not RMS (I measure 122.8VAC at the wall, so, 122.8 * 1.414 = 174VAC). The build is two 12AX7s (one preamp, one PI) running into two EL34s, cathode biased at 100%, with Vox AC30 iron.
The odd thing is that when I try to use the SPICE power transformer to "power" the virtual build, the AC analysis is a mess. The frequency plots are nonsense. So when doing AC analysis, I have to use a DC voltage source and then the frequency plots come out beautifully correct. The power transformer works well for transient analysis. But I can't figure out why the model doesn't seem to work for AC analysis using the modeled power transformer (:scratches head:). I have spent hours digging for clues on engineering and SPICE forums to no avail.
Any thoughts?
Thanks in advance.
The odd thing is that when I try to use the SPICE power transformer to "power" the virtual build, the AC analysis is a mess. The frequency plots are nonsense. So when doing AC analysis, I have to use a DC voltage source and then the frequency plots come out beautifully correct. The power transformer works well for transient analysis. But I can't figure out why the model doesn't seem to work for AC analysis using the modeled power transformer (:scratches head:). I have spent hours digging for clues on engineering and SPICE forums to no avail.
Any thoughts?
Thanks in advance.
Re: He who controls the SPICE, controls the universe!
You have to use DC voltage source for AC analysis. It's possible to do a frequency sweep in transient analysis if you want to plot the frequency response with AC voltage supply but it's just much easier to use DC. In LTspice AC analysis first finds the DC operating point and then does the frequency sweep. With AC supply all of your voltages are at 0 and that's why the plots are nonsense.
Re: He who controls the SPICE, controls the universe!
Ok,thank you very much, Lauri. So it's that simple then. I was pulling my hair out thinking I was doing something wrong.
Re: He who controls the SPICE, controls the universe!
I use a user interface on top of pspice. Great stuff. I'd never even breadboard a circuit without simulating it first.
I get great results from transformer and tube models as well as R, C, and transistors.
I get great results from transformer and tube models as well as R, C, and transistors.
"It's not what we don't know that gets us in trouble. It's what we know for sure that just ain't so"
Mark Twain
Mark Twain
Re: He who controls the SPICE, controls the universe!
R.G. Can you recommend a software package that uses SPICE and a graphical user interface?
Re: He who controls the SPICE, controls the universe!
I can, but you probably won't like it
I use a quite-old version of NI's Multisim, a legacy of some contract work I did. Part of the payment was a license to the package. It's expensive. The screaming saving grace of this package is that the graphical interface lets you drag and drop component models and connect them by dragging "wires" from the terminals; the instruments are also graphical models, and you can drag in models of, for instance, a four - channel oscilloscope, a Bode plotter, a distortion analyzer, and so on.
I use a quite-old version of NI's Multisim, a legacy of some contract work I did. Part of the payment was a license to the package. It's expensive. The screaming saving grace of this package is that the graphical interface lets you drag and drop component models and connect them by dragging "wires" from the terminals; the instruments are also graphical models, and you can drag in models of, for instance, a four - channel oscilloscope, a Bode plotter, a distortion analyzer, and so on.
"It's not what we don't know that gets us in trouble. It's what we know for sure that just ain't so"
Mark Twain
Mark Twain
- martin manning
- Posts: 14308
- Joined: Sun Jul 06, 2008 12:43 am
- Location: 39°06' N 84°30' W
1 others liked this
Re: He who controls the SPICE, controls the universe!
If I may: https://en.wikipedia.org/wiki/List_of_f ... simulators The top 2/3 of the list have GUI's.
Re: He who controls the SPICE, controls the universe!
You may - and thanks. I haven't really gone hunting spice packages with GUIs.
"It's not what we don't know that gets us in trouble. It's what we know for sure that just ain't so"
Mark Twain
Mark Twain
- martin manning
- Posts: 14308
- Joined: Sun Jul 06, 2008 12:43 am
- Location: 39°06' N 84°30' W
Re: He who controls the SPICE, controls the universe!
That said, I think LTSpice is probably the most popular freeware, and new owner AD is continuing to support both Windows and MacOS versions.
Re: He who controls the SPICE, controls the universe!
This is an interesting thread, I had problems getting a simple circuit to run in SPICE and admittedly, I'm not a SPICE expert.
It was simply the Darlington transistor stage as used in the Peavey Transtube designs. (very clever and interesting circuit).
Despite the fact that it breadboards absolutely beautifully and works, I got stumped getting it into operation in a few different SPICE sims, including the one in KiCad.
The circuit is presented here in LFO form.
https://ampgarage.com/forum/viewtopic.p ... 37#p469937
I'll have to update the thread, I found a great TO92 MOSFET that allows for blinking either a neon bulb or LED for the optical tremolo function, al'a Fender and others.
It was simply the Darlington transistor stage as used in the Peavey Transtube designs. (very clever and interesting circuit).
Despite the fact that it breadboards absolutely beautifully and works, I got stumped getting it into operation in a few different SPICE sims, including the one in KiCad.
The circuit is presented here in LFO form.
https://ampgarage.com/forum/viewtopic.p ... 37#p469937
I'll have to update the thread, I found a great TO92 MOSFET that allows for blinking either a neon bulb or LED for the optical tremolo function, al'a Fender and others.
Re: He who controls the SPICE, controls the universe!
It usually takes several seconds for a phase shift oscillator to start oscillating or sometimes they don't start oscillating at all without some kind of voltage bump. In LTspice the solution is to start the voltages sources at 0V or skip initial operating point solution.
Re: He who controls the SPICE, controls the universe!
Lauri wrote: ↑Sat May 03, 2025 6:33 am It usually takes several seconds for a phase shift oscillator to start oscillating or sometimes they don't start oscillating at all without some kind of voltage bump. In LTspice the solution is to start the voltages sources at 0V or skip initial operating point solution.
Yeah, I tried all that. I also sketched up a simple, one-transistor PSO and it worked just fine.
Then I did another run with that darlington setup as a simple amplifier and it just didn't seem to work in simulation. I was puzzled, but not intrigued, so didn't dig into very much.
On the breadboard, works as expected.
Re: He who controls the SPICE, controls the universe!
I tried simulating it and it works.
You do not have the required permissions to view the files attached to this post.
Re: He who controls the SPICE, controls the universe!
I also tried simulating it with Kicad and it works with spice model from Onsemi.
Code: Select all
.model BC546B NPN(IS=2.39E-14 NF=1.008 ISE=3.55E-15 NE=1.541 BF=294.3 IKF=0.1357 VAF=63.2 NR=1.004 ISC=6.27E-14 NC=1.243 BR=7.946 IKR=0.1144 VAR=25.9 RB=1 IRB=1.00E-06 RBM=1 RE=0.4683 RC=0.85 XTB=0 EG=1.11 XTI=3 CJE=1.36E-11 VJE=0.65 MJE=0.3279 TF=4.39E-10 XTF=120 VTF=2.643 ITF=0.7495 PTF=0 CJC=3.73E-12 VJC=0.3997 MJC=0.2955 XCJC=0.6193 TR=1.00E-32 CJS=0 VJS=0.75 MJS=0.333 FC=0.9579 Vceo=65 Icrating=100m mfg=NXP)
You do not have the required permissions to view the files attached to this post.
- solderhead
- Posts: 160
- Joined: Thu Jan 16, 2025 5:42 pm
Re: He who controls the SPICE, controls the universe!
A question for all of you spice guys (and Spice Girls, though "Spice Girls" brings to mind something else entirely):
What kind of results are you getting when you try to model the non-linearities of a system? IME Spice is great for modelling in the linear range, not so great for the non-linear range of behaviors, which tend to be the more interesting operating areas in many applications.
What kind of results are you getting when you try to model the non-linearities of a system? IME Spice is great for modelling in the linear range, not so great for the non-linear range of behaviors, which tend to be the more interesting operating areas in many applications.
Better tone through mathematics.