Hi again,
I've put together an audio amplifier circuit using the LM386, with just a gain of 20. This drives an 8 ohm speaker.
The entire thing is powered by a single 12v supply, with a LD33CV 3.3v linear regulator for the teensy and other circuitry. Now, if my understanding of ground loops is correct; should this not have alleviated the issue, as it has not.
I have put a 220uF electrolytic capacitor in series with the DAC output, and captured the following screenshots of what I believe may be the noise:
In this first image, you can see the track being played, but also the noise affecting it at regular intervals.

Expanding the scale by a factor of 0.1:

and finally:

This is the sketch I used to capture these waveforms:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
AudioPlaySdWav player1;
AudioOutputAnalog dac;
AudioMixer4 mixer;
AudioConnection player1_line(player1, 0, mixer, 0);
AudioConnection mixer_line(mixer, dac);
void setup()
{
delay(500);
Serial.begin(9600);
AudioMemory(15);
SPI.setSCK(14);
if(!(SD.begin(15)))
{
while(1)
{
Serial.println("Failed access...");
delay(500);
}
}
else
Serial.println("SD access success...");
mixer.gain(0, 1.0);
player1.play("SDTEST1.WAV");
}
void loop()
{}
Thanks in advance.