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

Thread: basic PCB / audioshield question - HF noise

  1. #1
    Junior Member
    Join Date
    Nov 2020
    Posts
    5

    basic PCB / audioshield question - HF noise

    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!

    Click image for larger version. 

Name:	teensy pcb v0.3.jpg 
Views:	44 
Size:	63.6 KB 
ID:	22667

    code: teensy_audio_test.cpp

  2. #2
    Senior Member
    Join Date
    May 2019
    Posts
    110
    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

  3. #3
    Junior Member
    Join Date
    Nov 2020
    Posts
    5
    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.

  4. #4
    Senior Member
    Join Date
    May 2019
    Posts
    110
    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 by tschrama; 11-28-2020 at 09:51 AM.

  5. #5
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    694
    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.

  6. #6
    Senior Member
    Join Date
    Jul 2020
    Posts
    667
    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.

  7. #7
    Junior Member
    Join Date
    Nov 2020
    Posts
    5
    Quote Originally Posted by DD4WH View Post
    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)

    Quote Originally Posted by MarkT View Post
    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.

    Quote Originally Posted by MarkT View Post
    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!

    Click image for larger version. 

Name:	teensy pcb v0.3 monochrome.jpg 
Views:	21 
Size:	67.9 KB 
ID:	22692

Posting Permissions

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