Introduction: Analog Noise Cancelling Headphones

Picture of Analog Noise Cancelling Headphones

Noise cancelling headphones are an ideal choice for many music listeners for their ability to cut out ambient noise without raising the audio volume to levels that might be dangerous for the ear. Even with no music playing, the headphones have the ability to mute ambient noise – perfect for those trying to work or sleep in environments where ambient noise is commonplace (e.g. airplanes, outside, etc). There are several methods of noise cancellation with headphones. The idea behind the majority of designs involves placing a microphone on the outside of the headphones to pick up the ambient noise; this noise is then inverted and played into the ear with the music in hopes that the noise and inverted noise cancel each other out keeping in mind that the inverted signal’s delay also needs to be altered in order to insure the noise and inverted noise waved arrive to the ears at the same time. Other designs contain more complex feedback systems such as those designs that use a microphone on the inside of the headphone to determine the level of noise cancellation that is occurring.  Additionally, digital designs that incorporate adaptive filtering are prevalent in many commercial products today. Our particular project involves the use of a purely analog design, with a mic mounted to the outside of each ear, inverting the mic output, and summing this output with the music before sending the music into the ear.

This instructable will describe how to build an all analog stereo noise cancelling headphone system using opamps, resistors, and capacitors. The design presented here targets noise below 1 kHz which encompasses much of the ambient noise from planes, fans, cars, environment, etc. The above schematic is for one channel only. Simply duplicate this and you have stereo.

To build the full system in stereo you will need:

1 x pair of over ear headphones
6 x LT1056 OpAmp
2 x ECM-60PC-R Electret Mic
2 x 3.5mm Audio Jacks

2 x 0.01µF Cap
4 x 1nF Cap
8 x 10µF Cap

2 x 100Ω Res
2 x 1kΩ Res
2 x 2.2kΩ Res
2 x 4.7kΩ Res
8 x 10kΩ Res
2 x 13kΩ Res
2 x 22kΩ Res
2 x 1MΩ Res
2 x 500k Potentiometer

Lots of wires
A power supply (we used +/- 8V, but 9V works too!) capable of at least 30mA
Breadboard to build and test
Oscilliscope for testing

This instructable was made by Simon Basilico and Chris Russ as part of a project for EE 122A at Stanford University taught by Professor Greg Kovacs and Laurent Giovangrandi with help from
TA Bill Esposito.

Step 1: The Block Diagram

Picture of The Block Diagram

The signal path can be seen in the block diagram above. First, the noise is passed into the mic where it goes to a preamp then an all pass filter to delay the signal.  Finally the noise is input to the summing amp and added to the music signal. This stage also inverts the noise as a summing amplifier is a special case of the standard inverting amp.  The amplitude of the noise is determined by this stage and must be tuned to achieve proper noise cancellation.  The inverted noise plus music signal is then played through the headphones and cancels out the unwanted noise. The next steps explain each stage further.

Step 2: Mic Setup and Power Supply Filter

Picture of Mic Setup and Power Supply Filter

The microphone stage is constructed according to the schematic above. The low pass filter on the power supply Vdd (R11, C5, C6, C7) is needed to remove high frequency noise from appearing at the mic output.  This is especially important if you are using a digital power supply. R10 is used to properly bias the mic and C2 is an AC coupling capacitor used to remove the DC offset and only pass the noise signal that the mic is detecting. This configuration was found on the data sheet for the mic. The output of C2 leads to the preamp stage.

Mic datasheet:

Step 3: Mic Pre Amp

Picture of Mic Pre Amp

The mic preamp stage is used to amplify the noise signal to a level where we can actually process it. The gain of this part actually depends on the frequency of the incoming signal. In simple terms, this stage acts as a unity gain amp for DC and a non-inverting amp with gain R1/R2 (22/1 here) for all other frequencies. This is again to reduce the DC component of the noise-cancelling signal. The problem with DC is that it causes an offset in the noise-cancelling signal which will cause the system to not work correctly.

Non-Inverting Amp Description (Page 3):
LT1056 Datasheet:

Step 4: All-Pass Filter

Picture of All-Pass Filter

The all-pass stage delays the noise-cancelling signal and preserves unity gain. The delay is needed because the noise sound that we wish to cancel takes time to get from the mic to your ear. Electronic signals are much faster than sound so it is necessary to slow down the noise-cancelling signal or else the two will not arrive at your ears at the same time.

All-Pass Filter Description:
LT1056 Datasheet:

Step 5: All-Pass Filter Design

