Teensy Audio shield headphone output problems

Status
Not open for further replies.
Hello,

I'm having trouble to get sound from my headphone output. First i tried to make a connection from mic input directly to audio output, then i thought that the problem was due to impedance or some microphone specs.

Then i tried with this sketch ,that creates a sinewave at some frecuency, and still i can hear nothing. I have the board directly attached to the teensy 3.1. Also the FFT with the microphone works just fine. I only have the problem of the audio output. Can you please help me?

Thank you,

Code:
//const int myInput = AUDIO_INPUT_LINEIN;
const int myInput = AUDIO_INPUT_MIC;

// Create the Audio components.  These should be created in the
// order data flows, inputs/sources -> processing -> outputs
//
AudioInputI2S          audioInput;         // audio shield: mic or line-in
AudioSynthWaveformSine sinewave;
AudioAnalyzeFFT1024    myFFT;
AudioOutputI2S         audioOutput;        // audio shield: headphones & line-out

// Connect either the live input or synthesized sine wave
//AudioConnection patchCord1(audioInput, 0, myFFT, 0);
//AudioConnection patchCord2(audioInput, 0, audioOutput, 0);
//AudioConnection patchCord3(audioInput, 1, audioOutput, 1);
AudioConnection patchCord1(sinewave, 0, myFFT, 0);
AudioConnection patchCord2(sinewave, 0, audioOutput, 0);
AudioConnection patchCord3(sinewave, 1, audioOutput, 1);

AudioControlSGTL5000 audioShield;

void setup() {
  // Audio connections require memory to work.  For more
  // detailed information, see the MemoryAndCpuUsage example
  AudioMemory(12);

  // Enable the audio shield and set the output volume.
  audioShield.enable();
  audioShield.inputSelect(myInput);
  audioShield.volume(1);

  // Configure the window algorithm to use
  myFFT.windowFunction(AudioWindowHanning1024);
  //myFFT.windowFunction(NULL);

  // Create a synthetic sine wave, for testing
  // To use this, edit the connections above
  sinewave.amplitude(1);
  sinewave.frequency(1034.007);
}

void loop() {
  float n;
  int i;

  if (myFFT.available()) {
    // each time new FFT data is available
    // print it all to the Arduino Serial Monitor
    Serial.print("FFT: ");
    for (i=0; i<40; i++) {
      n = myFFT.read(i);
      if (n >= 0.01) {
        Serial.print(n);
        Serial.print(" ");
      } else {
        Serial.print("  -  "); // don't print "0.00"
      }
    }
    Serial.println();
  }
}
 
Having the same issue. The audio board was working before. And now it just randomly quit sending any audio out.

This is the second board I have had quit unexpectedly.
 
Maybe "tried to make a connection from mic input directly to audio output" involved shorting the headphone VGND to regular GND?

You MUST NOT connect GND to any of the 3 wires on the headphone jack. Doing so can damage the hardware. That's why the board has a strong warning on the bottom: "Caution: do not short VGND to GND"
 
Im sorry, by a connection i meant a software connection, not hardware. I saw that VGND to GND caution sign.

What i meant here, is that i tried from the designing tool, to establish a patch chord connection, a simple program basically and no audio output is shown on the headphones.

am I right if i used the jack connector that comes with the teensy as a headphone output?

Regards,
 
Are you going to post the code that's not working? (eg, the Forum Rule)

The only code here is in the first message, where the connections from the input are commented out.

am I right if i used the jack connector that comes with the teensy as a headphone output?

The headphone connector on the PCB (3 pin 1/8 inch jack) is for headphones. It's never used for signal input.
 
Thank you very much for the tutorials,

I'm noticing something: On the audio shield, i'm connecting a 3.5 mm female jack connector for connecting a microphone (on the mic pins). Maybe that is the problem and those pins are for an electrect mic?

However, the FFT analysis works fine. Is just that i can't hear any sound from the headphones.

Thank you for your help.
 
Change the software configuration of your code and send a 400Hz sine wave first to the teensy's internal DAC, then to the audio shield's line out, and finally to the headphone output, always without connecting any load to the outputs, but looking every time at the unloaded signal with your oscilloscope. This will allow you to find out where, how, or why the signal gets lost.

That's called systematic diagnose... ;)
 
I’m not sure I can give you a solution for this, But I think it’s not just with the audio output, have you checked the headphones properly? There is a possibility of the problem with headphones too. I had faced this issue once with my headphone and later I changed it to a good noise cancelling headphones, which were brought from Bay Bloor Radio in Toronto.
 
Well I too am on my second board that has headphone output issues. I'm pretty sure I connected HPVGND to system GND through my amplifier on the first board, but have been more careful with the second board to only plug headphones into the headphone jack. I'm using the Part_2_04 Mic Check which I understand makes a direct internal analog connection between the mic and headphone output. The symptom is that I get audio from the Mic on initial power up for about 10 sec or so. The output becomes intermittent, then quits completely. If I cycle power, leaving the board off for a minute or so on the assumption it may be a thermal issue, I get output again for a perhaps 15 sec or so, similar to previous attempt. Since this code example makes a direct HW connection from input to output and the Teensy is not doing any processing on the signal, and the signal craps out without changing anything, this suggests some sort of an electrical or thermal issue going on with the HW. I have tried this same shield with my 3.2 and 3.6 board and get the same result, which kind of rules out a supply voltage issue from the Teensy.

