PCB TIME BABEYYY
Feeling confident after designing the lobstereo (my first surface mount pcb design), I decided to move from protoboards to pcb time, and it was a bit of a costly learning experience but very much worth it.
Having a schematic to base the design off of (the original audioboard and my lobstero) I decided to make a board that would connect to the esp32 thing from below, much like the prototype. Not leaving well enough alone I started calling them audio pants as a small joke about the pi hat/phat naming since I was placing the shield on the bottom. (in case you were wondering why pants? WHY??). I decided to further the awkward blockiness of adding it's own 18650 battery connection via through hole battery mounts, this gives you an option if you don't want to use a polymer based lithium ion as well as having a hard kill switch to shut off the battery and board. The first revision had some mistakes but was functional! However not all was flawless! the edge connectors were a bit too far from the edge to plug in comfortably, so I uncomfortably cut off the edge to make it work for testing.
Testing brings me to some wireless weirdness I discovered using the board! Bluetooth seemed to not want to consistently connected and when it did I could not move very much without disrupting the signal and connection. At first I thought it was I2S problems, but everything was connected properly and the same esp32-thing would work when I plugged it back into my teensy audioboard prototype. This honestly had me stymied for quite a while, was it my pin choice? was it my I2S traces? Honestly i'm still not completely sure what it was. On a hunch I decided to explore the possibility of the problem relating to RF. I know RF design can be super complicated and is definitely outside my knowledge base but figure something could be up with that. By chance testing I took a piece of metal I had a the time, i think it was the handle of an exacto blade but I can't remember and stuck it between the esp32-thing and my audioboard (which was possible because I had the esp32-thing on headers, leaving enough space between the two). To my surprise suddenly the audio signal cleared up! with some jiggling and wiggling It seemed only to work when pressed up against the back of the esp32-thing board, and underneath about where ic was topside. Perplexed but encouraged I tried some sample rf blocking material which did not due the trick, rather as expected it made things harder to connect or shortened the transition range depending on direction of host and client. With that tested i switched back to plain olll metal, in this case I cut strips from the extra space of my solder paste stencil and slid them neatly behind the board. Voila! it works? I'm not sure what the problem is, maybe weird ground plane looping or what have you but hot dang i got lucky and found something that did work! I couldn't use another esp32 board because of this unique footprint as well as absolutely needing pin0 broken out. On boards like the Adafruit Huzzah Feather or the SparkFun ESP32-Thing Plus (feather format) pin0 isn't broken out.
with that figured out and and a simple enough solution I decided to make some revisions, clean up the board and open source it.
In the board revisions I fixed the headphone jack placement, turned the whole board into a breakout for the unused pins so people can hack to their hearts content, changed the smd slide switch to a sturdier through hole slide switch and added a breakout for the headphone jack in case someone wanted to use a panel mount jack for the case or solder wires directly to the board.
It's not perfect but it's functional and I'm pretty happy with it. The biggest problems stem from lack of case, which I will attempt to design a simple 3-D printed enclosure to protect it. Most annoying thing was accidentally hitting the rest or boot0 pin while it was in my pocket, the enclosure would make it bulkier but much less annoying to worry about. Another thing would be static shorts causing the signal to disrupt and needing to restart the esp32, which an enclosure would also fix! I couldn't figure out the RF problem but taping a slim piece of metal to the back of the esp32-Thing is an easy enough thing to do.
Thanks for reading!
wow thanks for reading about the project if you did! It was a very good learning experience and always very rewarding to see a project come together. If you're interested I have both the full KiCad source files for the pcb on my Github (Open Hardware Licensed to my best ability!) as well as my hacked together esp-idf code for getting it to work. They can be found here