Mixing out of phase signals with differential amplifiers???

Started by Bill Mountain, March 23, 2015, 07:48:30 AM

Previous topic - Next topic

Bill Mountain

I have seen some examples in the past of circuits using a differential amplifier (like the one of page 9 of this App note:https://courses.cit.cornell.edu/bionb440/datasheets/SingleSupply.pdf) to mix signals.

I guess I was wondering if it's actually that easy.  The description of this circuit sounds like it would actually be subtracting the signals from each other not summing them together.

antonis

There are two different circuits (one summing and one subtracting)...

If you refer to figure 8, it is a differential amp which doesn't mix signals..
(it's output is propotional to signals difference - so it's a subtractor..)

Or I miss something on your query..  ???
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

blackieNYC

Mr Hammer offers an explanation of the Contrafuzz that no other seems to have noticed - it is a mix of fuzz and clean done with the + and - op amp inputs. If the signals were the same in amplitude and waveform they would cancel - this would be the sum of the difference-no difference, no sound. The clean has greater amplitude at the start, and dominates the output, but as it loses sustain the fuzz soon steps in. Very interesting.  And he suggested I substitute something else for the clean sound.
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

Bill Mountain

Sorry...I'm not always as clear as I'd like to be.

I want to mix 2 out of phase signals.  I thought the differential amplifier would allow me to do that because it has 1 inverting and 1 non-inverting input.

I thought I had seen it used in other circuits as a mixer but I can not recall any at the moment.

The descriptions I have been seeing such as the one attached to figure 8 is that is amplifies the difference between signals.

My brain is having trouble visualizing out what happens when you subtract two out of phase and very different (one dirty & one clean and low passed) signals from each other.

Bill Mountain

Quote from: blackieNYC on March 23, 2015, 08:24:32 AM
Mr Hammer offers an explanation of the Contrafuzz that no other seems to have noticed - it is a mix of fuzz and clean done with the + and - op amp inputs. If the signals were the same in amplitude and waveform they would cancel - this would be the sum of the difference-no difference, no sound. The clean has greater amplitude at the start, and dominates the output, but as it loses sustain the fuzz soon steps in. Very interesting.  And he suggested I substitute something else for the clean sound.

Thanks but they appear to be in phase with each other so I wonder if that makes a difference in how it reacts?

antonis

Quote from: Bill Mountain on March 23, 2015, 08:26:57 AM
My brain is having trouble visualizing out what happens when you subtract two out of phase and very different (one dirty & one clean and low passed) signals from each other.
I think that it isn't so complicated...

Try to draw them as two different waveforms on the same axis and - if you want - with the same amplitude...
(actually you have to draw them on two different sheets, colour their footprints (areas) and then put one over the other...)
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Digital Larry

Quote from: Bill Mountain on March 23, 2015, 08:26:57 AM
My brain is having trouble visualizing out what happens when you subtract two out of phase and very different (one dirty & one clean and low passed) signals from each other.

Let's start by seeing the effect of phase cancellation just on one signal.  Well let's imagine it.  You've got a sine wave.  You take that signal and run it into both the + and - inputs of a differential amplifier.  It cancels completely. 

Now let's delay one of the signals by 180 degrees (whatever the time for half a period of oscillation is).  Now if you look at the 2 signals on a scope, one is at its highest peak while the other one is at its lowest peak.  If you subtract those, you'll get a sine wave at twice the original amplitude.

Now suppose that you have a square wave and a sine wave at the same frequency and same phase.  If you subtract the sine wave from the square wave, you will cancel some or all of the fundamental component of the square wave (as a square wave is made of 1st, 3rd, 5th, 7th etc harmonics).  So, the result would still have the buzzy character of a square wave, but the fundamental would be diminished or gone, so it would have less low end or "body".  If you shifted the phase by 180 degrees so that the peaks were opposite each other, then the sine component would add to the square wave's fundamental and so it would have more low end now.

Shifting phase between 0 and 180 just results in less or more cancellation or reinforcement.

In the case where you have 2 arbitrary signals, still at the same frequency, the same sort of thing will happen.  If they are "in phase" (the peaks as seen on a scope go up and down at the same time) then subtracting them would result in "less", but you can consider that each frequency component would act independently.  In complex signals, some harmonic components are "in phase" and some are not (possibly).   

Differential amps are often used to cancel out some noise that is common to both inputs.  As far as active audio mixers go, I haven't seen any that weren't just an inverting op amp with multiple input resistors, so everything gets mixed in phase. 

This help at all?
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

R.G.

Yep, they do a fine job of cancelling - which is a form of subtraction.

The original job of operational amplifiers was to do analog computation, setting them up as adders, subtractors, and other computational functions to get an analog answer on the fly. The aiming computers on old navy battleships were at one time banks of vacuum tube operational amplifiers that did solutions for aiming taking into account analog inputs for direction, wind velocity, and other things.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Bill Mountain

Quote from: Digital Larry on March 23, 2015, 09:42:59 AM
Quote from: Bill Mountain on March 23, 2015, 08:26:57 AM
My brain is having trouble visualizing out what happens when you subtract two out of phase and very different (one dirty & one clean and low passed) signals from each other.

Let's start by seeing the effect of phase cancellation just on one signal.  Well let's imagine it.  You've got a sine wave.  You take that signal and run it into both the + and - inputs of a differential amplifier.  It cancels completely. 

Now let's delay one of the signals by 180 degrees (whatever the time for half a period of oscillation is).  Now if you look at the 2 signals on a scope, one is at its highest peak while the other one is at its lowest peak.  If you subtract those, you'll get a sine wave at twice the original amplitude.

Now suppose that you have a square wave and a sine wave at the same frequency and same phase.  If you subtract the sine wave from the square wave, you will cancel some or all of the fundamental component of the square wave (as a square wave is made of 1st, 3rd, 5th, 7th etc harmonics).  So, the result would still have the buzzy character of a square wave, but the fundamental would be diminished or gone, so it would have less low end or "body".  If you shifted the phase by 180 degrees so that the peaks were opposite each other, then the sine component would add to the square wave's fundamental and so it would have more low end now.

Shifting phase between 0 and 180 just results in less or more cancellation or reinforcement.

In the case where you have 2 arbitrary signals, still at the same frequency, the same sort of thing will happen.  If they are "in phase" (the peaks as seen on a scope go up and down at the same time) then subtracting them would result in "less", but you can consider that each frequency component would act independently.  In complex signals, some harmonic components are "in phase" and some are not (possibly).   

Differential amps are often used to cancel out some noise that is common to both inputs.  As far as active audio mixers go, I haven't seen any that weren't just an inverting op amp with multiple input resistors, so everything gets mixed in phase. 

This help at all?

It does.  Thank you very much!

blackieNYC

I think there is a different result. Please correct me if m wrong.
This is balanced cabling of a sort. In that world, the noise and RF is generally applied to both the + and - wires of the out-of-phase balanced pair. Thus when it arrives at the op amp it identical on both, and being "not different" it is not amplified at all.  Cancelled. Your noise is only on one leg.  It is a difference and wil be amplified.  It is "noise minus zero". The two sine waves however, one being negative and then subtracted (addition) will be amplified twice as much (sine 1 + sine 2) as the noise on one leg - because it has no out of phase counterpart to "add" to.  Sound right?
The result would be an amplification of the identical contents (just the sine) of the two waveforms (sine and square)by a factor of two, and the harmonic would only be amplified by a factor of one (relative to any overall gain of the amp).  The output would offer less difference between the two sources.  The square would perhaps be less square - the overtones being reduced in amplitude by half.  
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

anotherjim

If all you want to do is mix  2 different signals while reversing the polarity of one, just feed the one to be inverted to the usual inverting amp input resistor. The signal that isn't to be inverted goes via an equal input resistor to the amp +input and another equal resistor goes from +input to Vref (single supply case - would be to ground in balanced supply case). The 2 resistors on the +input form a voltage divider to even out the mix balance. Without this, the +input gets unity gain plus the gain set by the Rf/Rin ratio on the -input side, whereas the -input only gets the Rf/Rin gain.

Case where you may want to do this is when mixing feedback to clean input in a delay/phaser type effect, and you either want to correct another inversion to ensure positive feedback or deliberately want inverted feedback.



ashcat_lt

What the heck is going on in this thread?  Exactly what questions re we trying to answer?  

I could have sworn it was something along the lines of "Can I mix one signal with an inverted copy of itself using a differential amplifier?"  

The answer to that is yes.

blackieNYC


If all you want to do is mix  2 different signals while reversing the polarity of one, just feed the one to be inverted to the usual inverting amp input resistor


I'm reading he has two that are already out of phase, and wants to mix them as is, and not simply reverse one.

Ashcat- we're not hijacking, we're using the OP to go off on a theoretical rant.  Come join us!  Some would say it's what this forum is all about.  Pedals?  What pedals?   :icon_wink:
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

Bill Mountain

I want to reverse a distorted signal that is out of phase with the clean signal and mix them together.  Once again I apologize if I'm not clear.

Basically something like a Buffer/Boost which splits into an inverting clipping stage and then gets mixed back with the clean signal from the Buffer/Boost stage.

I'm at work so I can't draw up a schematic.

ashcat_lt

There might not be enough the same between the two signals anymore for it to matter much, but yes, the diff amp will do that.

tubegeek

This will work: what you will get is similar to a "Wet/Dry" mix control, also known as parallel effects mixing.

If you're using equal amounts of both signals, you'll end up with a blend of the original plus the fuzz, blended 50/50, making the fuzz less pronounced than the fuzz alone. Level will be higher than either input because the common signals will reinforce.

You can also subtract the signal from the fuzz by sending the two signals into the same input. I think you would use the inverting input preferably, set up as a "virtual earth mixer." The result will be just the fuzz's difference from the orginal input, and is likely to sound really weird, which may be fine.

You could put a switch on one of the signals, feed it to either of the inputs to the differential amp, and choose either of the two sounds if you wanted.

"The first four times, we figured it was an isolated incident." - Angry Pete

"(Chassis is not a magic garbage dump.)" - PRR