audio output : noise when using builtin DACS

Status
Not open for further replies.

emmanuel63

Well-known member
Hello,

I have made a little sample player with a teensy 3.5.
Samples are stored on SD card. I use the builtin DACs to get a line level audio output. I use a 10 microF cap to remove DC.
I have some noise when playing samples that I can't get rid of. I tried filtering the power supply, I also made test with batteries, I still have this noise. Samples format : wav, 16bits, stereo.

Wit loud samples, the noise is not hearable. But some of my samples fade from loud to zero, and the noise is really annoying. It's a "digital" noise. It's really sounds like "digital artefacts". No noise on the output when nothing is reading.

Here is the code. This is a simplified version, but It reproduce the problem.
Thanks for any help.
Emmanuel


#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>


AudioPlaySdWav playSdWav1;
AudioOutputAnalogStereo dacs1;
AudioConnection patchCord1(playSdWav1, 0, dacs1, 0);
AudioConnection patchCord2(playSdWav1, 1, dacs1, 1);


void setup() {
Serial.begin(9600);
AudioMemory(12);
SD.begin(BUILTIN_SDCARD);
}



void loop() {
if (playSdWav1.isPlaying() == false) {
playSdWav1.play("m_c3.wav");
delay(10);
}
// do nothing while playing...
}
 
Is the noise apparent with audio lib's sample WAV files (SDTEST1.WAV SDTEST2.WAV SDTEST3.WAV SDTEST4.WAV), or are those "too loud"? Is noise apparent with synthetic (e.g. sine wave) output? what version of IDE and Teensyduino? Are DACs connected to audio amp? maybe attach a photo.

are your WAV files 44.1khz?
SDTEST1.WAV: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
 
Thanks for your answer.

The TEST files are indeed too loud.
Sound is also apparent with synthetic output, but much quieter.
I use the latest version of IDE and teensyduino.
DACS are connected directly to the audio amp (with cap).
My files are 44.1 kHz, little endian, PCM and stereo.

I also check for ground loops.
Same problem with another teensy board, but no problem with the audio shield.

There something I am missing...
 
Status
Not open for further replies.
Back
Top