Converting Wired Headphones Into an Open Source Bluetooth Alternative

See the process of how Clem Mayer from element14 Presents was able to create an open source board for adding Bluetooth to headphones.

Evan Rust
2 years agoWearables / Upcycling

Who go open source?

So many electronic devices in the modern era rely on proprietary apps, subscription services, or other specialized protocols/connectors in order to function correctly, thus leading to excessive waste and frustration when the companies making the products no longer support them. To address this ever-increasing problem, Clem Mayer from element14 Presents wanted to build his own pair of open source headphones that could be easily recreated by almost anyone for not much money.

The required components

The base of the project required some kind of existing headphones, and Mayer chose his favorite pair of wired AKG headphones due to their reliability and price point. Receiving audio data over Bluetooth is handled by a microcontroller, which in turn, sends the decoded digital audio to an external digital-to-analog (DAC) chip that takes the digital I2S data and outputs an analog signal. Finally, an amplifier uses the weaker analog signal from the DAC and boosts its power with a battery so the sound can be heard through the headphone speakers.

Designing a PCB

Created in KiCad, Mayer's initial Bluetooth conversion PCB contains all of the aforementioned components that convert Bluetooth data into audible sound. Power for charging and incoming USB data are both sent through the onboard USB C connector that feeds a CP2102 USB-to-UART conversion chip. This UART data is how the ESP32 module can be programmed and debugged if the need arises. Finally, a PCM5100 IC receives I2S digital audio data from the ESP32 and outputs an analog signal thanks to its DAC. After assembling it together, Mayer plugged the board into his computer but found the CP2102 USB chip wasn't detected due to an error in the PCB design.

Back to the breadboard

To try and figure out the problem with the PCB, Mayer swapped out the discrete components for a couple of prebuilt and verified modules. These included the ESP32 FireBeetle from DFRobot and a PCM5100 I2S module with a built-in headphone jack, along with a small capacitor for voltage smoothing. The code for this project turned out to be very simple thanks to the btAudio library. In essence, the program sets up a new Bluetooth audio receiver with a predefined name, waits for a connection to the transmitting device, such as a phone, and then pipes the incoming Bluetooth data to the I2S pins.

A couple more problems

Because the breadboard version was able to successfully play audio through the connected headphones, Mayer isolated the problem back to a burnt CP2012 UART bridge, and after quickly assembling a new board, his computer could recognize the USB device. But the attempt to send the code resulted in failure since a very small part sourcing error rendered his ESP32 module unusable. His part, the ESP32-MINI-1, only contains a single core and has no Arduino support, whereas the more common ESP32-S2-MINI variants with two cores have that support.

The result

Although May was unable to finish his ultimate goal of a sleek, compact Bluetooth headphone conversion board, his breadboard circuit still performed well enough. In the future, he plans on changing the incompatible components in the circuit design to the appropriate parts and remaking the boards. More information about this project can be found here in element14 Presents' YouTube video.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles