@700 Hz noise introduced to circuit via powering the Teensy

kenjib

Member
Hello,

I am using the Teensy 4.1 + Audio Shield as the signal processor for a custom guitar fx unit. It's been working great except for that I can't figure out how to get the noise under control. So I kept stripping back my design until I got to a pretty basic minimum and found that the noise is probably being introduced via the power going to the Teensy.

noisy pedal schematic.png

That is the schematic. The two OPA-2134 spots in the schematic are two channels of a single chip. For testing, "Audio In" just connects directly to "Audio Out." This roughly creates a unity gain system. It works as expected. I can turn the circuit on and off and not much changes. There is a tiny bit of noise introduced but fairly acceptable for a guitar setup. This is with nothing connected to +VAA -- i.e. the Teensy is not connected in any way.

Now if I connect +VAA to the Teensy 5V pin and G to ground. I upload an empty script to the Teensy that does nothing except print "Hello World" in the setup. The circuit behaves roughly the same and not much noise is introduced.

noisy pedal vero.png

That's the vero layout. Now I upload a new script that does a lot of processing in each cycle. Suddenly, a lot of noise at roughly 700 Hz gets introduced. You can hear it in the attached audio file. Note again that the audio is not going through the Teensy/Audio Shield at all. The Teensy is only connected via the 5v and G pins and the audio is all analog signal unrelated except for power supply at this point. The Teensy has no other pins connected to anything at this point -- not even USB is connected.

Zip file with audio sample of the noise: View attachment Pedal noise.zip

The specific change that introduces the noise is adding computations to each clock cycle. Is it possible that CPU noise is getting into the power line and creating noise in the original analog circuit? You can see in the circuit that I tried some decoupling capacitors. Does anybody have any thoughts on what could be causing this noise and how I can remove it?

Thank you!

-Kenji
 
Processors generally produce a large amount of digital noise into their supply rails, which is why its common to have separate analog and digital supplies and grounds. Another thing you have to watch out for is how grounding is connected - its very easy to create a loop or share grounds between noise sources and audio circuitry, allowing the resistance of the ground wiring to generate noise voltages from the noise currents.
 
Thanks so much Mark. I'll check over the grounding more carefully. What do you mean by separate analog and digital supplies and grounds? The voltage regulator and decoupling caps aren't enough? Even if I ran two different wall warts, they would still be on the same circuit ultimately, unless they were on different breakers in the house when I plug them in. I suspect that's not what you mean though. Sorry for my lack of understanding. I'm a programmer first. I have been trying to learn about electronics and ICs and am having a great time doing so but still have a lot to learn! :p
 
Even if I ran two different wall warts, they would still be on the same circuit ultimately

Usually a wall wart power supply is "floating". Internally, the power flows through a transformer which is magnetically coupled but has no electrical connection between the AC mains side and the low voltage DC output side. But they're not perfect. There is some weak coupling, including capacitive coupling in the windings and maybe even some intentional capacitors inside the wall wart which are meant to reduce RF noise.

For diagnosing tough ground loop noise problems, usually it's best to power 1 or more parts of the system from a battery which you can be sure has no electrical connection or strong coupling to any of the other power sources. Batteries are pretty inconvenient, partly in they run out of charge, partly that they're able to supply so much current if you make a mistake. But it's worthwhile if you're stuck. Many people have traveled this difficult road and the reality is it's really frustrating and demoralizing when "nothing works". Usually powering some or all devices from batteries yields a quick result to hear without ground loops. Then figuring out how to do it without batteries is back to a tough problem, but at least you get to hear it working well so you know there is a way.
 
Back
Top