Audio High pitch buzzing

The best is, to attach the audio-shield directly to the teensy - with pins/sockets. don't use wires or breadboards..
 
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.
 
soerena: i'm using this here:https://forum.pjrc.com/threads/46168-posted-Commodore-C64-Emulation-on-a-Teensy-3-6-Microcontroller
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?
 
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..
 
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:
headphone_connection.png
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-Teensy-3-6-Audio-Shield-huge-noise
 
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?
 
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:
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!
 
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
 
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...
 
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?

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.
 
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.
 
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
 
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.
 
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.
 
Wanted to bump this thread. While struggling with this myself, in an attempt at playing 7 audio files together at once, i've come across something interesting. I switched from an A1 card to a Sandisk V30 card and it seems to have drastically improved the issue. Certainly hasn't fully fixed it, and certainly isnt the cheapest way out, but it's progress. I'm using a Teensy 4.1 currently and it's seeming to be relatively alright, but I'm uncertain as to what others have found with their various devices. Between connecting to my studio speakers and some garbage old samsung headphones from the stone age, the sound is there no matter what so i've eliminated ground loop on my setup. As previously mentioned, cross-talk may be the problem, though i have no clue whatsoever as to what would fix such a thing. Any help with this would be greatly appreciated! Cheers!
 
Don’t know if this post might be relevant? My experience was that indeed the SD card accesses were causing power supply sag, which got into the SGTL5000. Others tried the improved power routing but were unconvinced, and I’m not sure myself that it would affect playback nearly as much as microphone recording.

I have also advocated trying a different SD card to see if it bounced the power supply less - your experience is the first I’ve found that corroborates this.
 
My experience was that indeed the SD card accesses were causing power supply sag
so if power supply sag is a problem, what's the best way to fix it? looking through the forums, the teensy cant natively be powered through its 3v3 pin, so im not really sure what would be a good way to do it. even powering it by a portable battery pack that can charge a phone relatively fast still gives the whine. maybe a CV/CC power supply would work for this situation?
 
I am sure that the power supply sag that @h4yn0nnym0u5e is refering to is local to the Audio Board.
 
Please read and understand the linked post. The sag is purely local to the SGTL5000, I believe, because the audio adaptor’s SD card power routing goes past it. Putting on thicker wires directly between source and card should reduce this effect, as will having soldered connections between Teensy and adaptor, rather than pins and socket.

On re-reading, I see you have a Teensy 4.1. Using its built-in SD slot should also eliminate the issue, so if you’re already doing that then putting in the extra wires won’t help.

And playing 7 audio files is fairly easy, if you try my improved library: discussion and links to the repository in https://forum.pjrc.com/threads/70963-Yet-Another-File-Player-(and-recorder)
 
update: i figured out how to power it via 3v3, needed VBAT to get power first or whatever.... mildly frustrated though because despite giving it all the power it needs, it still threw a fit and actually made the buzzing worse. Not really sure where to go next, but honestly i feel like i would be better off just getting the audio shield for it because that would (hopefully) improve it considering the latest revision that there is.

wow okay then i never saw these new posts. Well, surprisingly the issue is ever-present on the teensy 4.1 with the built in SD card. i'll check out your library to see if it works better with that. It may just be that simultaneous reads in general are difficult but i'll give it a shot. will update soon.
 
Last edited:
Last edited:
Did you remember to run createBuffer() for each playback object? Mentioned in post#1, but probably not emphasised enough!

Probably best to post questions about this on that thread, otherwise this one goes off topic and any help I can give isn’t found by readers of the other thread…
 
Back
Top