Saturday, 8 February 2014

Tube Simulator - Speaker simulator (3)

Stephan Möller speaker simulator is based on 4 consecutive sections of low-pass LC filters followed by 2 low-pass RC filters an 2 opamp followers with a potentiometer in the middle for level adjust as the figure below shows.
Since there is no information on frequency response or component values, I decided to do a completely new approach. I chose the frequency response of a good 12-inch guitar speaker and tried to simulate its frequency response with opamp based filters with no inductors which usually are quite large and bulky. The figure below shows the 12-inch Celestion Vintage 30 speaker and its frequency response:




The figure below shows the 12-inch Celestion G12M Greenback speaker and its frequency response:


As it can be seen, SPL (Sound Pressure Level) frequency response ramps up from 70 dB to approximately 100 dB between 20 Hz to 150 Hz, it stays flat at 100 dB until 1 kHz, it has a small 6 dB notch at 1.5 kHz, and it goes abruptly  up close to 110 dB at 2.5 kHz, and then it starts to go down to 80 dB with a steep fall of 10dB at 6Khz. At 20 kHz is somewhere between 60 dB and 70 dB.

In order to replicate a similar speaker frequency response, I designed a 4 section filter based on Sallen-Key opamp topology. I used TI Filter Designer tool to design the speaker simulator filter.
The figure below shows Speaker Simulator schematics.
The resulting frequency response is shown in the figure below:


Wednesday, 5 February 2014

Tube Simulator- End stage amplifier simulations (2)

End stage amplifier simulations

The figure below shows the schematics of the VoxAC30 end stage amplifier. It starts with a 2-band equalizer for bass and treble and a switch  for equalization shift that adds a deeper notch in the mid tones when activated.

It is followed by an amplification stage based on two 12AX7A valves. It is a valve version of a differential amplifier. It is followed by the high power end stage amplifier based on 4 EL84 valves that feeds the audio transformer and the speaker.


The figure below shows the schematics of the Tube Simulator end stage amplifier. It starts with an almost identical 2-band equalizer, where the values have been scaled to have the same frequency response but more reasonable values. Capacitor values have been multiplied by 100, from 56 pF to 5.6 nF and 22 nF becomes 2.2 uF. Resistor values have been divided by 100 to keep the RC ratio and the same frequency response, so 100 kohm becomes 1 kohm, 10 kohm becomes 100 ohm, and the 1 Mohm potentiometer become 10 kohm. The 2-band equalizer is followed by an RC high pass filter (100 nF, 24 kohm)

The Tube Simulator end stage amplifier consists also of two amplifier sections but opamp based.
Unity gain opamp amplifiers are used to separate each section. Unity gain has been used instead of followers to allow some gain adjusting between sections if required.
The first opamp section includes soft clipping based on silicon diodes plus negative clipping based on germanium plus a series resistor. Another RC high pass filter is added afterwards.

The second opamp section includes soft clipping based on silicon diodes followed by another RC high pass filter.


The following plot compares the time response of a 400Hz sinusoid exponentially decreasing with 50Hz time constant after the 2-band equalizer (top plot), first amplifier section (middle plot) and second amplifier section (bottom plot) of the end stage amplifier for tube simulator (green trace) and AC30 valve amp (red trace).
Different voltage levels have been scaled for comparison.



The following plot shows frequency response from 10 Hz to 20 kHz . Frequency response of Tube Simulator matches that of Vox AC30 amplifier. Different voltage levels have been scaled for comparison.

Tuesday, 4 February 2014

Tube Simulator - Preamp Simulations (1)

This work is based on Stephan Möller Vox AC30 Amplifier Simulator. It is basically a reverse engineering of his work, so it is fair to start by giving credit to his amazing work. Some schematics can be found on the internet with incomplete component values.
It consists of three stages:
  • Preamplifier
  • End stage amplifier
  • Speaker Simulator
In order to implement a reverse engineering of this project I created an LTSPice simulation of a simplified version of the real VOX AC30 amplifier and an equivalent LTSpice simulation of the tube simulator. I tried to adjust the component values in order to obtain a similar time and frequency response in both circuits for each stage.

Let's start with the Preamplifier stage.

The Preamplifier stage

The Vox AC30 preamplifier consists of two valve amplifier stages, a first stage with one 12AX70 valve followed by a second stage with two 12AX70 valves with a gain potentiometer between both amplifier stages.
These are the schematics for the Vox AC30 preamplifier:

The Tube Simulator preamplifier also consists of two amplifier stages but opamp based and a gain potentiometer between them.
The first opamp stage includes soft clipping based on zener diodes in the opamp feedback with different voltage values to provide some unbalanced clipping or saturation at positive and negative values. I found that a 6.2V and a 4.3V zener where more adequate to match VOX AC30 response. Between the opamp and the gain potentiometer there is a positive hard cliping section based on a Schottky diode with a series resistor. A high value of 470K is used that quite mitigates the diode clipping. This part is quite tricky because actually does not match valve response but having an important clipping affected negatively the next stages.

The second opamp stage includes 4 different types of soft clipping blocks:
Two blocks (positive/negative) based on 2.7V zener diodes + silicon diode in series (not sure the silicon diodes are any useful here) + series resistor (470 ohms / 10 Kohms)
One block based on a germanium diode + series resistor (91 Kohms)
One block based on a 2N2907 PNP transistor with biased base (Rq1 = 47 kohms). Real implementation of the bias will be explained later in the pratical implemention of the circuit.

The figure below shows the schematics of the Tube Simulator preamp:
The following plot compares the time response of a 500Hz sinusoid exponentially decreasing with 50Hz time constant after the first (top plot) and second (bottom plot) stage of the preamplifier for tube simulator (green trace) and AC30 valve amp (red trace). This is a bit tricky, but positive clipping is reduced in the tube simulator for a better stability and signal matching in the next amplifier stage. Voltage levels are higher in the valve amp, so signals are scaled for comparison.
 As it can be observed in the next figure frequency response from 10 Hz to 20 kHz matches very closely.

Sunday, 26 January 2014

Germanium diodes vs Schottky diodes for audio distortion

Germanium diodes are a preferred choice for use in distortion guitar pedals for their unique sounding characteristics when clipping an audio signal. Germanium clipping is softer than that of regular rectifier silicon diodes. A softer clipping generates less high frequency harmonics and hence it produces a more agreeable sound to the ears, closer to that produced by valves.

Germanium diodes also have a lower forward voltage than silicon diodes and hence they are able to clip signals at lower levels than silicon diodes.

But unfortunately, germanium diodes are scarce an expensive these days since their use as rectifiers in electronics is quite reduced and they have been displaced by a variety of different types of diodes made out of silicon. Regular silicon diode rectifiers have an abrupt I-V curve more adequate for rectification purposes, which translates in a hard clipping of the signal at approximately 600mV. On the other hand, Germanium diodes have a much less abrupt I-V curve which means that they provide a much softer clipping that starts at approximately 300mV.

Germanium diodes (like 1N34A) are hard to find in usual large distributors such as Digikey, Mouser, Newark, Farnell or RS, they are mostly found in specialised audio and guitar pedal boutiques since their use is more and more reduced to audio distortion in fuzz pedals. They are only found in conventional through-hole mounting (glass DO-7 package) but not in SMD packages.
The 1N34A can be found from 0.4€ to 1.71$ in a glass DO-7 package.


Schottky diodes (like BAT54) are a special but quite common type of silicon diodes used as rectifiers with very low forward voltage 200mV, similar to that of germanium diodes, but they also show a very abrupt I-V curve that generates hard clipping at a much lower voltage than regular silicon diodes. They can be found in many different packages including small SMD packages with the advantage that two diodes can be included in the same package, reducing BoM costs additionally. The BAT54S can be found as cheap as 0.022$ in SOT-23 SMD package.


In order to be able to replace Germanium diodes by Schottky diodes and reduce the steep ramp it only requires adding a resistor in series with the diode so that an increasing voltage drop is added with an increasing current. Using a variable resistor o potentiometer can additionally provide control on the clipping softness, higher resistor value means more clipping softness.

The figure below shows the schematics used with LTSpice simulator in order to compare the I-V and V-I curves of the most common germanium diode (1N34A) with a quite common and cheap Schottky diode (BAT54).

The schematics with diodes in series allows comparing voltage drop in both cases: Germanium vs Schottky + series resistor for a given range of current. Simulation is repeated for Schottky diode with different resistor values. Series resistor is entered as parameter Rx from 5 to 500 ohms.

