Fresh AudioShield Rev D not working

Status
Not open for further replies.

Chilus

Member
Hello!

I've got a brand new Teensy 4.0 and a new Audioshield Rev D, but unfortunately there's no sound coming from the audio jack using headphones. I only hear a very fast crackling/ticking that get's louder as I increase the sgtl5000_1.volume.

I've tested it with the example code from "Audio/Tutorial/Part_1_02_Hardware_Test" and the "Audio/Synthesis/Guitar" example on both Teensyduino 1.51 and 1.52 Beta #4 on MacOS.

I'm measuring 1.5V between the L/R output and GND, but it also shows this level before I enable the sgtl5000_1. I'm not sure whether this is supposed to be like that? I would have expected 0V before I enable it. Pin 18 and 19 give 3.3V as expected.

What I'm wondering is whether the microphone line on the headphones can be the culprit? Everything points at a hardware failure but both teensy and shield are brand new. Any thoughts?


20200506_220559.jpg20200506_214042.jpg
 
The earbud's plug has four contacts on it. Does that work properly when plugged into a stereo headphone jack that's got the usual three contacts? Do you have headphones or earbuds with the three-contact plug that you can try?

Pete
 
I have earbuds here I've been using to good end - they are the 4 contact type

Have run one or both of these sketches here - to good end.

Unless powered down the activated sgtl5000 will stat active across restarts.
 
Just tested both those sketches to work here on T_4.0 with Rev D Win 10 w/IDE 1.8.12 and TD 1.52 B4

With the quad contact headphone plug.

FYI: Same two work on T_4.1 w/Rev D AUdio
 
Answering your question about 1.5V between HP L/R outputs and ground.

Yes, you should see ~1.5v between them and the power supply ground, but 0V between the outputs and the local (virtual) ground on the headphone jack.

Can you publish the code you're using, just to make sure the software settings are right for a T4.0 and headphones?
 
@defragster Thanks for mentioning the sgtl5000 stays activated unless powered down, that explain that behaviour.

@palmerr

Board: Teensy 4.0
USB type: "Serial"
CPU speed: "600mhz"
Optimize: "Faster"

Here the code.
Code:
// 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 1-2: Test Hardware
//
// Simple beeping is pre-loaded on the Teensy, so
// it will create sound and print info to the serial
// monitor when plugged into a PC.
//
// This program is supposed to be pre-loaded before
// the workshop, so Teensy+Audio will beep when
// plugged in.

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

AudioSynthWaveform    waveform1;
AudioOutputI2S        i2s1;
AudioConnection       patchCord1(waveform1, 0, i2s1, 0);
AudioConnection       patchCord2(waveform1, 0, i2s1, 1);
AudioControlSGTL5000  sgtl5000_1;

Bounce button0 = Bounce(0, 15);
Bounce button1 = Bounce(1, 15);
Bounce button2 = Bounce(2, 15);

int count=1;
int a1history=0, a2history=0, a3history=0;

void setup() {
  AudioMemory(10);
  pinMode(0, INPUT_PULLUP);
  pinMode(1, INPUT_PULLUP);
  pinMode(2, INPUT_PULLUP);
  Serial.begin(115200);
  sgtl5000_1.enable();
  sgtl5000_1.volume(0.3);
  waveform1.begin(WAVEFORM_SINE);
  delay(1000);
  button0.update();
  button1.update();
  button2.update();
  a1history = analogRead(A1);
  a2history = analogRead(A2);
  a3history = analogRead(A3);
}




void loop() {
  Serial.print("Beep #");
  Serial.println(count);
  count = count + 1;
  waveform1.frequency(440);
  waveform1.amplitude(0.9);
  wait(250);
  waveform1.amplitude(0);
  wait(1750);
}

