Introduction
It has been a very long time since I followed up on my previous speaker post. The truth is that I actually finished this build over two years ago and just have not gotten around to making a post about it until now (my life got very busy right after the build). This means that I have unfortunately forgotten many of details involved by now. Nonetheless, below is a summary of what I can remember.
Getting The Electronics Working
After writing some basic firmware, the first issue I ran into was that my amplifier board seemingly refused to respond to any messages from the MCU and it did not even want to draw a meaningful amount of power if I recall. Quickly assuming there was a manufacturing error (I hand assembled the first batch of boards and there are many fine-pitch components); I ordered fully assembled boards from China to fix the issue. Of course, these still had the exact same problem as my hand-built ones… After way too much effort, I finally realised the problem was simply that I was not driving the enable pin low and instead just left it floating 🤦. After fixing that issue, it was off to the races!
The second issue I ran into was that I realised the ESP32-C3 would not be suitable for this project. If I recall, the issue was that it turned out not to support Bluetooth audio at all (at least not at the time of writing), only other ESP32 variants had support I believe. And of course, I only realised this after putting in some effort to get things up and running…
Coincidentally, I had recently received a free nRF5340-DK from Nordic and decided to just use that instead. I had always wanted to experiment with an nRF chip and thought this would be the perfect opportunity. Unfortunately I later also figured out this is probably not the best chip for a Bluetooth speaker since it only supports the modern “BLE Audio” standard which at the time was not supported by almost anything else. In other words, I would not be able to connect to it from my laptop or smartphone since neither had support for BLE Audio. However, I had reason to believe the next generation of smartphones would gain support (at least via software updates) so I decided to go ahead regardless. I decided that for the time being, I would also implement support for receiving audio via USB and then later finish the BLE audio support once I had a compatible smartphone.
Another challenge I had to contend with was that at the time, this feature was very new and thus did not have documentation or proper SDK support yet. The only thing I had to work with were some very eloborate demo projects intended for an entirely different nRF dev kit. So what I ended up doing was to strip the most appropriate demo project down to its bare essentials, port the remaining part over to my board and then add USB audio support. This took longer than it sounds of course, but in the end it worked!
This was also the first time I worked an Zephyr and I have to say the experience was quite positive. It rememinded me a lot of working with the Linux kernel. Of course, this is only natural since I believe it does actually use the Linux kernel’s build system (or at least a derivative of it).
Today I have a phone (and perhaps even laptop) with BLE Audio support, but unfortunately I have yet to come back to this project to finish implementing support for that. Now that I have a bit of free time again, I am preffering to work on my EM simulator project for the time being.
Getting The Box Built
Below are some pictures of the box assembly process that went relatively smoothly. The only major issue I found was that I designed the back of the box badly. For all the other sides, I designed tabbed interconnects, but I skipped this for the back as it would make it more diffucult to remove the rear panel (or to just insert it the first time). My plan was instead to use 3D-printed brackets (with threaded inserts) and then screw the rear panel on with a gasket in-between to create an air-tight seal. This did not work out well at all and in the end, I had to glue the real panel to get a solid mechnical structure and make things air tight. Without doing that I had serious issues with vibrations and noise. Naturally, I already have a better plan for the next iteration though!
The Final Result
Comments
Comments are hosted on GitHub