Here is a run through the kind of calculations one can do with LTSpice using the DOD Overdrive 250 circuit as an example. You can download the LTSpice circuit (schematic) file for the DOD Overdrive 250 and related files (some taken from the Yahoo LTSpice group) in DOD250-LTSpice.zip. In some future tutorials, I will go into more detail. Also, if you look through the electronics tutorials in the Parts category of this site you will see some basic examples of LTspice schematics.
As my introductory post (An LTSpice Tutorial) shows, an LTSpice file looks very much like a schematic. At the top is a thumbnail picture of the LTSpice schematic that I have made for the DOD Overdrive 250. If you click on it, you can see a larger, more readable, version in a new browser window. Instead of a step-by-step tutorial, this time I will just comment briefly on some of the elements of this LTSpice schematic that you do not see on ordinary schematics.
The text in the upper left-hand corner contains a text title in blue and several lines in black that begin with periods. The black lines contain so-called “dot commands” that give instructions to load additional code for the SPICE simulation (the “.include” commands) and additional instructions to compute a “transient” analysis three times, for three different values of the “wip” parameter. SPICE simulations are driven by a programming language, much of it managed by the LTSpice schematic diagram. But there may still be some leftover programming like these dot commands.
Some of the components on the schematic have extra characteristics written next to them. The resistors, capacitors, diodes, and IC all look familiar. But the potentiometer (or pot) has additional material. Two components, the voltage sources V1 and V2, usually do not even appear on schematics. These components are additional parts for programming the SPICE simulations. The key features shown are that the AC input signal will be a sine wave with a 100mV amplitude and 800Hz frequency and that the Gain pot is a reverse audio pot with a total resistance of 500K with its wiper set at a rotation determined by the “wip” parameter just mentioned.
This LTSpice file produces the following figure, which shows the output for three different settings of the Gain pot: 10%, 40%, and 80% rotation.
The green wave corresponds to 10% rotation. There is some amplification because the peaks and troughs are beyond 300mV. There is even a hint of the clipping caused by the diodes at the output of this circuit.
The diode clipping is very clear in the blue wave, which corresponds to 40% rotation. The asymmetry of the diode clipping is also clear. This comes from having two diodes in series for one side of the clipping versus only one for the other.
The op amp clipping appears in the red wave, which corresponds to 80% rotation. The asymmetry from the diode clipping is still present but the hard clipping that comes from hitting a power rail is also prominent.
As a second example, I will show one way you might determine the input impedance. By definition of input impedance, I must to find the voltage divider that makes the source resistance equal to the input resistance. In effect, the input impedance equals the source resistance that halves the source amplitude. So first I introduce a source resistance R9 as this figure shows:
With LTSpice, I am going to measure the amplitude of the signal at the spot labelled “junction” for different values of R9. So R9 has been assigned the value “imped” which is varied from 500K to 1.5M in increments of 500K by a new dot command. I will hold the frequency and amplitude of the source at the values that we used before. And I will fix the Gain pot at 40% rotation. The three resulting waves at Junction are shown below:
The 1M value is just about perfect. That source resistance gives an amplitude of almost 50mV, which is half of 100mV. So for an 800Hz input signal, the input impedance of the DOD Overdrive 250 is about 1M ohms. You might guess at this point, correctly, that the 1M pull up resistor R2 is responsible for this value.
As a final example to whet your appetite, I will compute the frequency response of the DOD Overdrive 250 circuit. I replaced the .tran command shown above with “.ac oct 40 20 20K” and created this graph:
The three graphs are for the same three settings of the Gain pot. At a 10% rotation, there is modest amplification and the frequency response is fairly flat. By the time op amp clipping has set in a mid hump has appeared, a popular profile for distortion circuits.
There is lots more that we can do. Using LTSpice as a virtual bench, I have managed to learn how a constant current source (CSS), a voltage controlled oscillator (VCO), and a low frequency oscillator (LFO) all work. Because the internet is a rich but spotty source of information, LTSpice has been a great way to confirm an understanding, or to reveal misunderstandings. I will keep fleshing out this section of gaussmarkov.net in the hope that it will help others as well. Have fun!