Since the postings on this thread are years old I'm not expecting much in the way of help, but would be interested in hearing about similar failure modes or any reports of thermal issues or solder reliability issues. The behavior has the flavor of a floating or high resistance connection, perhaps solder reflow? I could try Theremingenieur's suggestion of routing output to the Teensy's DAC but I don't see how that isolates the problem with decreasing output reliability specifically on the headphone out. Unreliable headphone output is a showstopper for my application. The snarky e-mail responses are kind of fun though 8) Thought I'd give the forum one more try before I give up on the board for another solution. I'm actually hoping it's something obvious I'm doing wrong. I was looking forward to experimenting with the filtering and decimation examples from the Bat Detector thread, hoping this would be a simpler solution than the Microchip implementation I fiddled around with years ago.

The obligatory source code posting:

// Advanced Microcontroller-based Audio Workshop
//
// http://www.pjrc.com/store/audio_tutorial_kit.html
// https://hackaday.io/project/8292-microcontroller-audio-workshop-had-supercon-2015
//
// Part 2-4: Using The Microphone


///////////////////////////////////
// copy the Design Tool code here
///////////////////////////////////

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

// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=116,317
AudioOutputI2S i2s2; //xy=484,314
AudioConnection patchCord1(i2s1, 0, i2s2, 0);
AudioConnection patchCord2(i2s1, 0, i2s2, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=269,410
// GUItool: end automatically generated code



void setup() {
Serial.begin(9600);
AudioMemory(8);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5);
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
sgtl5000_1.micGain(36);
delay(1000);
}

void loop() {
// do nothing
}
 
Audio shield pin 13 PC board jumper trace.

Been trying to debug this using the audio tutorial Part_1_02_Hardware_Test and I'm finding I can get audio output from the headphones pretty consistently for several seconds every time if I cycle the power and wait, as previously described. I noticed that the LED on the 3.6 starts out very bright and starts to flicker and dim coincident with the crackling and loss of audio. I see that there's a copper jumper on the shield board for pin 13 and it looks like it ultimately connects to pin 25 of the SGTL5000 signal I2S_DOUT. The 3.6 schematic shows pin 13 connected to this LED. It looks like the 3.6 is driving into an output on the SGTL5000??? Perhaps i did something wrong tracing this out, but it seems like that could the issue causing my output to get squashed after a few seconds of output. Can someone explain the intent of the jumper on the PC board copper jumper trace connected to pin 13 of the audio shield?

-AG6GU

Well I too am on my second board that has headphone output issues. I'm pretty sure I connected HPVGND to system GND through my amplifier on the first board, but have been more careful with the second board to only plug headphones into the headphone jack. I'm using the Part_2_04 Mic Check which I understand makes a direct internal analog connection between the mic and headphone output. The symptom is that I get audio from the Mic on initial power up for about 10 sec or so. The output becomes intermittent, then quits completely. If I cycle power, leaving the board off for a minute or so on the assumption it may be a thermal issue, I get output again for a perhaps 15 sec or so, similar to previous attempt. Since this code example makes a direct HW connection from input to output and the Teensy is not doing any processing on the signal, and the signal craps out without changing anything, this suggests some sort of an electrical or thermal issue going on with the HW. I have tried this same shield with my 3.2 and 3.6 board and get the same result, which kind of rules out a supply voltage issue from the Teensy.

Since the postings on this thread are years old I'm not expecting much in the way of help, but would be interested in hearing about similar failure modes or any reports of thermal issues or solder reliability issues. The behavior has the flavor of a floating or high resistance connection, perhaps solder reflow? I could try Theremingenieur's suggestion of routing output to the Teensy's DAC but I don't see how that isolates the problem with decreasing output reliability specifically on the headphone out. Unreliable headphone output is a showstopper for my application. The snarky e-mail responses are kind of fun though 8) Thought I'd give the forum one more try before I give up on the board for another solution. I'm actually hoping it's something obvious I'm doing wrong. I was looking forward to experimenting with the filtering and decimation examples from the Bat Detector thread, hoping this would be a simpler solution than the Microchip implementation I fiddled around with years ago.

The obligatory source code posting:

// Advanced Microcontroller-based Audio Workshop
//
// http://www.pjrc.com/store/audio_tutorial_kit.html
// https://hackaday.io/project/8292-microcontroller-audio-workshop-had-supercon-2015
//
// Part 2-4: Using The Microphone


///////////////////////////////////
// copy the Design Tool code here
///////////////////////////////////

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

// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=116,317
AudioOutputI2S i2s2; //xy=484,314
AudioConnection patchCord1(i2s1, 0, i2s2, 0);
AudioConnection patchCord2(i2s1, 0, i2s2, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=269,410
// GUItool: end automatically generated code



void setup() {
Serial.begin(9600);
AudioMemory(8);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5);
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
sgtl5000_1.micGain(36);
delay(1000);
}

void loop() {
// do nothing
}
 
Status
Not open for further replies.
Back
Top