Picture of All-Pass Filter Design

This step is a more in depth description of how the all-pass was designed and is not a build step. You can skip ahead if you want or continue reading to learn more!

We first measured the distance from the mic to your ear (2cm). Then calculated how much time a sound wave takes to travel this distance using:
     Distance(from mic to ear) = rate(speed of sound) x time delay
     Time delay = 2 x 10-2 m / 340 m/s ≈ 60µsec
Then, to find the phase lag in degrees needed we used the equation:
     Phase lag = time delay x frequency x 360
     Phase lag = 60µsec x frequency x 360
From here we needed to decide what range of frequencies we wanted to cancel out. We chose 1 kHz as the max and calculated what the lag needs to be for two points:
     @60Hz : phase lag = 1.3 degrees
     @1 kHz : phase lag = 21.6 degrees
From here, we tweaked the value of R4 and C3+C4 to get the phase shift to be at our desired values.

Step 6: Summing Amp

Picture of Summing Amp

This final stage adds the music to the processed noise signal and inverts the sum. The key part here is to tune the gain of the noise-cancelling signal so that its amplitude matches the amplitude of the sound signal. This is one of the more difficult parts of the design and is why the potentiometer has been added.  The music input’s gain will be 1 (R6/R8), while the noise-cancelling signal will have a gain of R6/R7.  After setting up the system, we adjusted this potentiometer until it sounded like there was noise cancellation occurring. This may sound arbitrary, but audio engineering where one of the signals that you are using is a sound wave is very difficult to quantify or see on an instrument.

The music input comes from one channel of the 3.5mm audio jack.

Summing Amp Description (Page 5):
LT1056 Datasheet:

Step 7:

Picture of

The final stage of the system is a current limiting resistor in series with the headphones. The headphones we chose have an impedance of 24 Ω.  With using power rails of +/- 8V this means that the output current could be up to 333mA.  With the R12 added the max current is reduced to 65mA.  This is done to protect the headphones (based on power rating) and your ears (more current means way louder).

The output of R12 is attached to the 3.5mm audio jack so that standard headphones can be connected.

Step 8: Completing the System

Picture of Completing the System

Steps 2-6 describe how to build one channel, but we want stereo noise cancelling headphones! Simply build the same circuit again and you’ve got your stereo analog noise-cancelling circuit complete!

At this point, all you need to do is attach the mic to your headphones.  You should aim the mic facing out and in the middle of the headphone. Unfortunately this means you are going to have a long wire from the mic to your circuit and long wires mean that there will be a lot of induced noise, especially at 60Hz.  To help reduce this, we twisted the wires as seen in the picture below.  Shielding would also greatly help, but we did not have the time to implement it.

Step 9: Listen to Noise-less Music

Picture of Listen to Noise-less Music

Now you have noise cancelling headphones! These aren’t quite Bose quality headphones, but do noticeably cancel out low frequency noise and are completely analog.

Thanks for reading and if you have any questions we can be reached at:

Simon Basilico:
Chris Russ:

Step 10: Important Observations

Here are a few notes about things we noticed that affected the project. 

We had a few issues using 1k resistors with the LT1056 opamps. There were some very strange problems that were resolved when we replaced them with 10k. 

If you use a digital power supply make sure to add the filter from the supply to the mic because the digital supplies tend to be noisy. 

The long wire from the mic to the circuit picks up a lot of noise. This can be mitigated by twisting the wire as shown in the design and also shielding the wire. 


SHELEP999 (author)2017-11-22

This circuit works in theory but not practical, I cannot hear any difference, on my oscilloscope the circuit performs as needed but has no effect on noise.

SHELEP999 (author)2017-11-15

I cannot work out the R4,C3,C4 values with the formulas provided for frequency 60Hz and 1kHz.

Below is my calculation:

@1kHz: Phase Lag = -2Tan^-1((13k * 2*10^-9)/2pi * 1000) = -8.27 *10^-9???

Please help as my headphones speaker is 3.5cm away from the MIC

stefanodipavia (author)2017-11-09

This is very interesting. How can I modify this circuit to make active noise cancellation in a mic? I need it to spak at my phone using car speakerphone.

thanke you very much

Rakshit RDh (author)2017-08-21

Can any one send the pic of a complete circuit including wiring of headphones and power supply to board as well. Because I am getting confused a bit how to connect headphones with the circuit drawn.

TillW1 (author)2017-02-21

The ear canal adds about 2-2,5cm to the distance between microphone/speaker membrane and ear drum. Did anyone try optimising the phase delay considering this?

