Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 65 of 65

Thread: Audio High pitch buzzing

  1. #51
    Senior Member
    Join Date
    Apr 2014
    Location
    -
    Posts
    9,735
    The best is, to attach the audio-shield directly to the teensy - with pins/sockets. don't use wires or breadboards..

  2. #52
    Junior Member
    Join Date
    Apr 2018
    Posts
    12
    Hi, I'm getting a similar issue - without the audio adapter though. I'm driving an OLED through SPI and have an electrolyt cap on one of the DAC outputs for a mono out signal. I'm powered via PC usb. Whenever any graphics are drawn to the screen, this is immediately translated to high pitched noise on the DAC line. The more pixels active on the screen, the worse. Is the suggestion here to use batteries or get some ground isolating thingy ?

    Also all sounds are generated as synthesis. No SD card or anything.

  3. #53
    Senior Member
    Join Date
    Apr 2014
    Location
    -
    Posts
    9,735
    soerena: i'm using this here:https://forum.pjrc.com/threads/46168...icrocontroller
    without buzzing - so, it works (with ili9341 display (spi) ), and it seems your setup is different. so please open a new thread, post your sourcecode, or better a minimal version which allows us to reproduce the issue easyly.
    does your program run without connected display? if yes, just try that. disconnect it (don't change your program) - what happens ? still noisy?

  4. #54
    Junior Member
    Join Date
    Apr 2018
    Posts
    12
    Hi Frank,

    Just tried unplugging the display, and the noise almost disappears. It's still a tiny bit noisy, but this noise is more constant and not depending on the display pixels. Is there some smart way to isolate the display ?

    EDIT: for some strange reason i cant grasp, the noise is much worse the more horizontal lines I draw on the display..

  5. #55
    Junior Member
    Join Date
    Dec 2018
    Posts
    17
    Hi Everybody,

    I've been fighting with this noise for about a year. Does anybody have any success?
    I subjectively feel that the noise is related to SPI a lot. Even if you simply load a simple audio player and touch SPI pins with your hand or stick Teensy into some breadboard and connect long hanging wires to SPI pins you'll definitely hear the noise. Even fast switching digital pins will give you some.
    At some point I tried Line Out connection and there is no noise there. I feel there is something about "capless" headphone connection:
    Click image for larger version. 

Name:	headphone_connection.png 
Views:	54 
Size:	152.8 KB 
ID:	25221
    The "ground" on the headset shows ~1.57V and it gets quite noisy if you start any SPI communication.

    The ideas are not even mine, there are smart people did some analysis here: https://forum.pjrc.com/threads/42025...eld-huge-noise

  6. #56
    Senior Member
    Join Date
    Apr 2014
    Location
    -
    Posts
    9,735
    Hm no,

    with the std audioshield, and proper connections (shield soldered directly to the teensy, or with a PCB) there is no noise - never had any - even with *very* fast SPI to a display.
    Don't use a breadboard.
    Bugs in the software can also result in noise.
    Do you have enough audio buffers?

  7. #57
    Junior Member
    Join Date
    Dec 2018
    Posts
    17
    Hi Frank,

    I was referring to Part_1_03_Playing_Music.ino (the simple example). It has
    Code:
    AudioMemory(8);
    But I also tried with different other settings.
    In addition, I tried Teensy 3.2, 3.6, 4.1 - all are the same

    One thing I forgot to mention is in order to hear the noise clearly you have to do
    Code:
    sgtl5000_1.volume(0);//Mute
    And then longer SPI wires (could be between Teensy and LCD display) then louder the noise. E.g. a few millimeters ones give you very low amplitude while 6 inches will sound quite well. And your surroundings need to be quiet.
    Last edited by s_arty; 07-10-2021 at 07:19 PM.

  8. #58
    Junior Member
    Join Date
    Feb 2021
    Posts
    17
    was there any solution to this problem? I'm running a few samples from a SD card out of the DAC of a Teensy 3.2 (no audio adaptor), and I can hear this 344 Hz buzz only when the samples are playing.

    Ive tried all the things suggested:

    adding series cap out of DAC
    caps between Vin and GND
    isolating power for amplifier
    trying compiling with Tools / No USB
    increasing the gain on the sounds

    I'm kinda assuming there is no cure for this as except to get the Audio Adaptor board.....

    If anyone's gotten the buzz to go away please chime back in!

  9. #59
    Junior Member
    Join Date
    Dec 2018
    Posts
    17
    Quote Originally Posted by zumdar View Post
    was there any solution to this problem? I'm running a few samples from a SD card out of the DAC of a Teensy 3.2 (no audio adaptor), and I can hear this 344 Hz buzz only when the samples are playing.
    This is slightly different issue and I guess, well documented and expected.
    This particular thread is related to floating ground in Audio Adaptor and noise related to SPI bus.

    BTW, using line out (which does have common ground) and an external amplifier does resolve the issue. Just in case if anyone needs a workaround

  10. #60
    Junior Member
    Join Date
    Mar 2023
    Posts
    5
    Hi, First post on here!
    I have a quad ch output using a teensy 4.0 and two audio shields stacked on top of each other. I am experiencing the same issue as described in this tread with a – to my ears not very faint – noise when reading sounds from the sd card inserted into one of the audio shields. The four line out outputs all have this noise when a sound plays.

    I noticed a peculiar thing not described in this thread before, and this is the fact that in my setup, the noise is not there at all when replacing the 4.0 with a teensy 4.1 and reading from the sdcard inserted into the reader at the back end of the 4.1 instead of the one on an audio shield.

    To me, this does not seem like a ground loop issue, the "sandwich" i made is placed in a aluminium box, with the case and case mounted rca outputs ground connected to a single ground point at one of the audio boards line out.

    Another thing I noticed is that the headphone outputs does not have an audible disturbance. Could this be because of the separate ground for the headphone output?

    I tried several different power supplies, and like others in the thread, this has no effect. Unfortunately I can not fit a teensy 4.1 in my case, so I have to go about solving it in another way.

    If anyone has suggestions I would really appreciate it! As of now the only possible solution would be to use the headphone outputs instead, but would prefer another solution that removed the line out noise...

  11. #61
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,951
    What is powering the Teensy and audio shield? And when you listen to the line out signal, what equipment is used and how is it powered?

    Quote Originally Posted by pynting View Post
    To me, this does not seem like a ground loop issue
    Unintended noise on the line out but not headphone output, correlated with something using power, pretty much always means a ground current problem.

  12. #62
    Junior Member
    Join Date
    Mar 2023
    Posts
    5
    Hi Paul, thanks for the quick reply!

    The amplifier is a QSYS SPA4-60. It is a commercial grade amplifier powered by 230v wall plug.

    I have tried several different ways (usb power from charger/laptop/cellphone + a couple of different 5v 230v adapters) of powering the teensy, none resulting in any change to the noise. Only thing that makes a difference so far is using a 4.1 instead of 4.0 and inserting the sd card in the teensy instead of the audio shield (and of course changing the CS pin in software).

    The two audio boards and teensy has all the pins connected to each other by the way.

  13. #63
    Junior Member
    Join Date
    Mar 2023
    Posts
    5
    I will test a simple setup with the teensy 4.0 and a single audio board with the sd card in it, and a single channel connected directly from line out to one channel of the amplifier and report back

  14. #64
    Junior Member
    Join Date
    Mar 2023
    Posts
    5
    Ok, so I stripped everything down to a simple setup with only the teensy 4.0 and single audio board with sounds on sdcard, no other connections. The whine was still there. I stripped out all the code except one channel playing sounds off the sd card.
    I tried to do some configuration of the sgtl5000, and found that setting the lineOutLevel to 13 made the noise get a lot less prominent, but for some reason it did not make much change to the volume to my ears.

    I was thinking... could this be a problem relating to the smaller footprint of the sgtl5000 on the latest revision of the audio board? I noticed that the qfn20 leaves out the analog ground pin, but looking at the schematics, the old board just connects the agnd to gnd, so this is perhaps a mute point.

  15. #65
    Junior Member
    Join Date
    Mar 2023
    Posts
    5
    Just to conclude: I ended up soldering on an sdcard adapter to the teensy as shown in post #18 here
    No more noise. I was hoping for a cleaner solution, but this works.

Posting Permissions

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