320 Hz noise on Teensy Audio board with teensy 4.1 in eurorack world

Status
Not open for further replies.
Hello everyone, I have been going crazy for days around a noise problem on a project that I am carrying out.

I am in an advanced test phase of a Eurorack module with Teensy 4.1 associated with the SGTL5000 codec (the diagram is directly taken from the Audio Board PRJC)
The teensy also controls the controller of the board's LEDs on the I2C Bus.
I used the audio tools utility to create the audio chain.

By plugging the module into the rack
My code generates a fixed 320 Hz noise which is clearly audible at the output.
I immediately thought of a ground loop due to a design error.
I then mounted a teensy with the original audio board in piggy back on the teensy on a breadboard and inserted into the rack.
Noise is always present.

Furthermore, when the I2C BUS writes to the LED controller, a noise of 100 Hz is added to the audio output.
I thought of an excessive absorption of the LEDs such as to create an excessive ripple on the eurorack power supply, but the same happens on the test breadboard where neither the controller nor the LEDs exist.

if I upload the SIMPLEDRUM sketch:

https://github.com/PaulStoffregen/Audio/tree/master/examples/Synthesis/SimpleDrum

the 320 Hz noise disappears and the sound is perfect.

on this sketch there is no control of the LEDs and writing on the BUS.
I am almost certain that the problem is caused by the higher CPU absorption of my sketch compared to the SIMPLEDRUM and that a board design problem creates a BOUNCE GROUND that introduces noise, but then why with the original Audio Board mounted directly on another teensy is the noise always there? The layout of the audio board and teensy are perfect for all applications, I shouldn't have noise on that.

thank you all for the possible advice.
 
Probably a ground loop problem. Best way to troubleshoot is listening with good headphones plugged directly into the audio shield. Maybe also power Teensy from a battery and disconnect USB and anything else that might be giving it a ground connection.


Furthermore, when the I2C BUS writes to the LED controller, a noise of 100 Hz is added to the audio output.

Almost certainly a ground loop...


if I upload the SIMPLEDRUM sketch: .... the 320 Hz noise disappears and the sound is perfect.

Is it really perfect? Or maybe just ground currents have a spectrum your ears can't hear?
 
Or not enough Audio Memory or interrupts disabled too long.. or too much of them, or one is taking too much time..?

The 100HZ i2c noise really looks like a hw problem.
 
345Hz is the rate of audio blocks in the audio lib, could that "320Hz" actually be 345Hz?
If so I suspect some problem like insufficient AudioMemory - certainly posting your code would
allow further analysis.

The I2C issue may be more fundamental, as it seems like breakthrough from digital to analog
domains - its still worth investigating how the grounds are arranged as ground loops are often
culprits for noise-injection.
 
I2C is often the reason for noise. Don't know exactly why... perhaps because it's relatively slow?
I think it should help to use the slowest speed possible. series resistors (and/or even small caps??) , and weaker pullups.
Or contrary, very high speed (>= 1MHz)
 
As for the I2C noise problem it immensely helps to separate the audio and i2c parts as far as possible physically on the board an make sure the digital/i2c gnd doesnt flow thru the audio gnd. This said place everything digital nearer to the master GND point (the Eurorack Power connector) than the audio parts. Pay attention for prolonged cuts in the GND plane and avoid using a seperate "Audio GND" that is possibly nested with digital GND. At least thats what works for me.
 
Status
Not open for further replies.
Back
Top