Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: @700 Hz noise introduced to circuit via powering the Teensy

  1. #1
    Junior Member
    Join Date
    Jan 2022
    Posts
    12

    @700 Hz noise introduced to circuit via powering the Teensy

    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.

    Click image for larger version. 

Name:	noisy pedal schematic.png 
Views:	34 
Size:	15.0 KB 
ID:	29492

    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.

    Click image for larger version. 

Name:	noisy pedal vero.png 
Views:	28 
Size:	48.4 KB 
ID:	29493

    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: 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

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,772
    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.

  3. #3
    Junior Member
    Join Date
    Jan 2022
    Posts
    12
    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

  4. #4
    Junior Member
    Join Date
    Jan 2022
    Posts
    12
    Would something like an isolation transformer possibly help?

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,081
    Quote Originally Posted by kenjib View Post
    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.

  6. #6
    Junior Member
    Join Date
    Jan 2022
    Posts
    12
    Thank you Mark and Paul. That's a huge help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •