Sound Engineering PCB

Tell us about your projects. Update us regularly.
Post Reply
parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Sound Engineering PCB

Post by parkview » Thu Feb 17, 2022 11:47 am

This YT Video poppedYT Video popped up in early Jan 2022. I love the way the particles flow when he blows on the microphone. Some days later one of us mentioned a (new to me) Open Source gaming engine called Godot. I thought it would be fun trying to replicate the particle project in the Godot engine, failing that, learn some Unity.

I have recently been experimenting with coupling the SPH0645 MEMS microphone with a ESP32, and playing around with a 6-DoF MPU-6050 sensor, so why not design and build a dedicated board for this project. 24 hours later the PCB design (V0.5) was uploaded to JLCPCB:
Sound_Engineering_Front_V0.5.jpg
Sound_Engineering_Front_V0.5.jpg (93.15 KiB) Viewed 7765 times
All the GPIO, i2C and i2S info are listed on the backside:
Sound_Engineering_Back_V0.5.jpg
Sound_Engineering_Back_V0.5.jpg (85.93 KiB) Viewed 7765 times
I then set out to order some spare MPU-6050 sensors, only to find out their price had tripled and no one had any stock left! Many hours later of trolling through the wonderful LCSC web store, I settled on using the 6-DoF ST part: LSM6DSLTR and I found a cheap 3-DoF MPU: LIS2DH12TR I can use that later in an updated e-Paper Name Badge board. Version 0.6 was identical to the initial version, except it has the updated MPU sensor:
SE_V0.6.jpg
SE_V0.6.jpg (62.08 KiB) Viewed 7765 times
Check out how small U4 is in the second board compared with the top one. It's tiny! On the back is a cheap common 5V to 3.3V AMS1117 LDO. I have since found a mach smaller one that could be placed on the front. All up, the PCB is around 34mm x 37mm in size and includes some M2.5 mounting holes.

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Sound Engineering PCB

Post by parkview » Thu Feb 17, 2022 12:18 pm

While waiting the three or so weeks for the PCB's to arrive back from JLCPCB, I started working on the software. I used my Arduino Sensor Training Board as it had a similarly designed MEMS microphone and MPU. Enough so that I could test out some Arduino code. I based my initial version on Eric's Github code. Also, thanks to Rick who created a demo Godot project. It was a quick entry into using Godot. I modified Eric's ESP32 code to use a SPH0645 MEMS microphone, MPU-6050 6-DoF accelerometer/Gyro and to stream the data out via UDP WiFi packets to a host computer that could be running Unity or Godot, or even Processing.

The SPH0645 microphone does things a bit different than the INMP441 microphone, so that took a bit of Googling around to get it working well. Eventually I got something moving in a Godot 2D world:
first-sound.jpg
first-sound.jpg (20.25 KiB) Viewed 7764 times
Blowing on the microphone would shoot particles off to the left hand side with their speed depending on the sound level. Loads of fun, but being 2D, there is no PCB movement yet. For that I started on a 3D Godot project. There went a day or two trying to get a cube rotating as I rotated my PCB. A bit later, Linux Australia 2022 Conference released this wonderful Introduction to Godot video, yes, having a camera really helps in visualizing a spinning cube!

Note: All the ESP32 and Godot code and KiCAD PCB files will eventually be released Open Source on Gitlab.
Last edited by parkview on Thu Feb 17, 2022 12:31 pm, edited 1 time in total.

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Sound Engineering PCB

Post by parkview » Thu Feb 17, 2022 12:28 pm

The first PCB arrived back from JLCPCB, China last week. I quickly assembled the board, but had no end of trouble getting the ESP32-Pico MCU aligned and correctly into place. I even managed to burn the MCU out and the 1A LDO! I had another crack at it yesterday and found that the LDO had burnt out as well, no doubt due to the numerous times I hot-aired the MCU on and off again:
SE-V0.5.jpg
SE-V0.5.jpg (67.95 KiB) Viewed 7764 times
For some COVID reason, the V0.6 PCB is currently still sitting somewhere in Perth, WA. It too, should have arrived last week.

Next up is for the two other project members to pop over and make up their boards and we can then all get cracking with more coding :)

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Sound Engineering PCB

Post by parkview » Thu Jan 05, 2023 1:27 pm

So much has happened on this project. The green V0.5 PCB worked well, but the MPU-6050 was out of stock and if found, the price was way too much, so I designed a V0.6 PCB where I swapped it out for a LSM6DSL IMU. At the time, it was around a quarter of the price. This was manufactured on a Blue PCB so it was easy to tell the two apart. I could never get the IMU IC working though, thinking it was a problem with my code knowledge.

One issue with making up both V0.5 and V0.6 PCB's was the ESP32-Pico MCU. It required exacting placement and pad solder levels. It was difficult to get all the pins working 100% and was holding back manufacturing. This lead to the V0.7 PCB, which was made in Purple silkscreen:
SE_V0.7_sml.jpg
SE_V0.7_sml.jpg (242.37 KiB) Viewed 6704 times
For this version, I replaced the ESP32-Pico with a ESP-C3-WROOM. It was around the same price, but does have fewer GPIO and is single core. It does have the advantage of having a built in UART, so it means I can skip the CP2102 UART IC, saving in costs and board space.

I took the opportunity to add in a LRT-553 light and position sensor and a QMC5883 digital compass. I kept the LSM6DSL IMU IC and it was on this version that I discovered that I had not connected the VDDIO pin to 3.3V, so no wonder I could never talk to the IC. This was easily fixed via a small bodge wire and now the board all works and is fun to use. As a bonus, the LSM sensor has a built in temperature sensor and has interrupts that can be triggered by single or double tapping the PCB. The light sensor has an interrupts that can be triggered on a object settable distance from the PCB. The digital compass is the first one I have used that seems to generate a reliable compass heading, either due to a better IC, or code library or both, but it's great and relatively cheap.

During (Arduinoespressif 2.06, running via PlatformIO Core 6.15 - Home 3.4.3) code testing though, I found an software issue with calling the i2C init before the i2S init. Doing this would cause both buses to lock up. This took way to many hours to troubleshoot, but eventually I found that by initialising i2S before initialising i2C bus, both would work ok. Whew! For a while I thought it might have been an internal ESP32-C3 module issue.

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Sound Engineering PCB

Post by parkview » Thu Jan 05, 2023 1:30 pm

Version 0.8 PCB is my first 6 layer PCB - done as a trial, as JLCPCB have a special offer of A$2.65 for five PCBs in either 6 or 8 layers and includes a ENIC (gold) pad finish. It was only after I submitted the board, that I found out they where charging A$42 if you wanted it done in any other colour but Green! Due to this, if I do another version, I will revert the design back to a 4 layer PCB. This version incorporates the VDDIO IMU fix and I added a Serial Programming 1.27mm 3-pin port. I could never get the serial port over USB (CDC), to work reliably. Even though the serial I/O pins clash with the i2S bus, it will allow a bit of flexibility of getting serial data in/out (with i2S bus turned off) and maybe help with debugging till my ESP32-C3 USB CDC serial data reliability is resolved.
SE_V0.8_sml.2.jpg
SE_V0.8_sml.2.jpg (130.1 KiB) Viewed 6704 times

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Sound Engineering PCB

Post by parkview » Sun Feb 05, 2023 11:19 am

I am really happy with this version of the PCB. This was (at the time), the first JLCPCB US$2 for 5 PCBs special on 6 layer PCB, with ENIG (gold) finish and via's filled with epoxy and plated, so it has a very smooth finish. I love it - well done JLCPCB!
SE_v0.8-front_sml.jpg
SE_v0.8-front_sml.jpg (228.81 KiB) Viewed 6634 times
And here it is with all the components placed:
SE_v0.8_componants_sml.jpg
SE_v0.8_componants_sml.jpg (178.17 KiB) Viewed 6634 times
I plugged the board in and PlatformIO just uploaded the code straight into the ESP32-C3 MCU - nice and easy. I might look to remove the Reset switch as it's not really needed. The Boot which is a User switch to use as you like. The Serial Port could be removed as well. There is lots of extra space for other i2C based sensors. I just can't think of anything that might work will with this board just yet.

I see the special is running again and this time with either a 6 or 8 layer PCB!

You can find the PCB and Test/Dev software here: https://gitlab.com/sw-makers/Sound-Engineering

Post Reply