Author Topic: 2nd harmonic distortion wanted  (Read 2563 times)

0 Members and 1 Guest are viewing this topic.

Online CirclotronTopic starter

  • Super Contributor
  • ***
  • Posts: 3307
  • Country: au
2nd harmonic distortion wanted
« on: August 15, 2021, 12:07:04 pm »
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?
 

Offline gbaddeley

  • Regular Contributor
  • *
  • Posts: 209
  • Country: au
Re: 2nd harmonic distortion wanted
« Reply #1 on: August 15, 2021, 01:05:05 pm »
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.
Glenn
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3806
  • Country: nl
Re: 2nd harmonic distortion wanted
« Reply #2 on: August 15, 2021, 01:21:32 pm »
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
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17086
  • Country: us
  • DavidH
Re: 2nd harmonic distortion wanted
« Reply #3 on: August 16, 2021, 02:41:52 am »
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.

« Last Edit: August 16, 2021, 02:54:00 am by David Hess »
 
The following users thanked this post: Circlotron

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: 2nd harmonic distortion wanted
« Reply #4 on: August 16, 2021, 05:51:49 am »
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.
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2498
  • Country: gb
  • Recovering Electrical Engineer
Re: 2nd harmonic distortion wanted
« Reply #5 on: August 16, 2021, 03:29:29 pm »
EDN ran series on pedal design https://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.
« Last Edit: August 16, 2021, 03:41:40 pm by Terry Bites »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15215
  • Country: fr
Re: 2nd harmonic distortion wanted
« Reply #6 on: August 16, 2021, 05:16:48 pm »
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.
« Last Edit: August 16, 2021, 05:21:39 pm by SiliconWizard »
 
The following users thanked this post: edavid

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: 2nd harmonic distortion wanted
« Reply #7 on: August 16, 2021, 06:40:21 pm »
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.
 
The following users thanked this post: Vovk_Z

Online magic

  • Super Contributor
  • ***
  • Posts: 7123
  • Country: pl
Re: 2nd harmonic distortion wanted
« Reply #8 on: August 17, 2021, 09:10:26 am »
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.
It'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.
 

Online CirclotronTopic starter

  • Super Contributor
  • ***
  • Posts: 3307
  • Country: au
Re: 2nd harmonic distortion wanted
« Reply #9 on: August 17, 2021, 12:09:12 pm »
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.
I 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.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6663
  • Country: ro
Re: 2nd harmonic distortion wanted
« Reply #10 on: August 17, 2021, 12:58:26 pm »
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.
 
The following users thanked this post: mawyatt

Online CirclotronTopic starter

  • Super Contributor
  • ***
  • Posts: 3307
  • Country: au
Re: 2nd harmonic distortion wanted
« Reply #11 on: August 17, 2021, 01:14:39 pm »
What you probably want is a circuit that generates EVEN harmonics - not just the 2nd harmonic.
Yeah, I think your quite right.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7123
  • Country: pl
Re: 2nd harmonic distortion wanted
« Reply #12 on: August 17, 2021, 01:44:42 pm »
Distortion is one of the easiest thing is the world to produce. It actually is harder to make a circuit that doesn't distort :P

BTW, with LTspice you can process WAV files through the circuit so you don't even need to build it.
 

Offline jonpaul

  • Super Contributor
  • ***
  • Posts: 3544
  • Country: fr
Re: 2nd harmonic distortion wanted
« Reply #13 on: August 17, 2021, 01:52:32 pm »
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
Jean-Paul  the Internet Dinosaur
 
The following users thanked this post: 2N3055

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 3777
  • Country: us
Re: 2nd harmonic distortion wanted
« Reply #14 on: August 17, 2021, 02:16:00 pm »
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.

Using 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 in :)

The 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,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 
The following users thanked this post: 2N3055

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6663
  • Country: ro
Re: 2nd harmonic distortion wanted
« Reply #15 on: August 17, 2021, 02:34:42 pm »
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.
I 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.

Is 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.

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15215
  • Country: fr
Re: 2nd harmonic distortion wanted
« Reply #16 on: August 17, 2021, 05:29:34 pm »
Distortion is one of the easiest thing is the world to produce. It actually is harder to make a circuit that doesn't distort :P

BTW, with LTspice you can process WAV files through the circuit so you don't even need to build it.

Indeed, 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.
 

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 3777
  • Country: us
Re: 2nd harmonic distortion wanted
« Reply #17 on: August 17, 2021, 07:24:34 pm »
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 blow :P

Fortunately 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 though :-\

When the Fuzz Boxes from England arrived, well we then had the sound ;D

Same 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 arrived ;D

Another story with "The Bag" from Vox, how Joe Walsh and Peter Frampton made their guitars "talk" :D

Fun stuff back then.

Best,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17086
  • Country: us
  • DavidH
Re: 2nd harmonic distortion wanted
« Reply #18 on: August 17, 2021, 11:36:03 pm »
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.

« Last Edit: August 18, 2021, 10:20:06 am by David Hess »
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: 2nd harmonic distortion wanted
« Reply #19 on: August 17, 2021, 11:57:35 pm »
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.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22307
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: 2nd harmonic distortion wanted
« Reply #20 on: August 18, 2021, 12:40:51 am »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: 2nd harmonic distortion wanted
« Reply #21 on: August 18, 2021, 04:59:43 am »
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.
 

Offline gbaddeley

  • Regular Contributor
  • *
  • Posts: 209
  • Country: au
Re: 2nd harmonic distortion wanted
« Reply #22 on: August 18, 2021, 09:44:06 am »
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.
Glenn
 

Offline Ground_Loop

  • Frequent Contributor
  • **
  • Posts: 663
  • Country: us
Re: 2nd harmonic distortion wanted
« Reply #23 on: August 19, 2021, 01:46:38 pm »
1248045-0How 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.
« Last Edit: August 19, 2021, 01:57:05 pm by Ground_Loop »
There's no point getting old if you don't have stories.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf