Hi guys,
During COVID I decided to design my own PCB for the very first time, to go along with a custom case design I was building. Unfortunately, after putting it together I ran into a pretty annoying issue that I am assuming is due to some sort of poor design on my part. I am by no means an expert on PCB design, but I'm guessing it could be due to how I've ended up laying out my design.
The Board:
Pretty standard modified TKL design, with support for an OLED, USB-C passthrough to USB type A, rotary encoder, & RGB's via a ISSI controller. Uses a ATmega32 microprocessor. Keys work fine, with no issues. OLED also works fine as well. Have had some trouble getting the ISSI controller to work. For convenience of the RGB light layout, the board is 4 layer.
Problem:
With the keyboard plugged in & pressing keys, there is a faint but audible and very annoying high pitch noise that can be heard on USB output devices. I have attached two frequency plots of USB output audio I captured to demonstrate the issue present. The plot with the many spikes is when a key is being pressed on the plugged in keyboard.
What I've tried:
Tried different USB audio outputs, different cables, different computers, different operating systems, so the issue is definitely the keyboard. I double checked to make sure everything was soldered correctly --- also resoldered my USB-C connector & removed the ISSI controller as I thought that may potentially be contributing to the problem if busted.
I am by no means an expert with PCB design, so hopefully someone here might have some pointers as to what type and origins the noise has. At this point if I had to guess this is caused by how I chose to stack my power & ground planes. I currently do not have access to an oscilloscope, but can get access to one if recommended for debugging & hunting the issue down.
Let me know if you need more info! I suppose I can also post / PM my kicad design if someone is willing to review it. Worst case I'll toss the design and work backwards with an already established, open source TKL design that I can modify to my needs.