SanhitaG (author)TillW12017-06-12

Did you follow up on this? Can you tell me how you'd think to go about it?

lpl0an (author)2016-02-22

Great work here ! Thanks !

I'm trying to understand how the system works. I've drawn the Bode Diagrams of each part of the circuit, but the phase change never reaches π either -π... Could someone help me to understand how it works please ?
Thanks ! :)

Maybe this helps :)

DerekS100 (author)lpl0an2017-03-02

when put through the inverting op amp it's like shifting it by pi

lpl0an (author)lpl0an2016-02-22

Here is the phase change i've found. The phase change without taking into account the distance between the microphone and the speakers inside the headset is in blue. In magenta this distance has been taken into account. Anyway, the phase changes and does not stay at +/- π... If someone has figured it out and can help me ^^
Thanks !

MattB34 (author)lpl0an2016-02-22


the phase change will never stay at +/- pi. In this type of circuit, the phase shift to achieve the best noise cancellation is designed around a single frequency. Put simply, there is a lot of research that the author of this 'ible put in to building it, and understanding all of the math behind proving it is a pain.

The link below makes for interesting reading - it is a senior project paper on noise cancellation. You might find your answer there - be warned though, it goes heavily into DSP transfer functions.

lpl0an (author)MattB342016-03-15

MattB34, thanks for your answer.

However you link seems to be broken I cannot reach the paper. If you could send it again it would really help me.

As a matter of fact, i'm trying to build my own noise cancelling circuit as part of a project for my competitive exams at the end of the year. As a consequence, I am interesting in understanding the maths behind this circuit (even if it means heavy tranfer functions). It would allow me to have a basis of comparison for my circuit.

I've already put a lot of work in establishing the equations behind the circuit, and I would like to understand how the phase shift works.

Thanks for your answers anyway ! :)

MattB34 (author)lpl0an2016-03-15

Ipl0an, try this google search. The very first link for me is the paper. I understand the analog side to this system, but the transfer functions are a bit out of my area of expertise. DSP is not my strong suit =) These papers got much more in to detail if you are designing a DSP based system. The first 3 links all are senior projects that might help you

justjimAZ (author)2017-01-24

Question for you:

Could this be adapted to external speakers to dampen the sound in a room?

BikramC1 (author)2016-05-15

i have a doubt with your principle..
Is the cancellation happening in atmosphere of ear. Or the cancellation is taking place within the circuit or electrically?

It happening in atmosphere of ear.

MichalČ11 (author)2016-05-23

how hard is this for a complete noob from 1 - 10?

gieuder (author)MichalČ112016-11-15


지호박2 (author)2016-11-12

is it ok to remove music input on that circuit???

will it work?

JanK159 (author)2016-08-13

Hi, It seems to be really good project, so I want to make it working well. I built it and what I saw is:

- there is no need for using 500k potentiometer, 4,7k is enough to hear any changes

- I can hear small noise cancelling effect (I'm using small earphones, so the distance from mic to earphone can be changed easily and doesn't matter at all)

Advice if you have any suggestion what to do, to make this ANC effect working well. Maybe manipulation with C3, C4 and R4 to change phase shift? (I don't have osciloscope and I'm not a specialist, just an interesting hobby making circuits).

PS. While tweaking the potentiometer, I hear the noise more from the earphone than environment, after more tweaking , I hear something like white noise, then big distortion finally. The circuit is powered by 2x9V batteries. It hasn't yet a good metal case.

OnurA2 (author)2016-05-20

Hello, would anyone help to understand where to connect the headphones on breadboard?

MalharC (author)2016-04-01

Just about to finish it ... Can anyone help me whether the TL701cn op amps will work or not... Checking the datasheet of both (LT1056s and TL701s), found same config ... And also I'm having troubles finding the ECM-60PC-R Electret Mic ... Can anybody provide me the equivalent mic that should be suitable?

MattB34 made it! (author)2016-02-16

A note to those confused on the LT1056 instrumentation amplifiers:

Yes they do work. I however, ended up using TI LM4562 amplifiers. I have built this circuit with both LT1056 and LM4562, and found the LM4562 to give MUCH better results. The LT1056 setup always came with large amounts of "hiss" (electrical noise), while the LM4562 was almost non-existent, with the same level of noise cancellation. Also, the LM4562's are dual amplifiers, which makes the circuit smaller and reduces electrical noise as well. My schematic is shown below. A note: this schematic has had specific changes to the GAIN stage of the microphone and changes to the phase delay for the all-pass filter. If you don't understand what i did, re-read step 4 & 5. This particular configuration will NOT work with most modern headphones. I tested it on very old, extremely huge headphones, just cuz it looks hilarious (and they were $5). I would recommend using the values from the 'ible above. Also, the V+, and V- bypassing is not required if you don't want to use it (if you build your own power supply I recommend it, if using batteries or an off the shelf supply, don't bother.)

MeetU1 (author)MattB342016-03-08

Hey MattB34, I wanted to build this circuit using a low voltage audio amp, primarily to use a supply of 9V only (no negative supply). Would LM386 work as a substitute? I understand I'll have to make modifications to the circuit. Could you point out where?

MattB34 (author)MeetU12016-03-15

LM386 will work. Looking at the datasheet, you would require some modification to the original circuit. They function basically the same as LT1056. The main difference to the LM386 is the gain setting. With the LT1056, you have to create your gain divider on the input/output of the op amp. With the LM386, the chip has a gain pins, which serve the function of the input/feedback dividers in this circuit. If you look at the schematic examples on the LM386 data sheet, you shouldn't have an issue with creating the circuit, as TI gives multiple examples of gain setting with their op-amp.

divyalaxmi (author)MattB342016-02-22

will it be okay if LT1056 is replaced by OPA-2134 and the circuit is still the it's the only IC available here which meets most of the requirements.

MattB34 (author)divyalaxmi2016-02-22

yes OPA-2134 will work as well. LM4562 was just what I chose. Any audio amplifier will function better than the LT1056.

MartinA88 (author)MattB342016-02-17

just so i understand it correctly, can i follow the 'ible but just switch the 6 LT1056 for 4 LM4562? (and using 6 of the 8 avalable opamps because of them being double)

MattB34 (author)MartinA882016-02-17

Correct. They are still op-amps, just better quality audio op-amps in a dual package. There is no functional difference between LM4562 and LT1056, however the supply range is slightly different (18V max on LT1056, 17V max on LM4562). Also, the LM4562 are cheaper the the LT1056.

MalharC (author)2015-12-22

Thanks for this useful reply ...

I have just created an negative voltage power supply using a NE555 IC but it is producing 2 volts less than that of the +ve supply (+9V and -7.8...) and after testing its output to it a producing a tremendous high frequency noise ...

I cannot understand why it is happening, I have just tested all the values of resistors, capacitors... they are just okay (approx.)... Is that happening for my op amps TL701 s

Presently I am following that reply creating a supply using two 9 V batteries...

I that DC noise? I just want to know... please reply...

MattB34 (author)MalharC2016-02-17


Check your output cap on the NE555 negative supply. If you are picking up high frequency oscillations, it is most likely due to insufficient capacitance on the output of the 555, since it is functioning as a charge pump.

MattB34 (author)MalharC2016-02-17


Check your output cap on the NE555 negative supply. If you are picking up high frequency oscillations, it is most likely due to insufficient capacitance on the output of the 555, since it is functioning as a charge pump.

MartinA88 (author)2016-02-17

I am having trouble finding the ECM-60PC-R microphone, would any capacative electret microphone like ( work or do i need another one?

MattB34 (author)MartinA882016-02-17

Martin, I recommend these from Digikey. However, any elect. condenser, omnidirectional mic should work, as long as it can function in your voltage supply range. Those ebay microphones might work, as long as you can confirm the supply voltage and that they are omnidirectional. The listing doesn't have much useful information. **NOTE** I got curious and tried directional condenser mics, and they do not work at all.

MattB34 (author)MattB342016-02-17

another thing to note is the very wide frequency response of the digikey microphone - 20Hz to 20kHz. some of the cheaper ones have a much higher starting frequency, like 100-500Hz, which removes the ~100 Hz band that is easiest to cancel out.

divyalaxmi (author)2016-02-15

great work sbasilico..

I am trying to build this circuit and i have difficulty in finding the op-amp LT1056 is there any alternative to that? or could you give the specification of the op-amp or what exactly the opamp does... please reply as soon as possible. LT1056 aint available here..

Thanks in advance

guomo (author)2015-12-18

Great project, thanks for posting. I'm going to build this over the holidays. However, I noticed you are not using audio amplifiers for this but instrument amplifiers. Was this a conscious choice or just what you had 6 of in your tool box? Even the data sheet of the LT1055 is conspicuously lacking audio as a suitable use. Wouldn't something like a high-performance audio OpAmp like the OPA4134 be more suited for this project?

MalharC (author)2015-12-09

I have just completed one circuit, but cannot understand how to power it, I am using 9V DC battery, could understand the Vcc+ , Vcc- and gnd... can u explain it? And another think is that I am using TL071 OP AMPS in place of LT1056 ... does it works?

MattB34 (author)MalharC2015-12-17


The +VCC and -VCC and GND mean you require two 9V batteries. (If you don't set up a voltage divider shown here). The easiest way to set this up with two batteries is to: connect two 9V in series: the + of the first battery becomes VCC+, the - of the second battery becomes VCC-, and the shared connection becomes the GND line. This allows for both + and - current to flow in the circuit.

VeeraR (author)2015-11-21

If i connect another mic to the music input pin, whether the intensity of sound at the speaker will be minimum...?

MattB34 (author)VeeraR2015-12-04

The music input pin is part of a summing, inverting amplifier, meaning it will add in the signal picked up from the additional microphone. The signal from the additional microphone will also be inverted, however it will not be delayed at all from the all-pass filter, which makes for un-synchronized signals, and would probably just make things louder. Also, it would not be amplified, unless you used microphone breakouts with amplifiers built into them, such as this one from Adafruit.

Hope this helps!

NikhilG21 (author)2015-11-12

i just want to cancel the noise in my room,is it possible to just cancel out the noise in the room without using all pass filter..

do i require all pass filter to just cancel out the noise?

MattB34 (author)NikhilG212015-12-04

The all pass filter is a necessary step. If not, the "anti-noise" signal that is being generated here will be produced too quickly to actually match up with the "heard" sound waves. Electrical signals travel near the speed of light, which is ~300 million m/s. The speed of sound is only ~343 m/s. As such, the all-pass is vital to these headphones functioning properly. If not used, the anti-noise and noise signals will not match up, and thus not cancel properly.

Does this help?

MattB34 (author)2015-08-20

built this with some tweaks.

attached microphones to regular earbuds and achieved decent results. I did not use the current limiting resistor at the output, however i am only producing the noise cancellation signal, no music added. Also switched R7 to a 5K bourns 10 turn pot, and R6 to 100 to keep the gain ratio of 50:1. The 10 turn pot is expensive, but allows for precision adjustment. R4 has also been changed due to slight distance differences from step 5. Used only ceramic caps for ease of assembly.

rikkebobbie007 (author)2015-06-16

can I just produce the counter frequency without the music as input.

sbasilico (author)rikkebobbie0072015-06-16

Yes, you do not necessarily need the music to be playing. In fact, for initial prototyping and at the early stages of this project we didn't use music to make sure everything was working properly

PaulL19 (author)2015-06-11

I have a project I would like to build involving a noise cancellation circuit. Thank you so much for this intractable. I'm not an electrical engineer by any means and this is a great project to start learning circuits. So a couple questions. I'm looking at the full res photo and seeing that there are several versions of the LT1056 chip and while you call for 6 total there are 9 on the board. Several 1222s and 0537s. I don't even know what these numbers mean and I'm having a hard time googling it (likely because I don't even know what terms to use). I'm also looking to build this with speakers instead of headphones (I understand the limitations of noise cancellation but this will be in a small, very controlled environment) so I wanted to ask about how and at which point can I introduce more amplification? Third. Can anyone point me to a good forum that might be able to help a noob with such a build so that I'm not leaving paragraph long comments on great projects like this. Thanks so much!

sbasilico (author)PaulL192015-06-16

The full breadboard photo I have 3 opamps that are not in use (I was trying a few things out and forgot to take them off the board). Those other numbers should not matter for this project. In fact, I would think most general purpose opamps would work for this project. I would think that using speakers would be very tough to do because the idea behind this architecture is to use noise that is opposite phase in order to destructively interfere with the noise you hear. This strategy means that the microphone to sense the noise and the speaker/headphone to produce the opposite phase signal must be close to each other. The last stage would probably make the most sense in terms of where to add more amplification (by simply adjusting the resistor ratios to give the opamp more gain). Hope this helps!

VincentK1 (author)2015-04-15

I purchased all the parts and they should be here in a few days. You said 6 OpAmps for stereo but in the picture you have 9 it looks like. (I'm completely new to this so i could be wrong)

sbasilico (author)VincentK12015-06-16

Hi Vincent,

In that picture of the breadboard I had 3 extra op amps that are not in use and disconnected. Sorry about the confusion!

About This Instructable




More by sbasilico:Analog Noise Cancelling Headphones
Add instructable to: