Thank you for checking out my project! This was a fun little experiment that allowed me to test out the feasibility of a speaker design I had and play around with I2S audio. Considering the sound is coming from a 2-layer FPC soldered to a business card size PCB, I'm pleased with the audio quality I was eventually able to get, and I hope you enjoy it as well!
Goals
- Can you make a audio speaker from two oppositely polarized FPC coils?
- Play the audio over Bluetooth
Links
Admittedly, the only code I touched in this project was modifying the name displayed on Bluetooth. The code is a demo provided from Espressif which can be found here:
https://github.com/espressif/esp-idf/blob/master/examples/bluetooth/bluedroid/classic_bt/a2dp_sink
The code works without modification with the MAX98357a I2S Audio Amplifier.
To wire the MAX98357a, I pulled some information from Adafruit with their board, but in reviewing the component datasheet, decided to omit the filter components and instead placed a 0ohm resistor on the outputs of the amplifier.
https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp
Design
- 5V from USB plug routed to MAX98357a and 3V3 linear regulator
- ESD protection on USB pads
- The center pads of the USB were connected to RX/TX and then to a FTDI programmer, rather than using the default D+ and D- of the USB. This removed having to put a USB to UART chip on the board.
- ESP32 connections
- FPC Coil design
Round 1: There's Audio...but not much
With the device powered and bluetooth connected, you could hear sound from the speaker if you held it directly to your ear. Anything that could be heard was extremely garbled. I was disappointed with these results, but I figured most speakers use a permanent magnet, so let's see what I'm missing with that. As soon as I held a permanent magnet from the fridge up to the coil that audio was magnitudes louder.
Doing some research, it was suggested that what I was lacking was a permanent magnetic field in which the coil carrying the current from the audio could actually vibrate. By having both coils energizing and deenergizing at the same time, I don't think I was generating enough of a field for the coils to vibrate in.
I didn't want to add a permanent magnet to my design, so I took the next best approach. I rotated the backside FPC coil by 90 degrees so it's input and output were connected to pads that were not connected to any other nets. I then jumpered one side to +3.3V and the other to GND. Now the backside coil was a permanent electromagnet and I had my constant magnetic field.
Round 2: Clearer but Not Louder
Testing with the new wiring to the back coil resulted in some improvement to the audio quality, but there was no noticeable change in volume. The magnetic field just wasn't strong enough to generate the volume I desired, so I conceded and tested with the single audio coil, the permanent electromagnetic coil on the back, and placing a permanent magnet on the backside with a polarity the same as the electromagnet.
Round 3: Not Bad
With the permanent magnet in place, I get some real music from this. It's comparable to the audio quality of a dollar store speaker, and the max volume is comparable to a phone earpiece, but for a first attempt with only a 2 layer FPC, I'm pleased with the results. With more layers and more coils, modifying the gain, and getting a permanent magnet that covers the entire surface area of the speaker, I think the potential sound output could be much higher.
Nice project! Very clever and inspiring. I hope you are able to make more progress in the future. It’s a unique design with possibilities! Maybe you could add a microphone to record audio too? And then be able to playback samples, pitch bend, loop… and other crazy stuff. Have you considered a piezo speaker? I know there is an intrinsic beauty to the coil design you used, that a piezo doesn’t have. Consider also using your fixed electro magnet with a ferrous material as a thin “permanent” magnet to react against. Check out Joe Grand’s boombox for more inspiration too: https://hackaday.com/2023/07/10/supercon-2022-joe-grand-and-the-thinnest-boombox/