ihatemornings
Active member
I’ve been working on a Teensy 4.0-based music machine for a while, and I’m getting down to the last niggly noise issues. I’m hoping this is something people have solved before, but I haven’t managed to find any Teensy-specific tips on the forum.
I’m using the audio shield and the audio library to play WAVs from an SD card, with the 4ohm speaker output powered by a pretty standard LM386 amp circuit. My problem is that there’s a noticeable whine (around 4kHz) that appears when the Teensy is connected to the amp circuit. When the SD card is being read there’s also a lower frequency noise.
I’ve simplified the circuit down to the minimum number of components with which I can reproduce the problem:
I’m running the “Playing Music” tutorial code but I’ve replaced the SDTEST2.WAV test file with a silent WAV. I can even ground the amp input and the noise continues – the problem is not with the audio output from the Teensy. Here’s my oscilloscope showing the 9v power rail of the amp circuit (bottom) and the amp output across the speaker terminals (top). You can hear the noise in the background:
Do I need to start learning about ferrite beads? I’m quite used to analogue audio circuits but the digital/analog combination brings some new challenges. Any tips, advice or links to resources welcome!
Thanks,
Ben
I’m using the audio shield and the audio library to play WAVs from an SD card, with the 4ohm speaker output powered by a pretty standard LM386 amp circuit. My problem is that there’s a noticeable whine (around 4kHz) that appears when the Teensy is connected to the amp circuit. When the SD card is being read there’s also a lower frequency noise.
I’ve simplified the circuit down to the minimum number of components with which I can reproduce the problem:
I’m running the “Playing Music” tutorial code but I’ve replaced the SDTEST2.WAV test file with a silent WAV. I can even ground the amp input and the noise continues – the problem is not with the audio output from the Teensy. Here’s my oscilloscope showing the 9v power rail of the amp circuit (bottom) and the amp output across the speaker terminals (top). You can hear the noise in the background:
Do I need to start learning about ferrite beads? I’m quite used to analogue audio circuits but the digital/analog combination brings some new challenges. Any tips, advice or links to resources welcome!
Thanks,
Ben