Skip to content

This tutorial will guide you through how to build your own wireless and/or wired headphones with ambient microphones. We start with some off-the-shelf headphones intended for use while lawn mowing, and then hack in some new electronics to allow wireless (BT), auxiliary 3.5mm TRS input, and stereo ambient microphones. The original purpose of this project was to make it easy and safe to play loud music with a rock band in the basement, however, the inclusion of the natural sounds around you into your listening experience can be useful in many other situations.

Background

The first prototype design was sparked up around the time I was designing the Qwiic Speaker Amp in August of 2022. Now, over a year later, it has been through three major versions:

With this project, I was trying to solve three problems:

  1. ) I want to be able to lower all barriers to practicing music. The less things I have to set up, the better!

  2. ) When I play drums, I need to protect my ears from getting damaged from exposure to extremely loud sounds. To do this, I usually wear in-ear monitors (IEMs). IEMs are kind of like headphones, but they are more like earbuds. They are usually custom-molded to your ear canal. In this way, they are actually working much like ear plugs and blocking out loud sounds while still providing sound to your ears. In order to get a great monitor mix, I then need to set up mics and a sound mixer. You can accomplish this with headphones too, but most do not provide a safe amount of sound-isolation. IEMs are great, but they are also very expensive. They can range from $300 to $3,000.

  3. ) My eight year old son is playing loud music more and more (acoustic drums, amplified guitar and keyboards), and I want him to be able to protect his hearing while still being able to rock out and hear the music clearly. Over-the-ear hearing protection (aka ā€œEar Muffsā€), do a great job of protecting your hearing, but they also dampen the sound way too much. In addition to missing out on many of the mid and high frequencies, it can be very difficult to hear your own instrument and even your band mates.

My idea of a perfect solution:

  • Over-the-ear headphones that have stereo ambient mics to mix in!

  • Very easy to ā€œpop onā€, with no cables attached. Nothing to wire up, just pop them on and go.

  • Mix in a desired level of the ambient mics using a single knob, essentially a ā€œmore earsā€ knob - right there on my headphones, at the ready to adjust as needed.

  • Battery powered, 100% self contained, wireless. During some jam sessions with the kiddos, we will quickly trade instruments. We need to be able to jump around the room, free from wires and/or plugging and unplugging things.

  • The ability to mix in a line level audio source (for practice tracks or other monitor signals from a mixer). This could come in handy for more advanced monitor sound system setups, where maybe I am getting a feed from the mixer that contains the rest of the musicians I am playing with.

  • And icing on the cake, a Bluetooth® optional input. This last thing was really more useful for me during my solo practice sessions. I can load my phone up with my practice tracks and wirelessly connect to my headphones. Also, of course, useful for general listening.

Headphones

For this project, we chose over-the-ear headphones that provide a large amount of sound dampening (30dB). These types of headphones are also called ear-muffs and are often marketed for use during loud construction work or lawn mowing.

The exact headphones we chose to start with were the following:

When using this type of lawn-mowing headphones without any modification, they provide adequate sound dampening to protect your ears in extremely loud places. However, with this benefit, you also lose the ability to hear your natural surroundings clearly. Usually, it is described as sounding a bit like two pillows are held to either ear. This is because the passive sound dampening is blocking most of the high frequencies.

In order to get the sound clarity back, we need to use ambient microphones. The correct type of microphone can accept the loud sound sources without distortion. This type of microphone is said to have a high acoustic overload point, or AOP. We can send that clean audio signal from the microphones into the headphones at a safe listening level. In addition to a high AOP, the microphones also need to have a large signal to noise ratio (SNR), which helps avoid having too much "hiss" in the audio signal. Choosing the best microphone for the job turned out to involve a lot of testing. More on this later.

The Modification

In addition to sound dampening, the original electronics included the ability to listen to FM radio and plug in a 3.5mm TRS audio cable. In this tutorial, we will remove the stock electronics, and replace them with the SparkFun ESP32 Thing Plus and the WM8960 Audio Codec. The following two pictures show a comparison of the original electronics (blue) and our new version (green/red/black). We took pictures of the topside and backside of each for a more thorough comparison.

The new version actually includes three PCBs. The red microcontroller is the SparkFun Thing Plus ESP32. The black PCB is an early prototype of the SparkFun Audio Codec Breakout. The green PCB below is a custom "motherboard" that makes some connections between the two dev boards and provides the on/off/volume knob, 3.5mm TRS input, and mounting holes to mount this entire assembly into headphone can.

Click images for a closer view.

Using the WM8960 Audio Codec Breakout, we can mix together sound sources. In this use case, we are mixing together three sound sources:

  1. ) Wireless (aka "BT") audio from the ESP32 to the codec via I2S audio.

  2. ) Wired audio from a 3.5mm TRS audio jack (common headphone cable connector).

  3. ) Ambient microphones mounted to either sides of each ear-can, to provide a pair of stereo room mics to your listening experience. In a way, these microphones are "giving you your ears back". Most importantly, doing so at a safe volume, to prevent hearing loss.

Required Materials

To follow along with this tutorial, you will need the following materials. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary.

Tools

You will need to solder various connections using hook-up wire, microphone cable, PTH/SMD parts, and header pins. You may already have a few of these items but if not, the tools and hardware below will help. See suggested reading below for any help with learning or refreshing these assembly skills.

Suggested Reading

If you arenā€™t familiar with the following concepts, we also recommend checking out a few of these tutorials before continuing.

Hardware Overview

Block Diagram

Here is a high-level block diagram of the sound system inside the headphones. The Audio Codec is central to this design. It handles all of the sound inputs and outputs. The ESP32 Thing Plus is still the "brain", and it is necessary to setup and control the codec with I2C. The ESP32 also receives the wireless audio (BT), and then sends that to the codec, digitally, with I2S audio data lines.

Headphones

High level block diagram of the headphone system.

Exploded View

Here is an exploded view of the headphones. It took a little experimenting and tinkering to eventually disassemble all of the parts. In this section, we will share a few techniques we learned along the way during this hack.

Headphones

Exploded view of the headphone system.

Foam Removal

Removing the foam was pretty straight forward. You can use a flat head screwdriver or pliers, but be careful. As you can see, I accidentally ripped the foam apart when I pulled a bit too hard.

Headphones

Oops! I accidentally ripped the foam.

It's really best to take it slowly and pull it gently, little-by-little. I really got the hang of this by the end of this project. I must have taken mine apart nearly 50 times as I fine tuned the wiring and swapped out microphones during testing. Hopefully, by reading this tutorial, you can keep this dis-assembly and reassembly cycle to a minimum. :)

Screws

After you remove the foam, this will expose the screws that hold the outer and inner parts of each can together.

Headphones

Two small screws hold the cans together.

The screws are located back behind the black plastic. Because of the angle, they can be a little difficult to access, but with a small Phillips head screwdriver and the right amount of pressure, it can be done.

Knob and PCB removal

When the inner screws are removed, the cans come apart, and then you will see the original electronics (blue). The volume knob is simply pressure fitted onto the potentiometer shaft, so you can pull that directly off. Unscrew the potentiometer mounting nut and the four mounting screws, and you will then be able to remove the original electronics.

Headphones

Knob, nut, and 4 mounting screws removed.

Custom PCB Assembly

Note, the custom PCB is not 100% necessary to complete this project. My early prototype "V2" was a hand-wired version. If you decide to go that route, then referencing the custom PCB Schematic PDF would be a good guide.

If you do decided to order the custom PCB (or a version of your own), the "mother board" PCB will need some assembly too:

  • Use headers to solder in the Audio Codec and ESP32 Thing Plus.

  • Solder into place the PTH right-angled potentiometer/switch.

  • Solder into place the SMD 3.5mm TRS audio input connector.

Click images for a closer view.

Wiring Diagram

Once everything is opened up, and you have your custom PCB assembled, you can begin wiring up the remaining necessary connections: microphones, speakers, and battery.

Before you dive into soldering things up, here are three important things to remember:

  • Use 26 gauge wire for most of the connections, as it can get fairly tight in there. I used an old Ethernet cable which had 8 conductors. If you open those up, the resulting hookup wire is quite nice to work with, and has great coloring to keep things straight.

  • The left microphone signal and its ground connection must use a shielded cable. If you wire it up with bare hook-up wire, then you will be prone to picking up strange sounds like distant radio stations and creeping whining noises with varying frequencies. Kind of fun, but not ideal for every listening experience.

  • The microphones we ultimately chose require a specific power and signal circuit (see below).

Here is a wiring diagram to show all the connections in one place:

Headphones

Wiring Diagram. Lots to hook up!

Microphone Circuit

Here is the required circuit from the datasheet of the PUI Audio AOM-5035L.

Headphones

AOM-5035L Microphone Signal & Power Circuit

Note, the capacitor is already included on the WM8960 input, and so we only need to wire up the pull-down resistor of 5.6K on the signal. Put this pull-down resistor as close to the microphone as possible. The left microphone is the only one that is more susceptible to picking up noise, and so we found that having the pull-down in that ear-can (and using a shielded mic cable) eliminated any unwanted noise.

As a side note, the proximity of the pull-down resistor to the microphone also had an effect on the acoustic overload point (AOP). Strangely, if the resistor was placed too far away, then the mics begin clipping at lower sound source volumes. During my early testing, I would hear clipping in my left ear when I really played hard on the hi-hats (which are probably the loudest and closest drum instrument to that microphone). But as soon as I moved the pull-down closer to the mic, the clipping went away!

Here is some close up shots of where I ended up hacking in the final position of each pull-down resistor. Note, I didn't have the exact 5.6KΩ resistors required, so for the left ear, I used two 2.2KΩs in series. And for the right, I used a 4.7KΩ.

  • Headphones


    Left mic pull-down resistor

  • Headphones


    Right mic pull-down resistor

Installing Arduino Libraries

Arduino

Arduino IDE

This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino IDE and a library, please review the following tutorials.

USB-to-Serial Drivers

If you've never connected a CH340 device to your computer before, you may need to install drivers for the USB-to-serial converter. Check out our section on "How to Install CH340 Drivers" for help with the installation.

WM8960 Audio Codec

SparkFun has written a library to work with the SparkFun Audio Codec Breakout - WM8960 (Qwiic). You can obtain this library through the Arduino Library Manager by searching for "SparkFun Audio Codec Breakout WM8960". Find the one written by SparkFun Electronics and install the latest version. Users who prefer to manually install the library can get it from the GitHub Repository or download the .ZIP by clicking the button below:

ESP32-A2DP

Paul Schatzmann has written a library to work with I2S audio and wireless audio (BT) using the ESP32 microcontrollers. To manually install the library, get it from the GitHub Repository or download the .ZIP by clicking the button below:

Arduino Code

Now that we have our libraries installed, we can compile and upload the Arduino code to the ESP32 Thing Plus.

Serial Upload

Below is the Arduino sketch INO for this project. Copy and paste the code below in your Arduino IDE.

SuperHeadphones Arduino Sketch
/*
Super Headphones
SparkFun Electronics
Pete Lewis
September 2023

Using an ESP32 Thing Plus and a WM8960 Audio Codec,
This project enables you to create your own wireless headphones (aka BT).
It also alows you to mix in a pair of ambient microphones!
Read the tutorial here:
https://docs.sparkfun.com/SuperHeadphones/

This code utilized Paul Schatzmann's ESP32-A2DP library to make all the wireless 
audio (BT) functionality happen. Big thank you to Paul Schatzmann and the many others 
who have contributed to that library!
Download here: https://github.com/pschatzmann/ESP32-A2DP

  Do you like this open source code? Help support SparkFun. Buy a board!

    SparkFun Audio Codec Breakout - WM8960 (Qwiic)
    https://www.sparkfun.com/products/21250

    SparkFun Thing Plus - ESP32 WROOM (USB-C)
    https://www.sparkfun.com/products/20168

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <Wire.h>
#include <SparkFun_WM8960_Arduino_Library.h>  // CTRL+Click here to get the library: http://librarymanager/All#SparkFun_WM8960
WM8960 codec1;

#include "BluetoothA2DPSink.h" // To manually install, download here: https://github.com/pschatzmann/ESP32-A2DP
BluetoothA2DPSink a2dp_sink;

//// Iot Redboard
//#define I2S_WS 16
//#define I2S_SD 25
//#define I2S_SDO 17
//#define I2S_SCK 14

// ESP32 Thing Plus C
#define I2S_WS 13
#define I2S_SD 27
#define I2S_SDO 14
#define I2S_SCK 32

// Use I2S Processor 0
#define I2S_PORT I2S_NUM_0

// Define input buffer length
#define bufferLen 64
int16_t sBuffer[bufferLen];

int pgaGain1 = 25;

int pgaGain1_prev = 0;

#define NUM_OF_READINGS 20
long userInputA0;
int userInputArray[NUM_OF_READINGS] = {};  // used to make a rolling average of readings on ADC input
int arrayPos = 0;
#define PGA_GAIN_SETTING_MAX 32 // don't really need more than this on the PGA, so let's put a max on it so no one gets too crazy.

void setup() {
  Serial.begin(115200);
  Serial.println(" ");

  Wire.begin();
  Wire.setClock(100000);

  if (codec1.begin() == false)  //Begin communication over I2C
  {
    Serial.println("The codec 1 did not respond. Please check wiring.");
    while (1)
      ;  //Freeze
  }
  Serial.println("Codec1 is connected properly.");

  codec1_setup();

  // Set up I2S
  i2s_install();
  i2s_setpin();

  a2dp_sink.start("SuperHeadphones");
}

void loop() {

  // Read the volumet potentiometer to set the volume of the ambient mics.
  // Every loop:
  // - take a reading and put it into the array
  // - increment position
  // - loop back position to start of array 
  // - when we reach the end take all readings in array, and create a rolling average.

  userInputArray[arrayPos] = analogRead(A0);
  arrayPos += 1;
  if (arrayPos > NUM_OF_READINGS) arrayPos = 0;
  int total = 0;
  for (int i = 0; i < NUM_OF_READINGS; i++) total += userInputArray[i];
  userInputA0 = total / NUM_OF_READINGS;
  // map it from 0-4096, to a value that is acceptable in the pga gain (0-63)
  // 0-63, (0 = -17.25dB) <<-- 0.75dB steps -->> (23 = +0dB)...(63 = +30dB)
  pgaGain1 = map(userInputA0, 0, 4096, PGA_GAIN_SETTING_MAX, 0);

  if (pgaGain1 != pgaGain1_prev) {
    codec1.setLINVOL(pgaGain1);
    codec1.setRINVOL(pgaGain1);
    Serial.print("pgaGain1: ");
    Serial.println(pgaGain1);
  }

  pgaGain1_prev = pgaGain1;
  delay(10);
}


void codec1_setup() {
  // General setup needed
  codec1.enableVREF();
  codec1.enableVMID();

  //codec1.enableMicBias();

  // WM8960_MIC_BIAS_VOLTAGE_0_9_AVDD (0.9*AVDD) or
  // WM8960_MIC_BIAS_VOLTAGE_0_65_AVDD (0.65*AVDD)
  //codec1.setMicBiasVoltage(WM8960_MIC_BIAS_VOLTAGE_0_9_AVDD);

  // setup signal flow to the ADC

  codec1.enableLMIC();
  codec1.enableRMIC();

  // connect from INPUT1 to "n" (aka inverting) inputs of PGAs.
  codec1.connectLMN1();
  codec1.connectRMN1();

  // disable mutes on PGA inputs (aka INTPUT1)
  codec1.disableLINMUTE();
  codec1.disableRINMUTE();

  // set input boosts to get inputs 1 to the boost mixers
  codec1.setLMICBOOST(WM8960_MIC_BOOST_GAIN_0DB);  // 0 = 0dB
  codec1.setRMICBOOST(WM8960_MIC_BOOST_GAIN_0DB);  // 0 = 0dB

  codec1.pgaLeftNonInvSignalSelect(WM8960_PGAL_VMID);   // for single ended input on LIN1
  codec1.pgaRightNonInvSignalSelect(WM8960_PGAL_VMID);  // for single ended input on RIN1

  //codec1.enablePgaZeroCross();

  codec1.connectLMIC2B();
  codec1.connectRMIC2B();

  // enable boost mixers
  codec1.enableAINL();
  codec1.enableAINR();

  // enable output mixers
  codec1.enableLOMIX();
  codec1.enableROMIX();

  // Enable bypass connection from Left INPUT3 to Left output mixer, note, the
  // default gain on this input (LI2LOVOL) is -15dB
  codec1.enableLI2LO();
  codec1.enableRI2RO();

  // Sets volume control between "left input" to "left output mixer"
  codec1.setLI2LOVOL(WM8960_OUTPUT_MIXER_GAIN_0DB);
  codec1.setRI2ROVOL(WM8960_OUTPUT_MIXER_GAIN_0DB);


  //  LB2LO (booster to output mixer (analog bypass)
  codec1.enableLB2LO();
  codec1.enableRB2RO();

  // connect from DAC outputs to output mixer
  codec1.enableLD2LO();
  codec1.enableRD2RO();

  // set gainstage between booster mixer and output mixer
  // for this loopback example, we are going to keep these as low as they go
  codec1.setLB2LOVOL(WM8960_OUTPUT_MIXER_GAIN_0DB);  // 0 = -21dB
  codec1.setRB2ROVOL(WM8960_OUTPUT_MIXER_GAIN_0DB);  // 0 = -21dB

  // CLOCK STUFF, These settings will get you 44.1KHz sample rate, and class-d freq at 705.6kHz
  codec1.enablePLL();  // needed for class-d amp clock
  codec1.setPLLPRESCALE(WM8960_PLLPRESCALE_DIV_2);
  codec1.setSMD(WM8960_PLL_MODE_FRACTIONAL);
  codec1.setCLKSEL(WM8960_CLKSEL_PLL);
  codec1.setSYSCLKDIV(WM8960_SYSCLK_DIV_BY_2);
  codec1.setBCLKDIV(4);
  codec1.setDCLKDIV(WM8960_DCLKDIV_16);
  codec1.setPLLN(WM8960_DCLKDIV_16);
  codec1.setPLLK(0x86, 0xC2, 0x26);  // PLLK=86C226h
  //codec1.set_ADCDIV(0); // default is 000 (what we need for 44.1KHz), so no need to write this.
  //codec1.set_DACDIV(0); // default is 000 (what we need for 44.1KHz), so no need to write this.
  codec1.setWL(WM8960_WL_16BIT);

  codec1.enablePeripheralMode();
  //codec1.enableMasterMode();
  //codec1.set_ALRCGPIO(); // note, should not be changed while ADC is enabled.

  // enable ADCs and DACs
  codec1.enableAdcLeft();
  codec1.enableAdcRight();
  codec1.enableDacLeft();
  codec1.enableDacRight();
  codec1.disableDacMute();

  //codec1.enableLoopBack(); // Loopback sends ADC data directly into DAC
  codec1.disableLoopBack();
  codec1.disableDacMute();  // default is "soft mute" on, so we must disable mute to make channels active

  codec1.enableHeadphones();
  //codec1.enableSpeakers();
  codec1.enableOUT3MIX();  // provides VMID as buffer for headphone ground
  //codec1.enableSpeakerZeroCross();

  Serial.println("Volume set to +0dB");
  //codec1.setSpeakerVolume(120);
  codec1.setHeadphoneVolumeDB(0.00);
  //codec1.enable3d();

  Serial.println("Codec 1 Setup complete. Listen to left/right INPUT1 on Speaker outputs.");
  delay(10);

  codec1.setLINVOL(23);
  codec1.setRINVOL(23);
}

void i2s_install() {
  // Set up I2S Processor configuration
  static i2s_config_t i2s_config = {
    .mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_TX),
    .sample_rate = 44100,  // Updated automatically by A2DP
    .bits_per_sample = (i2s_bits_per_sample_t)16,
    .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
    .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_STAND_I2S),
    .intr_alloc_flags = 0,  // Default interrupt priority
    .dma_buf_count = 8,
    .dma_buf_len = 64,
    .use_apll = true,
    .tx_desc_auto_clear = true  // Avoiding noise in case of data unavailability
  };
  a2dp_sink.set_i2s_config(i2s_config);
}

void i2s_setpin() {
  // Set I2S pin configuration
  i2s_pin_config_t my_pin_config = {
    .bck_io_num = I2S_SCK,
    .ws_io_num = I2S_WS,
    .data_out_num = I2S_SDO,
    .data_in_num = I2S_PIN_NO_CHANGE
  };
  a2dp_sink.set_pin_config(my_pin_config);
}

Select your board in the Tools menu (in our case ESP32 Thing Plus) and the correct Port it enumerated on and click "Upload". After uploading the code, open the Serial Monitor or terminal emulator of your choice with the baud rate set to 115200. You should see the following message pop up. And then as you turn the volume potentiometer, the setting value will be printed to the terminal.

Output to the terminal

If you see the above messages in your terminal, then you should be ready to try out some listening. Put your headphones on and try adjusting the potentiometer. As you turn the knob (clockwise), this will increase the volume level of the microphones.

One way to verify the system is to turn the volume all the way up and gently rub each microphone with your fingertip. You should hear a quiet scratching sound in the corresponding headphone ear speaker.

Note, if you hear a lot of buzzing, it is most likely the USB cable. Try unplugging the USB cable, and powering only from the battery. The battery will be a much quieter power source, and so should not add any noise into the audio signal.

Wireless connection

In addition to the messages sent to the serial terminal, the provided code sets up the ESP32 Thing Plus to be an audio receiver as a bluetooth A2DP Sink.

After powering up your headphones, use your PC or cell phone to find a Bluetooth device named "SuperHeadphones".

  • Headphones


    Connect BT with your PC

  • Headphones


    Connect to BT with your cell phone

Click Connect. Now you can play audio from your PC program or phone app and listen on your superheadphones!

Note, the volume control for this sound source is controlled by adjusting the setting on your computer or cell phone. The knob on the headphones is only used to adjust the volume of the ambient microphones.

Diving deeper

The provided code for this project is a combination of other Arduino example sketches. Review these for further information on how each section of the code works.

Microphone Selection

Specifications

For this particular project, we needed a microphone with three specific characteristics:

  1. ) It needed to have a high acoustic overload point (AOP). This would allow the microphones to be located on the outside of the ear-cans, very close to a full-volume acoustic drum set, and still not distort. Our final mic choice has an AOP of 135dB.

  2. ) It needed to have a large signal to noise ratio (SNR). This means that the microphone will output a cleaner signal with less "hiss" sound during quiet times. Something with at least 60dB or great would work. Our ultimate choice was for a microphone that had 75dB SNR.

  3. ) It needed decent sensitivity. Something near the range of -35dB would do. Note, when this number gets higher, that means it's more sensitive. Because sensitivity is almost always expressed as a negative number, that means a "smaller" negative number is more sensitive.

To learn more about microphone specifications such as AOP, SNR, sensitivity, please check out this very informative document from InvenSense here:

I tried three other microphones before I found my favorite. Here is a table to show the others options, and how they compare in terms of mic specs.

Mic AOP SNR Sensitivity Notes
ICS-40180 124dB 65dB āˆ’38dB With the onboard op amp gain, this ultimately had too low of an resulting AOP for drums. It clipped a lot when I played loudly.
SPH8878LR5H-1 134dB 66dB -44dB Again, with the onboard op amp gain, this ultimately had too low of an AOP for drums. It clipped a lot when I played loudly.
VM2020 149dB 50dB -63dB With such a high AOP, this mic could definitely handle the loud drums without clipping. This was a huge win, and actually, I used these mics for quite a while. But then I started to notice that during quiet times, there was a significant "hiss" in the audio signal. This is because it is, in terms of audio microphones, not very sensitive (-63dB). In order to hear the signal at a decent level, I had to add 60dB to 70dB of gain in the WM8960, which also can add some hiss to the signal.
AOM-5035L 135dB 75dB -35dB The best combination of high AOP, impressive sensitivity and SNR. No clipping and no hiss. This one fits the job!

Options

Here are the four microphones we ultimately tested. Note, although for our application, the AOM-5035 was the right choice, you might like to consider trying out some of the other mics and see if they work for your use case. If I were making these for playing piano or any kind of quieter environment, I might go with one of the MEMs.

What's next

The next generation of super headphones might include some additional features. Here are some of my ideas:

Mic Signal Output

With an additional WM8960 codec, I could send a copy of the isolated ambient mics to a line-level output. This would be handy for recording. Especially, if I just want to get an idea down with decent sound quality. The movement of my head (particularly rotationally) plays into the sound, so this is not ideal for recording for a final mix, but super handy for practice recordings.

Advanced Audio Processing

It would be nice to take in the I2S audio from the codec and add some digital effects. For example EQ, compression and/or limiting could be very nice. I also find my carpeted basement to sound slightly tight. It would be killer to add in some reverb!

Additional Mics

I have thought that adding a second set of ambient mics with higher sensitivity could be a nice improvement. Although the current mics (PUI-AOM-5035) do great for loud environments, it is not 100% ideal for use in quieter environments. If you want to capture quieter sound sources (like acoustic instruments such as piano, guitar or even conversation), then a more sensitive microphone is better suited for the job. A more sensitive microphone requires less gain to capture the quieter sounds, and thus produces less noise in those situations.

Mixing the two microphones automatically would be ideal. But this would require a rather uncommon effect on the sensitive mic. You'd have to use an "inverted" noise gate. This would shut down the signal from the sensitive mic when it gets close to its clipping level, and then open up the gate to the high AOP mic at the same time.

It turns out that PUI makes another similar microphone that is 11dB more sensitive, and has a whopping 80dB SNR! See the specs here:

Custom 3D Printed Cans!

Currently, the generic headphones I have hacked are pretty comfy, but I do notice the pressure of the pads on my ears. When Iā€™m drumming, I donā€™t seem to mind - probably because Iā€™m so focused on playing. But for general listening, I start to become a bit uncomfortable after 30 minutes or so. My ears are pretty long (I guess), and they angle out away from my head, so these headphones are essentially squishing my ears against my skull.

I've already begun the journey to creating some very custom headphones. I think that I should be able to make something that still has a really good seal to block out the loud sounds, but also is super comfy. Iā€™ll probably make some for my kid too, because he needs to take breaks due to the ear-muffs causing some discomfort.

The basic idea I have is to scan in my head, then design some custom fit headphones. Ideally, the cans and internal speaker drivers wouldn't touch my ears at all. Also, the touch points around my ears would have a custom adapter that would apply equal pressure all around.

It has started with a decent scan using photogrammetry. To learn more about this process, check out this wonderful YouTube video by Punished Props Academy:

After following along with that video, and doing a few practice scans, I was able to successfully scan my head.

Then it is only a matter of importing the mesh into Fusion 360 and designing around the model of my head and ears.

Going into detail about how this is all done is beyond the scope of this tutorial, but I thought I'd share some of the photos from the design work that is currently still in progress.

Cheers and happy hacking!

Headphones

My first print... fresh out of the gray goop!

Troubleshooting Tips

Info

Not working as expected and need help?

If you need technical assistance and more information on a product that is not working as you expected, we recommend heading on over to the SparkFun Technical Assistance page for some initial troubleshooting.

SparkFun Technical Assistance Page

If you can't find what you need there, you'll need a Forum Account to search product forums and post questions.

Resources:

For more resources related to this project, check out the links listed here:

Looking for more information related to the SuperHeadphones, check out the following IEEE article below!