Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Teensy4 / Audio Board

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    4

    Teensy4 / Audio Board

    I recently got a new teensy4 board with the audio breakout board and wrongly assumed that the pinouts would would be compatible to solder the two together. I'm now trying to find the best way to desolder the two. I used a regular header to stack the two together and soldered all the points. I'm going to attempt to desolder by applying a moderate amount of pressure to the edge of the board while reheating the solder points hoping to slowly pry them apart. If that succeeds I'll try to clean all of the holes on the teensy before reusing it.

    Any other suggestions before I try this?

    Is there a diagram showing how to connect the two together using a breadboard?

    Thanks

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,684
    If you're physically able to cut every pin and also cut away all the plastic, heating each pad separately and gently pulling the pins out one at a time is the way to do the least damage to the PCB.

  3. #3
    Junior Member
    Join Date
    Aug 2019
    Posts
    4
    Unfortunately there is very little space between the boards and the header plastic is sandwiched between the two boards which are 10mm apart.Click image for larger version. 

Name:	teensy.jpg 
Views:	9 
Size:	105.7 KB 
ID:	17387
    Last edited by mlinton; 08-29-2019 at 05:30 PM.

  4. #4
    Senior Member
    Join Date
    Dec 2015
    Location
    LA
    Posts
    133
    @mlinton,
    I have removed T3x's soldered similarly from a large board by grinding away the outside of the header with a grinding disk on a dremel tool just enough to be able to push the plastic back and cut the leads with wire cutters. Those spacers are 2.27mm and the dremel disk is 1.1mm thick by 30mm dia.

    I was going to post this as a new thread but this spot seems appropriate.

    Here's what you have to do to match a Rev B audio board to a T4:
    Click image for larger version. 

Name:	P1010411.jpeg 
Views:	13 
Size:	110.0 KB 
ID:	17389Click image for larger version. 

Name:	P1010418.jpeg 
Views:	9 
Size:	74.5 KB 
ID:	17388
    Click image for larger version. 

Name:	P1010419.jpeg 
Views:	10 
Size:	69.5 KB 
ID:	17390Click image for larger version. 

Name:	P1010416.jpeg 
Views:	9 
Size:	110.3 KB 
ID:	17391

    and patches to WavFilePlayer.ino to make it work:
    Code:
    // Simple WAV file player example
    //
    // Three types of output may be used, by configuring the code below.
    //
    //   1: Digital I2S - Normally used with the audio shield:
    //         http://www.pjrc.com/store/teensy3_audio.html
    //
    //   2: Digital S/PDIF - Connect pin 22 to a S/PDIF transmitter
    //         https://www.oshpark.com/shared_projects/KcDBKHta
    //
    //   3: Analog DAC - Connect the DAC pin to an amplified speaker
    //         http://www.pjrc.com/teensy/gui/?info=AudioOutputAnalog
    //
    // To configure the output type, first uncomment one of the three
    // output objects.  If not using the audio shield, comment out
    // the sgtl5000_1 lines in setup(), so it does not wait forever
    // trying to configure the SGTL5000 codec chip.
    //
    // The SD card may connect to different pins, depending on the
    // hardware you are using.  Uncomment or configure the SD card
    // pins to match your hardware.
    //
    // Data files to put on your SD card can be downloaded here:
    //   http://www.pjrc.com/teensy/td_libs_AudioDataFiles.html
    //
    // This example code is in the public domain.
    
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    AudioPlaySdWav           playWav1;
    // Use one of these 3 output types: Digital I2S, Digital S/PDIF, or Analog DAC
    AudioOutputI2S           audioOutput;
    //AudioOutputSPDIF       audioOutput;
    //AudioOutputAnalog      audioOutput;
    AudioConnection          patchCord1(playWav1, 0, audioOutput, 0);
    AudioConnection          patchCord2(playWav1, 1, audioOutput, 1);
    AudioControlSGTL5000     sgtl5000_1;
    
    // Use these with the Teensy Audio Shield and Teesny 4.0  mdr20190823
    #define SDCARD_CS_PIN    10
    #define SDCARD_MOSI_PIN  11
    #define SDCARD_SCK_PIN   13
    
    // Use these with the Teensy Audio Shield
    //#define SDCARD_CS_PIN    10
    //#define SDCARD_MOSI_PIN  7
    //#define SDCARD_SCK_PIN   14
    
    // Use these with the Teensy 3.5 & 3.6 SD card
    //#define SDCARD_CS_PIN    BUILTIN_SDCARD
    //#define SDCARD_MOSI_PIN  11  // not actually used
    //#define SDCARD_SCK_PIN   13  // not actually used
    
    // Use these for the SD+Wiz820 or other adaptors
    //#define SDCARD_CS_PIN    4
    //#define SDCARD_MOSI_PIN  11
    //#define SDCARD_SCK_PIN   13
    
    void setup() {
      Serial.begin(9600);
    
      // Audio connections require memory to work.  For more
      // detailed information, see the MemoryAndCpuUsage example
      AudioMemory(8);
    
      // Comment these out if not using the audio adaptor board.
      // This may wait forever if the SDA & SCL pins lack
      // pullup resistors
      sgtl5000_1.enable();
      sgtl5000_1.volume(0.4);
    
      SPI.setMOSI(SDCARD_MOSI_PIN);
      SPI.setSCK(SDCARD_SCK_PIN);
      if (!(SD.begin(SDCARD_CS_PIN))) {
        // stop here, but print a message repetitively
        while (1) {
          Serial.println("Unable to access the SD card");
          delay(500);
        }
      }
      //mdr20190828 IOMUXC stuff below was required to get SDcard to work and to attach to other boards.
      //from: https://forum.pjrc.com/threads/57167-Teensy-4-0-I2S-Support?p=213128&viewfull=1#post213128
      // defaults were all 0x10B0 which is keeper, Medium speed (100 Mhz), drive strength = R0/6 = 150/6 = 25 ohms (the second strongest drive strength available) // My changes were:
      IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_00 = 0xF808; // SCL, pullup at 22K, open drain enable, low speed, drive strength at R0 (150 ohm)
      IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_01 = 0xF808; // SDA
      IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_09 = 0x8; // MCLK, low speed, drive strength at R0 (150 ohm).
      IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_10 = 0x8; // BCLK
      IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_11 = 0x8; // LRCLK
      IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_01 = 0x8; // OUT1A
      IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_03 = 0x8; // SCK  mdr20190828 helped get to second read
      IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_02 = 0x8; // SCK  mdr20190828 helped get to second read
    }
    
    void playFile(const char *filename)
    {
      Serial.print("Playing file: ");
      Serial.println(filename);
    
      // Start playing the file.  This sketch continues to
      // run while the file plays.
      playWav1.play(filename);
    
      // A brief delay for the library read WAV info
      delay(5);
    
      // Simply wait for the file to finish playing.
      while (playWav1.isPlaying()) {
        // uncomment these lines if you audio shield
        // has the optional volume pot soldered
        //float vol = analogRead(15);
        //vol = vol / 1024;
        // sgtl5000_1.volume(vol);
      }
    }
    
    
    void loop() {
      playFile("SDTEST1.WAV");  // filenames are always uppercase 8.3 format
      delay(500);
      playFile("SDTEST2.WAV");
      delay(500);
      playFile("SDTEST3.WAV");
      delay(500);
      playFile("SDTEST4.WAV");
      delay(1500);
    }
    I have no idea if this will make the combination compatible with Pauls new T4 compatible audio boards in the future.

  5. #5
    Junior Member
    Join Date
    Aug 2019
    Posts
    4
    That's good to know, this seems like a bit of a hack for now - maybe I'll just wait for the T4 compatible audio board.

  6. #6
    Senior Member
    Join Date
    Jan 2013
    Posts
    184
    @mlinton, don't give up. Get a set of "flush" wire cutters, like these for example:

    Click image for larger version. 

Name:	IMG_1105.jpg 
Views:	2 
Size:	121.7 KB 
ID:	17392Click image for larger version. 

Name:	IMG_1106.jpg 
Views:	2 
Size:	52.2 KB 
ID:	17393

    These are similar.

    These are thin enough that they can slide in between the Teensy and the Audio Board. Cut all the pins connecting the two boards. Be careful not to damage the SD card slot on the Audio Board on any of the bottom-side components on the T4. Try the cutters approaching for then ends and then from the sides if you need to. Once the pins are cut you should be able to separate the boards, remove the plastic spacers, and unsolder each the remaining parts of individual pin one at a time. Be careful to not overheat and lift any solder pads and traces (be gentle).

    Click image for larger version. 

Name:	IMG_1108.jpg 
Views:	2 
Size:	65.6 KB 
ID:	17394Click image for larger version. 

Name:	IMG_1109.jpg 
Views:	2 
Size:	63.4 KB 
ID:	17395

  7. #7
    Junior Member
    Join Date
    Aug 2019
    Posts
    4
    Sounds good! Ordered, and I'll try and update once I get them. Thanks!

    Quote Originally Posted by markonian View Post
    @mlinton, don't give up. Get a set of "flush" wire cutters, like these for example:

    Click image for larger version. 

Name:	IMG_1105.jpg 
Views:	2 
Size:	121.7 KB 
ID:	17392Click image for larger version. 

Name:	IMG_1106.jpg 
Views:	2 
Size:	52.2 KB 
ID:	17393

    These are similar.

    These are thin enough that they can slide in between the Teensy and the Audio Board. Cut all the pins connecting the two boards. Be careful not to damage the SD card slot on the Audio Board on any of the bottom-side components on the T4. Try the cutters approaching for then ends and then from the sides if you need to. Once the pins are cut you should be able to separate the boards, remove the plastic spacers, and unsolder each the remaining parts of individual pin one at a time. Be careful to not overheat and lift any solder pads and traces (be gentle).

    Click image for larger version. 

Name:	IMG_1108.jpg 
Views:	2 
Size:	65.6 KB 
ID:	17394Click image for larger version. 

Name:	IMG_1109.jpg 
Views:	2 
Size:	63.4 KB 
ID:	17395

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •