2nd harmonic distortion wanted - Page 1
Forum section: electronics / projects

author: Circlotron
author_rank: Super Contributor
timestamp: August 15, 2021, 12:07:04 pm
content: I'm thinking of building a small guitar practice amp, and seeing it's a musical instrument amp the requirements are different to a hifi amp. What I want is for it to produce second harmonic distortion. This makes a sine wave look pointy at the top and rounded at the bottom. One way of achieving this is to use a triode valve as the output device. The lower the anode voltage swings, the less able it is to attract electrons and so it becomes reluctant to swing lower. Valves can be a bit inconvenient nowadays though. Not that I don't love them!Anyway, what I would like to find out is how to introduce this same kind of distortion using normal opamps and similar. No DSP please. Could I perhaps use an analog multiplier that increase the instantaneous gain as the signal swings positive and reduces gain as it swings negative? Any other ideas?

author: gbaddeley
author_rank: Regular Contributor
timestamp: August 15, 2021, 01:05:05 pm
content: Try an inverting opamp, with one diode in parallel with the feedback resistor, and 2 diodes in series in the other direction, also in parallel with the feedback resistor. This creates asymmetric clipping. At the right level, this looks like the waveform you described. This is similar to the Boss Overdrive effect pedal.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 15, 2021, 01:21:32 pm
content: Maybe build an active full bridge rectifier with one or more opamps? (Without the buffer cap at the output of course.A search like this also brings up hundreds of schematics for ideas:https://duckduckgo.com/?q=guitar+amplifier+distortion+circuit&t=hy&va=g&iax=images&ia=images

author: David Hess
author_rank: Super Contributor
timestamp: August 16, 2021, 02:41:52 am
content: The first thing I would try is to full wave rectify the signal, and then use a potentiometer between the original and rectified signal to sum them with a variable ratio so it can be adjusted from 100% original to 100% rectified. That will at least give some idea of the ratio for the desired sound.

author: bob91343
author_rank: Super Contributor
timestamp: August 16, 2021, 05:51:49 am
content: The problem is to generate second harmonic only. All these ideas generate many harmonics. Second harmonic is one octave, similar to the system called Varitone or the like. Well, maybe that one generated half frequency.But second harmonic alone is not so simple.I am facing a related problem, trying to generate a 20 MHz signal from a 10 MHz source. I also want only the second harmonic. Since I am not going to change frequencies, it's easier. But for a guitar, it has to work with several octaves of source signal, which itself contains harmonics.

author: Terry Bites
author_rank: Super Contributor
timestamp: August 16, 2021, 03:29:29 pm
content: EDN ran series on pedal designhttps://www.edn.com/distortion-pedal-circuit-features-low-power-and-soft-clipping/For diode feedback cicuits use germanium eg 1N34A. They have softer condcution knee than silicon.Then theres sin^2. Using an feeding the same sinusoid ino the X and Y inputs of an analog multiplier will output double the frequency. An AD633 will do nicely.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 16, 2021, 05:16:48 pm
content: Well, no simple analog circuit is going to give you 2nd harmonic distortion ONLY. Tube amps do not do this.What you probably want is a circuit that generates EVEN harmonics - not just the 2nd harmonic.(Note that, apart from the technical difficulty, distorting the input signal to generate the 2nd harmonic ONLY would probably sound rather uninteresting on a guitar signal.)Basically, even harmonics appear when the signal loses its symmetry. So what you want is a circuit that will "amplify" (quotes because it doesn't need to have a gain > 1 for this) the signal asymmetrically.Additionally, you usually want to not just generate even harmonics, but minimize the odd harmonics too. For this, a "soft clipping" behavior helps.So, all in all, you want a combination of both: asymmetric amplification and soft clipping. As some have suggested above, a simple, yet working technique is what has been done in "overdrive" pedals for a long time: opamp-based circuits with diodes in the feedback path.For asymmetry, you can use a different number of diodes in each direction, as also suggested above. Or, you can use the same number of diodes in each direction, and add some offset voltage to the input signal. It'll get you asymmetry as well. (Of course don't forget to add a final series capacitor at your circuit's output to remove DC.) You can use a combination of both. You can also cascade stages like this. You'll also need to add filters. IIRC, the Boss OD has an high-pass filter before the saturation stage, and a low-pass filter after. This is because distorting equally low and high frequencies of your input signal would yield a pretty "muddy" sound. The final low-pass is to limit the high-frequency components after the saturation stage (there can be a lot of harmonics in the output, and even if they'll be mostly "even" harmonics, that won't sound pleasing at all if you don't cut them off to a reasonable frequency.)In any case, you can look up schematics of the original Boss OD: they are easily found on the web.

author: bob91343
author_rank: Super Contributor
timestamp: August 16, 2021, 06:40:21 pm
content: Interesting that you are concerned about harmonics not sounding pleasing. After listening to a number of these distorters, I have not found one yet that gives me pleasing sound. It also seems to be a travesty to take an art form and then use technology to change it. A 'sweet' sound does sound pleasing, one that has no 7th harmonic and perhaps, depending on the source, very little fundamental.The 7th harmonic has been the subject of many experimenters. On a piano, for instance, the hammer is set at 1/7 string length to minimize 7th production. On brass instruments, that harmonic is avoided (for instance, trumpet has a 'forbidden' note between high G and higher C, something like an out-of-tune Ab. Violinists are taught to use the bow at 1/7 string length.Sweet and pure sounds are, to me, much preferable to distorted guitars that sound as though they are overdriven. But that's my take on it, and I don't expect general agreement.

author: magic
author_rank: Super Contributor
timestamp: August 17, 2021, 09:10:26 am
content: Quote from: Circlotron on August 15, 2021, 12:07:04 pmIt's probably similar to the distortion you get from a simple inverting common emitter stage with little or no emitter degeneration (say, <100mV across the emitter resistor) and resistive collector load. Collector current varies with output swing and modulates instantaneous gain (transconductance) of the transistor.

author: Circlotron
author_rank: Super Contributor
timestamp: August 17, 2021, 12:09:12 pm
content: Quote from: bob91343 on August 16, 2021, 06:40:21 pmI don't like rough, grungy sounding guitars either. I just want to see if I can sweeten it up a bit, add a bit of colour.

author: RoGeorge
author_rank: Super Contributor
timestamp: August 17, 2021, 12:58:26 pm
content: An analog multiplier might do it, by multiplying the input audio signal with itself.At multiplication of two signals of frequency \$f_1\$ and \$f_2\$ the resulting spectrum is \$f_1 - f_2 \$ and \$f_1 + f_2\$. If we use \$f_1 = f_2 = f\$, then the resulting spectral components are \$f - f = 0\$, aka a DC component and \$f + f = 2f\$, so the wished second harmonic, \$2f\$.You will get not only the \$2f\$ spectral components, but any intermodulation products if there is more than a single (pure) spectral component in the original sound, which is expected, but that you'll get anyway no matter the analog type of waveform "deformation" response you choose to implement.Of course, some of the resulting doubled frequencies might fall above the audible range, so a band pass filter for the audio band only will be required to keep out the DC component and the ultrasonic components.The multiplication can be done either with a Gilbert Cell implemented with discrete transistors, or with a dedicated analog multiplier IC from Analog Devices (AD633, AD834, and so on) or Texas Instruments (MPY634), etc.

author: Circlotron
author_rank: Super Contributor
timestamp: August 17, 2021, 01:14:39 pm
content: Quote from: SiliconWizard on August 16, 2021, 05:16:48 pmYeah, I think your quite right.

author: magic
author_rank: Super Contributor
timestamp: August 17, 2021, 01:44:42 pm
content: Distortion is one of the easiest thing is the world to produce. It actually is harder to make a circuit that doesn't distortBTW, with LTspice you can process WAV files through the circuit so you don't even need to build it.

author: jonpaul
author_rank: Super Contributor
timestamp: August 17, 2021, 01:52:32 pm
content: We used an ADI Gilbert Multiplier and AGC to build exactly a guitar 2HD pedal, about 1976-1981.Very simple.You are reinventing the wheel!Enjoy,Jon

author: mawyatt
author_rank: Super Contributor
timestamp: August 17, 2021, 02:16:00 pm
content: Quote from: RoGeorge on August 17, 2021, 12:58:26 pmUsing a Gilbert style "mixer" is a technique we've used often in our high frequency chip designs as a pure frequency doubler, works well into 10s of GHz regions with fast ~400GHz SiGe transistors in the IBM SiGe BiCMOS processes we designed inThe analog square function produces the trig identity of Sin^2 X = {1-Cos(2X)}/2, so you just high pass (AC couple) to remove the DC term and end up with 1/2*Cos(2X), or double the frequency.Best,

author: RoGeorge
author_rank: Super Contributor
timestamp: August 17, 2021, 02:34:42 pm
content: Quote from: Circlotron on August 17, 2021, 12:09:12 pmIs it the tubes amp (valves amp) sound you are looking for? Those are known as having a polynomial sigmoid like response. That's what a "rounded" peaks limiter type of circuit like the ones suggested (with diodes in the feedback path) will do, though the valve or soft limiting effect is still generating odd harmonics and you asked for even ones.The attached ppt shows the most common guitar effects with their waveform and spectrum.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 17, 2021, 05:29:34 pm
content: Quote from: magic on August 17, 2021, 01:44:42 pmIndeed, I've used this to simulate analog audio stuff.You can also simulate digitally using tools such as Matlab, Scilab, Python... whatever you're familiar with. Trying the squaring idea (typically you'd mix the original signal with the square of the signal, then you can add filters and such) would only take a few lines of code.

author: mawyatt
author_rank: Super Contributor
timestamp: August 17, 2021, 07:24:34 pm
content: We had lots of fun with guitar distortion long ago in 60s trying to duplicate the Jeff Beck and Eric Clapton sounds from the Yardbirds. At first we played around with poking holes in some old speaker cones, then putting a high current diode in series with the Fender amp outputs. The diode worked well but caused the Fender 6L6 tubes to blow, so we starting using 6550 metal cased tubes which were tougher. These then caused the speakers or output transformers to blowFortunately guitar speakers were cheap and easy to get re-coned, the output transformers needed replacing (don't think we ever found a place to rewind them) were more expensive thoughWhen the Fuzz Boxes from England arrived, well we then had the soundSame story with the Wah-Wah peddles, couldn't figure out how Eric Clapton did this with the Cream song White Room, until the Cry-Baby peddles arrivedAnother story with "The Bag" from Vox, how Joe Walsh and Peter Frampton made their guitars "talk"Fun stuff back then.Best,

author: David Hess
author_rank: Super Contributor
timestamp: August 17, 2021, 11:36:03 pm
content: If I were doing to mess around with this sort of thing now in the analog domain, I would use 4 quadrant multipliers and multifunction circuits (powers) in place of rectifiers. The inputs can be selectively filtered and DC biased to give different effects.Update: This is also how the Dalek voice modulator circuit works.

author: bob91343
author_rank: Super Contributor
timestamp: August 17, 2021, 11:57:35 pm
content: I suggest that, to get a sweeter sound with more color, try plucking the guitar closer to either the bridge or the center of the string. In the center, you get the purest sound, very few overtones. At the bridge you get lots of overtones. Once again, find the sweet spot that is 1/7 of the string length from the bridge. This spot varies as you clamp strings against frets, due to the shortening of the string. When you do this, the 7th harmonic is minimized and the sound is more pleasant, depending on your frame of reference.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 18, 2021, 12:40:51 am
content: Just use a common emitter (BJT) amp, with the emitter heavily bypassed. The gain will be pretty high, so attenuate as needed. Biasing can be with an emitter resistor (in which case, a bypass cap is required), or with shunt feedback (C-B resistor, B-E resistor) in which case the input impedance is reduced so just drive it hard enough to get the distortion/clipping desired. Adjust bias with a pot (pot between GND/+V, large resistor from wiper to base?) to vary which side is clipping, or how much slope the the transistor is making.This is more of an exponential curve, so you get all harmonics, but in the sloping range it's mostly low order. You get high order (crunchy) harmonics with clipping, particularly at the bottom end (where saturation is sharp).I have something like this on my hand made Theremin. Starting with such a pure tone as that (the mixer output has low distortion), it helps add some color, giving, say, from a soft hum/whistle/ocarina sound, up to ~clarinet, to a poor facsimile of voice or violin (since, lacking formants of course), to ~square wave of various duty. Just starting with a richer waveform (as real strings) should get things a bit more interesting, and you can go from there with reverb and etc.Tim

author: bob91343
author_rank: Super Contributor
timestamp: August 18, 2021, 04:59:43 am
content: I recall an old friend of mine, now long deceased, who practically invented this stuff. His name was Alvino Rey and he could make his guitar (pedal steel) make sounds as if it were speaking. While he was a musician of considerable fame, he told me what he really wanted was to be an electronics engineer. His variable filters and foot pedals gave him the ability to create sounds never before heard. Yet, he didn't distort the signal in the usual sense of clipping, etc. His tones were sweet and fluid.

author: gbaddeley
author_rank: Regular Contributor
timestamp: August 18, 2021, 09:44:06 am
content: Google for “boss overdrive schematic”. Plenty of Images show the 3 diode feedback loop that gives a great guitar overdrive (adjustable asymmetric gradual clipping) sound.

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: August 19, 2021, 01:46:38 pm
content: How about using a MC1496 balanced modulator IC. Feed the carrier and modulation inputs with the same signal f to produce an output 2f. Then recombine original f with 2f on the output side. No extra filters and no extra harmonics.