# How do I set my speakers out of phase?

A little bit of context: I'm doing a project for my physics class where I could choose the topic, and I chose to do phases in sound and noise cancellation (wavelengths and frequencies). Essentially, I'm measuring the distance between two out of phase speakers and how that affects the consistency of noise cancellation when playing a single tone. My only problem is that my speakers are currently in phase (as speakers normally are) and I need them to be out of phase in order for my experiments to actually work. I've read that it has something to do with the wiring of the speakers. Also, the speakers that I'm using are a pair of HP 2.0 Compact Speakers that connect to computers through a USB 3.0 and a standard audio jack.

What's the easiest way to get my speakers to be out of phase? Is wiring involved as many others have said?

• Perhals you can use Equalizer APO to invert one of the audio channels if the wiring cannot be changed. – Jeroen3 Dec 7 '18 at 14:39

I chose to do phases in sound and noise cancellation (wavelengths and frequencies)

And

What's the easiest way to get my speakers to be out of phase? Is wiring involved as many others have said?

At 1 kHz, the wavelength of sound is 34.4 cm so you don't really need to do anything other than move your sensing microphone (for the noise cancelling experiment), 8.6 cm from the midpoint position towards one speaker. The closer speaker signal will now be phase-advanced by 90 degrees and the more distant speaker will have a signal that is phase-retarded by 90 degrees and, the net effect, is that the two signals become exactly out of phase.

But this is only at 1 kHz. Should you decide to inject your set-up with 2 kHz then, despite the offset of 8.6 cm, the two speaker signals will be in phase. At 2 kHz, the offset would need to be 4.3 cm. At 10 kHz, the offset would need to be 0.86 cm.

But air temperature has to be factored in also: -

• At 0 degC, the wavelength of 1 kHz is 33.2 cm
• At 20 degC, the wavelength of 1 kHz is 34.3 cm
• At 40 degC, the wavelength of 1 kHz is 35.5 cm

So, for pure cancellation you need to consider air temperature. All of this is because the speed of sound changes with temperature.

Of course, if there are a lot of reflections in the room (where you make measurements) then this experiment will be hard to do effectively BUT, reversing the phase by swapping one of the speaker wires would also be equally ineffective. Please take into account what I'm saying or you will waste your time. It's not surprising that we, as humans make use of two ears.

My only problem is that my speakers are currently in phase (as speakers normally are)

They are only exactly "in phase" when the gap between them (for the measurement microphone) is exactly half way.

Footnote - noise cancellation is such a tricky business because slight movements can upset things and you turn a cancelling signal at one exact point into a noise enhancer a few centimetres away.

Just reverse the connections to ONE of the speakers...

Do make sure that it does not have a cross-over in it.

• Can you elaborate on the cross over part? I cannot imagine a situation where swapping the connection would do anything different depending on whether there is a crossover or not. – Vladimir Cravero Dec 7 '18 at 14:44
• Perhaps there is some confusion about swapping the polarity of one driver (speaker, the tweeter or the woofer) in a speaker-box which has a crossover filter. That would not be a good idea. Not that it would break anything, it will affect the sound quality in a (probably) bad way. Reversing the polarity of the speaker-box's connections, even if there is a crossover filter inside, will just work. – Bimpelrekkie Dec 7 '18 at 14:48
• @VladimirCravero a “cross-over” is a device that separates the highest freqencies to the tweeter, mid to mid and base frequencies to the base speaker... – Solar Mike Dec 7 '18 at 17:36
• I can't believe all the answers that don't say this!! – Scott Seidman Dec 7 '18 at 19:24
• @scott then you haven’t properly read my answer lol – Andy aka Dec 7 '18 at 22:50

Your speakers are not bare electromechanical speaker elements which convert voltage signal to air motion, they have also an amp, treble frequency separation filtering and 2 speaker elements (bass, treble) per one cabinet.

ADD: Not true, there is no treble element, only one full range element per cabinet exists - I checked it from the datasheet. But that's do not change the method.

The only practical way to demonstrate phase cancellation with them is to use music player software which allows 180 degrees phase swapping (=inversion) to L or R channel. That's possible in pro or semipro music studio software such as Reaper or Cubase. There it's needed to compensate possible mic signal wiring errors.

Not so practical, but a hardware only way is to open one cabinet and swap the wires which feed the bass speaker element and do the same with the wires which feed the treble speaker element if your cabinet has one.

• Can you justify why the connections to the speaker elements themselves must be reversed, rather than reversing the connections to the cabinet? – Elliot Alderson Dec 7 '18 at 16:44
• @ElliotAlderson analog signal input connection to the cabinet can have three actual wires: L, R, and common GND. What would you swap without making a short circuit? Nothing! If the signal is balanced, ie both channels have +, - and GND (that's five pin connection), you of course are right.Swapping + and - wires is ok. USB signal is data transfer connection which knows nor cares nothing about the data content. Just in this speaker model USB seems to be only for DC powering, not for audio. – user287001 Dec 7 '18 at 17:14
• Your answer said "open one cabinet", implying that there were two cabinets with "bass, treble...per one cabinet", but your comment talks about "the cabinet", implying that there is just one for both L and R channels. So, your answer was confusing to me. Sorry if that was insulting to you. Also, how can you say that the USB is a "data transfer connection" that "cares nothing" about the data content? If it's for power only it is not a data transfer connection, and who said anything about USB anyway? – Elliot Alderson Dec 7 '18 at 17:44
• @ElliotAlderson I believe the analog signal cable with L,R and GND wires goes from the computer to one cabinet, say to L. Then there's a chaining cable from L to R which carries R channel audio and DC power to the amp in R cabinet. I wrote about USB. I have USB audio gear which have also analog signal option. The datasheet of questioner's speakers didn't deny USB audio data possiblity nor claimed it existent. I have worked with many kind of people. I have got hard skin. Those who hadn't couldn't do that job. – user287001 Dec 7 '18 at 18:07

What's the easiest way to get my speakers to be out of phase?

Ask your physics teacher if he/she has a two-channel function generator that you can use, something like this one. This is a pretty common piece of test equipment that you can use to generate different waveforms at whatever frequency and amplitude you like. With two channels, you can connect one channel to each speaker and send each a tone, like a 500 Hz sine wave. You can also shift the phase of one of the channels relative to the other, so you can easily switch the speakers from in phase to out of phase.

Also: if your school has a function generator, it wouldn't hurt to ask about an oscilloscope too! If one is available, you can use it to visualize the signals going to each speaker.

Simply looking at the cheap speakers in Google shows that they have low power amplifiers and a tiny 2" speaker in each one, produce no bass and have no crossover network. Only one of them has the stereo amplifier and volume control, open the other one and reverse the wires to its little speaker for it to have reversed phase.

You will hear cancellation only if you have the same distance from you to each speaker and there are no echoes in the room.

There is a lot more to this experiment than inverting phase. But its a great project.

Small speakers have a cone radiation pattern that is not very linear with phase over a wide range of frequencies. The phase shift occurs with wall reflections, 12 to 24dB/octave crossover filters and also your choice of microphone and its direction will affect all your results contributing to measurement errors.

Ticky tacky details...

In RF we call it Friis Loss where power loss for some beamwidth drops inverse to the square of the distance from geometry. So conduct the experiment with the greatest distance possible so that phase and thus relative distance measurements are more about phase cancelling at high f and short wavelengths than attenuation due to doubling the distance which complicates your computed results. If you amplify the mic audio into a square wave and do the same with the source, you can use an XOR gate and LPF or any phase detector or PLL to measure the actual phase difference independent of amplitude changes.

Ideally one would use two high quality matched planar speakers ( expensive) or two tweeters as resolution increases with frequency.

Then doing a sound test like good headphones a MONO sound source should sound like it originates in the center of your head. If so then when you invert the speaker polarity on one side MONO sound should sound silent at the optimum center phase and amplitude cancelled position where you would place a microphone at right angles to verify a matched amplitude "and" phase of the combined dual pressure waves into one mic. For example most music has the main voices in MONO and the other sounds and stereo so when reversed the main voice, drums bass and anything else in MONO is attenuated. Target 30 dB for a reasonable attenuation or cancellation when out of phase and accept -20dB reduction if not possible.

The nearest sound reflector must be much greater and attenuated (curtains) than the line of sight distance between sound emitter and detector.

So just choose two matched tweeters and don't use USB, just analog output and don't push the levels to distortion using a scope on the speaker and mic for verification.

Use Audacity for a sound sine wave source with a slow log sine sweep, then choose the best frequency for phasing inside your head or quietest cancelled out of phase. To simulate Radar you can consider a staircase or swept audio burst as they do for RF in chirp RADAR to obtain even better results.

You could use it to detect the phase inversion off a wall with one speaker and microphone which is a really big RADAR target. Then with a very narrow beam megaphone reduce the scattering effects and send bursts to measure wall distance from the echo times and or phase reversal using CHIRP AUDIO to simulate Chirp Radar. Food for thought.

## Some USB cam Mics might work for this experiment

Logitech and others also have a speaker amplitude calibration test to equalize the stereo speakers using chirp audio bursts on alternate speakers and also swept sine. But this may affect phasing.

CAM Mics generally do not have rear passive "voice cancellation" like some desktop mics sothey are better for "far-field" sound measurements ( conference room) but worse for wall reflection echos.