Noise Issue with Teensy 4.1, Audio Shield, and PAM8403 Amplifier

Now then, should I use audio transformers on the line input and output signals to perform isolation? While that sounds (ha ha, this must happen a lot when describing things) like a plan, the transformers are likely to limit the bandwidth of the source and output signals to from the audio board which I'd like to avoid. If I were to do so, would I use 600ohm/600ohm audio transformers?
Line level isn't designed to drive 600 ohm loads (no one uses 600 ohm in audio these days) but may be able to (check SGTL5000 datasheet for this). Balanced signal cables are used professionally to avoid any ground loop issues, but with single-ended signalling this is always a risk.
 
Mark, thanks. I was also considering the use of a linear optocoupler like the following:

That should have significantly higher bandwidth than a 1:1 isolation transformer.
As an Amateur Radio Licensee, you might find these transformers in an audio interface between a HF transceiver and a PC for processing "digital modes" like WSPR, FT8, SSTV, PSK31 etc.
 
A "linear" optocoupler has pretty poor linearity in fact (from an audio perspective), that particular one has a 2mA to 10mA figure of 0.25% which is -52dB, whereas 16 bit audio can have 98dB SINAD and you'd expect the signal path to not throw that away.

And the opto-coupler's noise floor might also be an issue - its not mentioned in the datasheet...
 
MarkT - thank you for the time and effort spent in your reply. Very helpful and appreciated.

How then would you recommend to someone like myself that they go about getting the processed audio signal off the Audio Adapter board and into a reasonably priced amplifier and speaker? Audio from the Headphones Out sounds very good but does not represent a convenient use scenario for me.

The Teensy is great, the Audio Adapter is great, the signal processing and other support libraries are great; there are so many things to appreciate about this offering.

Can amplifying the line-out be made simple, inexpensive and relatively fool-proof for newbies?

Any practical application notes and examples in this area would be so very appreciated!
 
Audio from the Headphones Out sounds very good but does not represent a convenient use scenario for me.
You have not said how you wish to use the output. It's difficult to make recommendations without that data.
 
In a small metal enclosure, I wish to place a DSP noise reduction and morse code decoding circuit built around the Teensy 4.1 and accompanying Audio Adapter; see https://github.com/grahamwhaley/DSPham/blob/master/README.md to be used with SW receivers or HF transceivers that lack that capability. Ideally I would provide a headphone out to the exterior of the metal enclosure, and also inside would be a small amp and speaker and a means to adjust the level of amplification to that speaker.

I've experimented using a small audio amp run off a separate power supply, and that does seems to work, but I'd like to run the Teensy/Audio Adapter, LCD and amplifier off the same power supply if possible. This is why I was considering the use of an 1:1 isolation transformer, or a linear opto-coupler, otherwise using a single power supply for both seems to be problematic. I'm just not well versed in the fundamentals of electronics and audio design to know what is practical, but am very willing to learn.

Regarding the use of a 1:1 isolation transformer, the psycho-acoustics of speech is such that most of the important content of the signal we process at the ears is band-limited to approximately 3.5kHz anyway.

I can of course provide a line-out from the metal enclosure and use an external amplifier, but I was also dabbling with the idea of mounting the circuit in an existing speaker housing.
 
Would something like this 2.5W mono amp work for you?
I've used a Class D amp in a project, only using the stereo outputs of a Teensy 3.6. I powered a 20w stereo class-D amp with a 12v wall brick, and used a 12v to 5v regulator to power the Teensy 3.6. The only problem I had was with a power-on transient. I fixed the transient problem by using the "shutdown" pin and code in "startup_middle_hook()" to mute the amplifier.

Code:
extern "C" void startup_middle_hook(void);
void startup_middle_hook(void) {
  // Mute the audio amplifier
  pinMode(AUDIO_MUTE, OUTPUT);
  digitalWrite(AUDIO_MUTE, LOW);
}

I used this 20w class D amplifier. The 12v wall brick plugs directly into the barrel connector, the 12v to 5v regulator gets its power from the power input connector block. I did replace the amplifier's power supply capacitor with a low ESR Aluminum-polymer type.
 
Would something like this 2.5W mono amp work for you?

I used this 20w class D amplifier. The 12v wall brick plugs directly into the barrel connector, the 12v to 5v regulator gets its power from the power input connector block. I did replace the amplifier's power supply capacitor with a low ESR Aluminum-polymer type.
Very interesting. So you are saying you used this amp fed with the line-out of a Teensy Adapter board; the 12V brick powered the amp, and from the amp, you jumpered over to some 5V regulator to power the Teensy? Can you provide me with the specifics of the power-brick used, and also the 12V to 5V regulator? Thank you!
 
Lightbulb moment. The real issue it seems has been, the amplifier I was trying to use which is really not very high quality, and my inappropriate expectations of performance of that implementation.

I tried an experiment. I have a SONY SRS-X3 BlueTooth Speaker laying around (FWIW - I really think this is an excellent BT Speaker which sounds great, but is no longer produced), so I charged it up, ran the Line-Out from the Teensy Audio Adapter board into the AUX-in of the SONY unit, and was rewarded with a fairly clean amplified signal that was pleasant to listen to.

I think at this point, I'm going to forego attempting to put an amp inside an enclosure and instead, provide a connector for Line/AUX-out.
 
I used this 12v 5A Switching Power Supply to feed the barrel connector on this Stereo 20W Class D Audio Amplifier. I replaced the included power supply capacitor with a low-ESR aluminum-polymer capacitor. I used the power supply screw terminals on the amplifier to feed a small circuit board containing a 5v switching regulator, another low-ESR aluminum-polymer capacitor, and a teensy 3.6. The teensy 3.6's two built-in DACs are connected to the audio input of the amplifier.

The teensy and audio amplifier are part of my RCA 118 Tombstone MP3 player.
 
I used this 12v 5A Switching Power Supply to feed the barrel connector on this Stereo 20W Class D Audio Amplifier. I replaced the included power supply capacitor with a low-ESR aluminum-polymer capacitor. I used the power supply screw terminals on the amplifier to feed a small circuit board containing a 5v switching regulator, another low-ESR aluminum-polymer capacitor, and a teensy 3.6. The teensy 3.6's two built-in DACs are connected to the audio input of the amplifier.

The teensy and audio amplifier are part of my RCA 118 Tombstone MP3 player.
Thanks for the reply. That's a helpful post as well! Nice project BTW!!!
 
Back
Top