LTSpice Tutorial - part 3

Chuck D. Bones

Circuit Wizard
As requested... (drum roll please)

Part 3 - Opamps & The Tube Screamer
This time we'll simulate the Tube Screamer: a classic low-gain overdrive featuring opamps.

First, a few word about SPICE opamp models. Real opamps contain a dozen or more transistors, a handful of resistors and one or two capacitors. The transistors can be BJTs, FETs or a combination. SPICE opamp models are simplified versions of the real thing, constructed as subcircuits. A subcircuit is a convenient way of embedding a schematic within another schematic. Many opamp models are true "black boxes" because we cannot look inside to see what's there or make changes. There are a few opamp models that contain the same level of complexity as a real device. Those are rare. 99% of opamp models are a simplified version of the real deal. They will model some aspects of the real opamp's behavior accurately, other aspects poorly or not at all. Generally, opamp models will simulate AC gain, DC errors, slew-rate limiting and output swing pretty accurately. The vast majority of them do not model thermal effects, noise, power supply disturbances, or output saturation. SPICE opamp models are almost always tuned to have typical specs, not worst-case. In pedal circuits like the TS where the opamps do not saturate, the simulation will be pretty accurate. In pedal circuits like the Rat, where the opamp saturation is a critical part of the tone, the results can be much less accurate.

The Tube Screamer
Here's a simplified schematic of the Little Green Scream Machine, which is a pretty accurate clone of the Ibanez TS808 Tube Screamer. The Ibanez TS has FET switching and buffered bypass; the LGSM has true bypass switching. The LGSM retained the TS's BJT input and output buffers. Many of the TS derivatives have deleted one or both of the buffers. I left out those buffers in this simulation because they have little or no effect on the sound. The other things I did to simplify the model were to set the VOLUME pot to max and model the Vref circuit as a 4.5V voltage source. The TL072 opamp model is fairly complex judging by how long it takes LTSpice to run several iterations.

LGSM sch.png

The DRIVE pot is set up for a log taper. In SPICE, this is a true log taper. Real A-taper pots are an approximation of a log taper. What we have here is plenty close to the real thing. Notice that I wrote two .step param statements for the TONE pot. The longer one is list of resistance ratios and is a close approximation of the W taper. The shorter .step param statement simply sets the TONE pot to 7:00, noon or 5:00. Note that I made R19 variable. That's because later on I want to demonstrate that R19 does pretty much nothing in this circuit. Why Ibanez put it there in the first place is a matter of conjecture.

Draw yours up and then we'll run some simulations together.

Frequency Response
Hit the Run button and then plot V(out). We get a family of curves representing the DRIVE pot going from 0 to 10 with the bottom trace being DRIVE set to zero. Remember to tell LTSpice "don't plot phase."

LGSM gain plot.png

This plot is with TONE set to noon. We can see the mid boost freq response that is one of the defining characteristics of the TS sound. C4 is responsible for the low freq cutoff; C3 and C5 are responsible for the high-freq cutoff. The max gain is 35dB, which is pretty low for a distortion pedal. Compare that with the 80dB max gain of a typical BMP or 110dB+ from the high-gain pedals by Friedman, Diezel & Revv.

Now let's see what happens when we turn the TONE pot. Put an asterisk in front of the .step dec param D 0.01 1 5 statement and remove the asterisk from the front of the .step param T list... statement. Hit run. The plot now looks like this:

LGSM tone plot 1.png

A little confusing at first. The green trace at the bottom represents TONE at zero. The dark red trace at the top is with TONE at 10. Let's make it a little easier to view. Put the asterisk back at the front of the .step param T list... statement and remove the asterisk from the front of the .step param T 0 1 0.5 statement. Hit Run. Now we see just three traces. TONE at zero, noon and 10. Now it's easier to see that TONE is a Treble control.

LGSM tone plot 2.png

Now let's take a look at only the tone shaping that happens after the distortion stage. Right-click on V(out) at the top of the plot window. A dialog box opens. Edit the text to read: V(out)/V(stage1) and hit OK. Now the plot looks like this:

LGSM tone plot 3.png

WTF does R19 do?
Good question, let's find out. Remove the asterisk from the statement *.step param Rx list 10K 1G. Now when we hit Run, LTSpice will run the simulation six times. All three setting for the TONE control with R19 = 10K and again with R19 = 1GΩ, which effectively takes R19 out of the circuit. Here's what we get:

LGSM tone plot 4.png

Look closely, there are three pairs of traces that completely overlap above 2KHz. Below that they differ by less than 1dB. A 1dB difference is barely detectable by ear under the best listening conditions. So the short answer to the question is "not much." As long as R19 is at least 10x larger than R9, you can leave R19 out and never know the difference.

If you want to see some interesting stuff, try varying C5 and/or C6.

OK, enough with looking at frequency response, let's see some waveforms. Put the asterisk back into the .step param Rx list 10K 1G statement. Put an asterisk at the beginning of the .step param T 0 1 0.5 statement. Put an asterisk at the beginning of the .ac statement and remove the asterisk from the .tran statement. Now instead of simulating the freq response, we'll simulate the large signal time-domain response. One more thing to change. In the plot window, edit V(out)/V(stage1) back to read V(out). Hit Run. The waveform looks like this:

LGSM waveform plot 1.png

Notice that the envelope of the waveform is not flat anywhere, it tapers down the entire time. What this indicates is that the TS has mild compression, compared to say a BMP. One of the reasons the compression is low is because the TS has a built-in clean bleed. Since the 1st stage is a non-inverting amplifier, the original clean signal gets thru and mixes with the clipped signal.

We talked about looking at harmonic content in Part 2, so I won't repeat the how-to part here. I will remind you that for LTSpice to produce a usable FFT (Fast Fourier Transform, the tool we use to look at harmonics), the waveform needs to be uniform. To accomplish that, we have to do two things:

1. Make the input constant amplitude. In the advanced settings for Vin, change Theta to zero.

2. Start capturing output waveform data after the initial start-up transient has settled out. To do that, go into the .tran settings and set Time to start saving data to 100ms.

When we do all that, the FFT looks like this:

LGSM harmonics plot 1.png

Note that we have only odd-order harmonics because the clipping is symmetric.

Homework: try adding another 1N4148 in series with one of the diodes. Notice what happens to the symmetry and harmonic content. Or try some other diode combination, like a 1N4148 and an LED.

Chuck D. Bones

Circuit Wizard
You're welcome. Try playing with those tone caps and let us know what you think. C5 affects the treble no matter what the TONE setting is. Smaller = brighter. C6 sets where in the spectrum the TONE control does its thing. C6 bigger makes the TONE control influence reach down into the midrange.


Village Idiot
Finally got some time to spend with this after dinner. I still have a bit to do on the sim...


...but I think I'm close on the breadboard...


I used trimmers for the step params...good, bad, or stupid idea?

Chuck D. Bones

Circuit Wizard
It's fine.
I've found that too many variables, either in simulation or on the breadboard can quickly lead to confusion. It's good to pay attention to how the trimmers interact and make sure you know which one you're turning.
  • Like
Reactions: fig

Chuck D. Bones

Circuit Wizard
I think I see it. You named the Voltage sources Vref and Vcc, but did not connect a net named Vref or Vcc to the + end of the Voltage sources. I used the same names for the Voltage sources and the Nets, which may have caused some confusion for you.

Just to clarify, it is ok to use the same name for a net, a part or a parameter, but that does not connect them or associate them. It is certainly not mandatory to use the same name for a part and a net. But you do need to somehow connect the + end of the Voltage sources into the circuit, either directly with wires or with net names.


Village Idiot
This thing rocks....It has a slight gate to it, but retains decent sustain and a gnarly growl. I haven't tried any mods yet or even played with the trimmers much.

I added a 78L05 for Vref. I'll hook it up to the scope later.

I may vero and box this once I get it just right.

Awesome tutorial as always sir!


Chuck D. Bones

Circuit Wizard

I'm surprised that it's gating. Not normal at all. Maybe what you're hearing is the clean bleed?

Are you using 10K for R5? That really loads down the pickups. I prefer 220K to 1M or more at the input.
  • Like
Reactions: fig


Village Idiot
On that note I stuck in a 510K and it made a clear difference. I could hear harmonics singing...I believe this is going to work out nicely with some more attention. I'll try out the tone mods you mentioned above as well.


Well-known member
I'm running a simulation with two variables at the same time. Is there a way to have the parametric plot lines be labeled in the plot screen to better differentiate the lines?

Chuck D. Bones

Circuit Wizard
Not that I know of. What I do to keep the plots uncluttered is take fewer steps for each variable. Start with three steps for each variable. Try one at the min value, one max value and one in the middle. Here's one I did of the Sherwood tone controls a while back.

EQD Westwood [Sherwood] Bass & Treble sweep.png

Once I see the interactions, then I'll fix one variable and take smaller steps with the other, then change the first variable and run another sweep.

Chuck D. Bones

Circuit Wizard
Responding to Fig...
True, I even run multiple instances of LTSpice. Makes it easy to compare different versions of a circuit.

Wish I could help you withe Mac. I stopped using Apple products when they switched over to the closed architecture.
Last edited:
  • Like
Reactions: fig