void wait(unsigned int milliseconds)
{
  elapsedMillis msec=0;

  while (msec <= milliseconds) {
    button0.update();
    button1.update();
    button2.update();
    if (button0.fallingEdge()) Serial.println("Button (pin 0) Press");
    if (button1.fallingEdge()) Serial.println("Button (pin 1) Press");
    if (button2.fallingEdge()) Serial.println("Button (pin 2) Press");
    if (button0.risingEdge()) Serial.println("Button (pin 0) Release");
    if (button1.risingEdge()) Serial.println("Button (pin 1) Release");
    if (button2.risingEdge()) Serial.println("Button (pin 2) Release");
    int a1 = analogRead(A1);
    int a2 = analogRead(A2);
    int a3 = analogRead(A3);
    if (a1 > a1history + 50 || a1 < a1history - 50) {
      Serial.print("Knob (pin A1) = ");
      Serial.println(a1);
      a1history = a1;
    }
    if (a2 > a2history + 50 || a2 < a2history - 50) {
      Serial.print("Knob (pin A2) = ");
      Serial.println(a2);
      a2history = a2;
    }
    if (a3 > a3history + 50 || a3 < a3history - 50) {
      Serial.print("Knob (pin A3) = ");
      Serial.println(a3);
      a3history = a3;
    }
  }
}
 
Yup, unlike other codecs it does not power down or reset automatially if the clock is missing.
In addition, it does not have a reset-pin.
Wonder why.
 
I saw that on a Forum post where running one sketch worked - and the second worked if run after it. But cold start the 2nd would not work … because it didn't have : sgtl5000_1.enable();
But the First sketch did and it persisted across upload.

If that sketch is unaltered sketch that worked as tested here - something is wrong with soldering or hardware it would seem … and the pictures don't look to have obvious flaws in the soldering :(

Without the Audio board can other BLINK and sample sketches upload and work properly? There are some PIN TEST sketches in the T_4.0 Beta thread.
 
I have only checked a blink test on the Teensy and it works fine. When i have time in the weekend I'll hook up the T4 to a max98357A I have lying here to see if the I2S output is working.
I'll keep you posted.

@defragster would you have a link to that PIN TEST of T4? That beta thread is huge
 
Did some more tests:

The pin test you gave me defragster came out clean. No visible shorts.
Then I hooked up the T4 to a max98357A chip but also no sound. To double check I hooked up a T3.2 to the max98357A and it gave sound.

I also wired the T3.2 to the AudioShield Rev 4 with matching the wires to the pins and I got a nice guitar sound! So the issue is not the audio shield but the Teensy 4..
The T4 is brand new and there are no visible bad solder points. Any suggestions on what I can test next?
 
Did some more tests:

The pin test you gave me defragster came out clean. No visible shorts.
Then I hooked up the T4 to a max98357A chip but also no sound. To double check I hooked up a T3.2 to the max98357A and it gave sound.

I also wired the T3.2 to the AudioShield Rev 4 with matching the wires to the pins and I got a nice guitar sound! So the issue is not the audio shield but the Teensy 4..
The T4 is brand new and there are no visible bad solder points. Any suggestions on what I can test next?

I can assure you that both Teensy 4 and Teensy 4.1 can work with the Audioshield.
 
Did some more tests:

The pin test you gave me defragster came out clean. No visible shorts.
Then I hooked up the T4 to a max98357A chip but also no sound. To double check I hooked up a T3.2 to the max98357A and it gave sound.

I also wired the T3.2 to the AudioShield Rev 4 with matching the wires to the pins and I got a nice guitar sound! So the issue is not the audio shield but the Teensy 4..
The T4 is brand new and there are no visible bad solder points. Any suggestions on what I can test next?

As FrankB notes - REV D is known to work with T_4.x when both are healthy and properly soldered.

I didn't look at the code linked from before - but IIRC it has SHORT and HIGH and LOW testing to GND or 3.3V. That will show all pins as working to usably source and sink 3.3V under program control. That gives quick sign that all pins working well.
 
Problem solved.. and boy do I feel silly.
I had an old version of the Audio Library for teensy in my Documents/Arduino/Libraries folder which it was referring to.
It will look in that folder first instead of the teensy/avr/libraries folder...
 
Status
Not open for further replies.
Back
Top