The schematics with diodes in parallel allows comparing current through the diodes in both cases for a given range of input voltage and for different resistor values.

The figure below shows the resulting I-V curves with V ranging from 0V to 1V and current from 0mA to 90mA.

The red curve shows the I-V curve of the Germanium diode while green curves show the I-V curve for Schottky diode with different values of series resistor from 5 ohms to 500 ohms, the higher the resistor value the flatter the curve.
As it can be seen, there is no way to exactly replicate the germanium diode curve with a Schottky diode, but the Schottky diode may actually provide softer curves than the germanium diode which is the main purpose of using germanium diodes. For low values of current, the resistor must be higher in order to overlap the germanium curve, when current increases, the resistor must be lower, for 5 ohms both curves run parallel showing an asymptote or convergence in the infinity.

The figure below shows the V-I curves with current ranging from 0mA to 1mA and voltages ranging from 0 to 600mV.

At very low current values the voltage curves overlap for highest resistor value (500 ohms), but at higher current values the voltage curves overlap for 67 to 80 ohms.

Let's see the effects of both diodes in a real simulation using soft clipping and hard clipping configurations.
The schematics below show a circuit with both types of diodes using a soft clipping section followed by a hard clipping section.

The soft clipping section consists of an opamp amplifying ten times the input signal. Soft clipping diodes are added in both directions (for positive and negative clipping) in the opamp feedback circuit between the negative input and the output of the opamp. The chosen reference resistor (Rin) between negative opamp input and ground is 10 kohms. The feedback resistor is 100 kohm for a x10 gain of the opamp. Varying this 10k value may require adjusting the series resistor of the Schottky diodes to match germanium diode response. The series resistor value required to match germanium diode response in this case is 250 ohms.

The hard clipping section consists of two diodes in both directions between the output of the opamp and ground after a decoupling capacitor of 4.7uF. The series resistor value required to match germanium diode response in this case is 14 ohms.

Figure below shows soft clipping signal comparison for germanium (green) and Schottky (red) for an input sinusoidal signal of 440Hz and 600mV and series resistor values of 5, 25, 100, 250 and 500 ohms. Soft clipping signal in this simulation is probed between the opamp negative input and the opamp output. As it can be seen, Schottky signal (in red) is in general lower than germanium signal (in green) for most resistor values except for 500 ohms, but the waveform shape seems closer to germanium waveform for 250 ohms.

Figure below shows hard clipping signal comparison for germanium (green) and Schottky (red) for an input sinusoidal signal of 440Hz and 600mV and series resistor values of 5, 10, 15 and 20 ohms. Hard clipping in this simulation is probed between the signal connecting output decoupling cap and diodes, and GND. Schottky signal (in red) is closer to germanium signal (in green) for a series resitor value of 15 ohms.
The figure below shows the time response signal in mV for both soft clipping (top plot) and hard clipping (bottom plot) respectively. The input is a sinusoidal signal of 440 Hz that starts at 1V and exponentially decreases with a time constant of 30 Hz.

The use of a exponentially decreasing signal is chosen to recreate the response to a real audio signal source with different voltage levels from 1V to several tens of mV. Clipping is higher for higher voltage levels. The choice of Schottky and Germanium diodes also allows clipping starting at lower voltage levels (200 to 300 mV) compared to silicon (500 to 600mV) or LED (>1200mV) diodes.

The figure below shows the FFT signal (frequency domain spectrum) in dB between 300 Hz and 30kHz for soft clipping (top plot) and hard clipping (bottom plot) signals respectively using a Blackman window to soften the signals and enhance harmonics visibility.

As it can be seen, frequency spectrum for both types of diodes (germanium and Schottky) are very similar and almost overlap perfectly.
Soft clipping shows a higher level of second order harmonics (nicer to the ears and closer to valve response) which is more suitable for overdrive distortion while hard clipping reinforces third order harmonics (harsher sound) more suitable for fuzz distortion.

Conclusion

Spice simulations show that germanium diodes can be replaced by Schottky diodes plus series resistor for distortion applications with almost no difference in the waveform signals obtained.
But these simulations must be completed with real life experiments to confirm simulation results.

I plan to implement a version of the famous and noisy Shin-Ei Fuzz-Wah with the option of germanium or Schottky diodes for comparison. Stay tuned to my blog for Spice simulations of this pedal and real implementation of it.