basic PCB / audioshield question - HF noise

Status
Not open for further replies.

antisleep

Member
Hi all-

I've been playing with a simple PCB layout to provide a buffered input for guitar signals into the Teensy 4.0 & Audio Shield, and a few pots for experimentation. This board runs off 9vdc power (like most guitar pedals) and uses a regulator to produce 5v to power Teensy.

My Teensy part is from the Teensy_Audioshield eagle library (which I really appreciate!). I have line in/out connected between Audio Shield<->PCB with very short wires, since those signals don't appear on the pins. (right?) This means I can't pop the Teensy out of the 28-pin socket I soldered in, but I didn't have any other clever ideas.

What I have works fine but there's some audible HF noise / whine, particularly if the output goes into lots of of gain. I'd like to understand and fix that.

I'm pretty new to this stuff. I don't know if the regulator itself separates analog/digital power enough to keep things clean, and I haven't done anything yet to separate audio/digital grounds - the PCB has one big ground plane that everything is connected to. I realize these issues may cause noise. But...

Before I dive into improving my PCB layout, just wondering if there's any red flags in the way I'm using/wiring up the Audio Shield or its Eagle library part. AFAICT all the ground pins are the same (unlike AGND in 3.x) so only one GND pin needs to be grounded, and then I believe the audio in & out grounds should be wired too.

Schematic & code attached.

Thanks!

teensy pcb v0.3.jpg

code: View attachment teensy_audio_test.cpp
 
A single coil has about 6nV/sqrtHz noise, a hum bucket about 10nV. That op amp has 18nV noise and that 10k resistor 13nV. And than the ADC... assuming about 10 LSB rms over 20kHz BW and 3.3volt range. ... that equals about 1000nV/sqrtHz!!!

Lower noise: use a better ADC, a better opamp, skip that 10k
 
People use TL071's as guitar buffers all the time. And resistors...?

Anyway, the noise in question is not a self-noise thing. It's a whine/tone, around 700hz-1k. It sounds like switching noise, or maybe a weird ground loop. I imagine the Audio Shield doesn't do this when used properly.
 
Then you shouldn’t call it noise.

It is important to keep the impedance to the ADC input as low as possible, so removing that 10k//1n might help. Does it happen when you short the input jack to ground?
And if you ground the ADC input?
 
Last edited:
maybe you would like to try to disable the digital highpass filter of the codec. This has caused trouble in other setups. Search the forum for the actual code line to do this. I am away from my PC, so cannot help with the code line right now.
 
You might want some RF filtering on the input and a resistor on the opamp output so it can drive long cables without
the risk of oscillation. 1k series 470pF shunt for the input perhaps, and 100 ohms on the output is typical. Assuming
the opamp output does go off-board, that is.

Watch out for ground loops, you definitely don't want teensy ground current sharing wiring with the analog ground
wiring, else that will impose digital hash all over the signal. I think you may need to reconsider deriving the
digital supply from the analog supply, as that makes it harder to avoid ground issues.
 
maybe you would like to try to disable the digital highpass filter of the codec. This has caused trouble in other setups. Search the forum for the actual code line to do this. I am away from my PC, so cannot help with the code line right now.

Thanks for this! It didn't make an audible difference in my tests, but it was worth a shot. Since I have a coupling cap after the input buffer, I'll leave this in place anyway. (That function is adcHighPassFilterDisable() in case anyone's looking)

You might want some RF filtering on the input and a resistor on the opamp output so it can drive long cables without the risk of oscillation. 1k series 470pF shunt for the input perhaps, and 100 ohms on the output is typical. Assuming the opamp output does go off-board, that is.

The opamp is an input buffer - signal goes from guitar cable ("S"), to the input buffer, to the Teensy input, to another coupling cap and LPF, to the pedal output ("R"). Sorry if this wasn't clear from my schematic. I'm attaching a monochome version in case it's easier to read.

Watch out for ground loops, you definitely don't want teensy ground current sharing wiring with the analog ground wiring, else that will impose digital hash all over the signal. I think you may need to reconsider deriving the digital supply from the analog supply, as that makes it harder to avoid ground issues.

In the end I have a single 9vdc power supply to work with, so I can't get around sharing. My first goal with this experiment was to figure out how much isolation I need to get quiet output from the Teensy. (It's a little tricky because the audio shield is so big, and guitar pedal enclosures are small.) My first attempt is the one we're discussing - just a voltage regulator for isolation and yeah, sloppy ground isolation. I'm learning!

teensy pcb v0.3 monochrome.jpg
 
Status
Not open for further replies.
Back
Top