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

Thread: How do I breathe life back into my teensy 4.0?

  1. #1

    How do I breathe life back into my teensy 4.0?

    I bought a teensy 4.0 and (rev D) audio shield earlier this week. I soldered the teensy to the audio board, and used the USB passthrough mode to play audio through the teensy/audio board to line in of an amplifier.

    This worked absolutely perfectly, until tonight, when I turned the whole lot back on again to play some more, and the teensy doesn't appear in device manager (as a teensy audio device)

    Additionally, I can't program it (pressing button when prompted also does nothing), and the audio obviously doesn't work anymore. There was also an unpleasant high pitched whine coming through the speakers connected to the amp.

    The 5V on the teensy shows 4.86V on my multimeter, but the 3.3V only shows 0.227V.

    Any idea what might be wrong here? Is there any way the audio board can damage the teensy?

    I've tried a number of different USB cables, and I also have a teensy 3.5 here that works with those cables without an issue.

    As I've soldered the teensy to the audio board, I can't easily separate them.

    The source code is absolutely trivial. I've been using VS Code and platformio to program it.

    Code:
    /*
     * A simple hardware test which receives audio from the audio shield
     * Line-In pins and send it to the Line-Out pins and headphone jack.
     *
     * This example code is in the public domain.
     */
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioInputUSB            usb1;           //xy=164,181.99999237060547
    AudioOutputI2S           i2s1;           //xy=504,186.14284896850586
    AudioConnection          patchCord1(usb1, 0, i2s1, 0);
    AudioConnection          patchCord2(usb1, 1, i2s1, 1);
    AudioControlSGTL5000     sgtl5000_1;     //xy=400,426.14284896850586
    // GUItool: end automatically generated code
    
    void setup() 
    {
      // Audio connections require memory to work.  For more
      // detailed information, see the MemoryAndCpuUsage example
      AudioMemory(12);
    
      // Enable the audio shield, select input, and enable output
      sgtl5000_1.enable();
      // sgtl5000_1.inputSelect(myInput);
      // sgtl5000_1.volume(0.5);
    }
    
    elapsedMillis volmsec=0;
    
    void loop() 
    {
      // every 50 ms, adjust the volume
      if (volmsec > 50) 
      {
        sgtl5000_1.volume(usb1.volume()); 
        volmsec = 0;               
      }
    }

  2. #2
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    664
    Hi Caffeine, I would focus on the 3V3 circuitry since something is shorting/overloading the onboard voltage regulator [U4]. Does that voltage regulator run hot? Check the resistance between the 3V3 pin & GND with a multimeter when the Teensy is not powered.
    Also visually check for solderballs or any other metal particles that don't belong there and that may short pins. Have a close look between the boards as well - something may have dropped unintentionally inbetween.

    Hope this helps,
    Paul

  3. #3
    Thanks Paul. I'll take it in to work and use the microscope there to see if there's anything messing with the 3V3.

    I note that those regulators seem to be out of stock everywhere, with a lead time of 7 months so I'm hoping I don't need to try to replace it

  4. #4
    Hrmm, resistance between 3V3 and GND is 0.9V., there's the problem!

    Now to figure out why.

  5. #5
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    664
    The regulator may very well not have been killed by the short/overload. According to the datasheet: "This regulator offers foldback current limit, shutdown, and thermal protection."
    So you perhaps don't need to order a new part. Find & fix the short/overload first...

    Paul

  6. #6
    I ordered another teensy 4.0 and rev d audio shield to use while I diagnose this one. This time I'll solder them to stackable headers so I can take them apart in case of trouble (was considering it this time, I usually do, but I thought 'nah, I'm only ever going to use this with the audio shield attached')

  7. #7
    Whilst waiting for the new teensy and audio board to arrive, I managed to cut the 5V, 3V3 and GND pins between the teensy and the audio board. The teensy now powers up normally, so something on the audio board is causing the short.

  8. #8
    Gave up trying to cut/ desolder individual pins when I damaged a few through holes on the teensy, so I switched to a razor saw and carefully cut the two boards apart, right through the middle of the pin header. It worked perfectly and did no further damage to the teensy or the audio board.

    I'll now investigate why the 3V3 is shorted to GND on the audio board

    Click image for larger version. 

Name:	20210928_135216.jpg 
Views:	17 
Size:	158.3 KB 
ID:	25999

  9. #9
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    664
    Good to hear that the T4 survived the short.
    Did you perhaps use low-profile headers between T4 and audio board? The SDcard connector housing on the audio board may have been touching parts on the bottom of the T4. See also this thread.

    Paul

  10. #10
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    664
    One word of caution: when using a razor saw, the small filings from the cut connector pins may end up under the BGA chip on the T4 and potentially short out some solder balls... Fingers crossed that this didn't happen at your T4.

    Paul

  11. #11
    The T4 still powers up and talks 'normally' so hopefully nothing got stuck.

    I used a standard breakaway header and there looked to be sufficient clearance. I'll swap in some plugganle headers now and see if the problem returns. Thanks for the advice
    Last edited by Caffeine; 09-28-2021 at 07:12 AM. Reason: Typo

  12. #12
    Hrmm, the audio board shows the short between 3V3 and GND even when not connected to the teensy.

    I can't see anything wrong with any of the tracks/components (apart from the 100nF cap to the MIC input, which I accidentally knocked off during dissasembly)

    My new teensy and audio adapter arrive tomorrow, hopefully whatever killed this one doesn't happen to the new one

    Click image for larger version. 

Name:	IMG_1590.jpg 
Views:	12 
Size:	174.3 KB 
ID:	26005

    Click image for larger version. 

Name:	IMG_1591.jpg 
Views:	12 
Size:	145.9 KB 
ID:	26006

  13. #13
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    664
    Hmm, had a pretty good look at your photo's but did not see any obvious problem.

    About connecting the audio board to the line-in of an amplifier: did you use the headphone plug or did you use the line-out pins?
    I'm asking since the ground pin of the headphone plug is a virtual ground and should never be connected to Teensy digital ground.
    From the audio codec datasheet:

    Click image for larger version. 

Name:	Capture.PNG 
Views:	12 
Size:	18.1 KB 
ID:	26009

    I'm not saying this is the cause of the trouble you ran into, but just wanted to make you aware.

    Paul

  14. #14
    I used the headphone plug. Is that likely to have damaged it?

    I've ordered a header to use the AC97 interface on the new audio board. I have a cable from an old PC that terminates in a 3.5mm socket so I'll use that to connect to the amp.

    On the plus side, I've been using my teensy 3.5 to get an OLED screen working, showing a level meter with peak and RMS.

    This audio library is spectacular! Thank you!

    Click image for larger version. 

Name:	20210929_023823.jpg 
Views:	12 
Size:	119.6 KB 
ID:	26017

Posting Permissions

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