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

Thread: Help understanding how I killed my teensy 4.0

  1. #1
    Junior Member
    Join Date
    Aug 2020
    Posts
    7

    Help understanding how I killed my teensy 4.0

    I'm hoping to get some help on why my teensy seemingly is dead and how I might've killed it. This is the second teensy I've seemingly killed; the first was in a less stable platform and so I assumed I just shorted a wire at some point (both exhibit the same symptoms though). This second one is in a pcb with no visible shorts anywhere and I wasn't handling the actual teensy much if at all when it died, which leads me to think ESD wasn't likely. I've been working on a balance bot but had just been dealing with getting the orientation code working at this point.

    Symptoms:
    • Teensy not recognized by teensy loader
    • Cannot load new code
    • Most recent programmed code (previously working) does not work
    • No serial device shows up when connected via usb


    Troubleshooting done so far
    • Voltage on 3.3v pins measures 3.3v
    • Attempted 15 second reset with no luck or led flash
    • Inspected for shorts and found none


    Source Code: https://github.com/Str8AWay/aether/t...perOrientation
    Error Messages: None really besides not being able to connect to a serial console or really have anything recognize the teensy
    Hardware:
    Only the 1st 4 in the list below were actually being used by my code at this point.


    Wiring:
    Custom PCB. I did cut the Vin Vusb trace, so it's powered via the 5v regulator and then just data over usb. This is obviously a potential problem source, but my code had been working with this pcb fine for a while before things stopped working.
    Click image for larger version. 

Name:	IMG_0128.jpg 
Views:	33 
Size:	124.6 KB 
ID:	21361

    Software:
    PlatformIO in CLion on a Mac

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,872
    If it were me, some of the debugging I would try include:

    a--) look real close at T4 to see if there are any small pieces of solder or small wires piece or like that might short out pin, does there look like something missing. I did not notice anything in your picture.

    a-) Check for obvious shorts - use meter, check resistance from VIN to GND, 3.3v to GND, 3.3v to VIN... If any are near 0 there is probably an issue.
    a) Make sure you are getting 5v to the VIN pin with a volt meter. I have had times when a battery died and I thought something was wrong...
    b) If so are you getting 3.3v at the pin

    c) Assuming the initial things above work again try the 15 second reset - Sometimes I have not waited long enough.

    d) I might be tempted to disconnect battery and try to do jumper from VUSB to VIN and see if that makes difference.

  3. #3
    Junior Member
    Join Date
    Aug 2020
    Posts
    7
    Quote Originally Posted by KurtE View Post
    If it were me, some of the debugging I would try include:

    a--) look real close at T4 to see if there are any small pieces of solder or small wires piece or like that might short out pin, does there look like something missing. I did not notice anything in your picture.
    I can't see anything that looks like it would cause a short. I'll try to look under more magnification though.

    Quote Originally Posted by KurtE View Post
    a-) Check for obvious shorts - use meter, check resistance from VIN to GND, 3.3v to GND, 3.3v to VIN... If any are near 0 there is probably an issue.
    All those meter readings seem good. All have infinite resistance

    Quote Originally Posted by KurtE View Post
    a) Make sure you are getting 5v to the VIN pin with a volt meter. I have had times when a battery died and I thought something was wrong...
    b) If so are you getting 3.3v at the pin
    I'm getting 5v on VIN and 3.3v on the 3.3v pin as well, so the teensy voltage regulator seems fine

    Quote Originally Posted by KurtE View Post
    d) I might be tempted to disconnect battery and try to do jumper from VUSB to VIN and see if that makes difference.
    Yeah I think I might give that a try, that's a good idea.

  4. #4
    Senior Member
    Join Date
    Jan 2015
    Location
    UK
    Posts
    146
    Do you have the schematic we can have a look at ?

    Do you have any surge protection supply ?

  5. #5
    Junior Member
    Join Date
    Aug 2020
    Posts
    7
    I don't believe I have any surge protection. Here's a picture and I've linked to the actual schematic file. I can also add the rest of the kicad project if that would help.
    Click image for larger version. 

Name:	Screen Shot 2020-08-13 at 10.10.17 AM.jpg 
Views:	43 
Size:	133.8 KB 
ID:	21364

    Schematic File

  6. #6
    Senior Member
    Join Date
    Mar 2016
    Posts
    241
    I don't see anything obvious but you have 12V on the board - I can attest that frys teensys in a heartbeat.

  7. #7
    Junior Member
    Join Date
    Aug 2020
    Posts
    7
    I tried rejoining the VUSB and VIN and just plugged in the teensy by itself. I'm still getting good power readings at VIN and 3.3V, but it's still not responding. From the reading I've done, it seems like most dead teensy's fry the onboard 3.3v regulator, especially if the cause is too much voltage.

    Since my 3.3v regulator is fine, and it was in a pretty stable platform with no shorts that I've found, is there another common cause that kills teensy's that leaves the regulator working?
    Would ESD cause these symptoms or something else?
    Is there anything else I can measure on the teensy to help narrow down the cause?

  8. #8
    Senior Member
    Join Date
    Mar 2016
    Posts
    241
    Well, yes, ESD can kill anything if high enough. Do you recall some sort of event that might have lead to a discharge on the board. I'm a little skeptical though.

    I noticed that you have what looks like a motor controller socket. Perhaps you plugged the controller in backwards?

    Have you tested the Teensy not plugged into the PCB?

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,660
    Quote Originally Posted by Str8AWay View Post
    I tried rejoining the VUSB and VIN and just plugged in the teensy by itself. I'm still getting good power readings at VIN and 3.3V, but it's still not responding. From the reading I've done, it seems like most dead teensy's fry the onboard 3.3v regulator, especially if the cause is too much voltage.

    Since my 3.3v regulator is fine, and it was in a pretty stable platform with no shorts that I've found, is there another common cause that kills teensy's that leaves the regulator working?
    Would ESD cause these symptoms or something else?
    Is there anything else I can measure on the teensy to help narrow down the cause?
    With the stand alone Teensy and VIN<>VUSB connected have you tried the 15 second Restore again?

    Start a timer with visible second count and watch the RED led spot by the USB connector. It will flicker about 15 seconds after pressing. Releasing at that point will do a factory Restore of a blink sketch.

    If it goes past 20 seconds with no red light then - and trying again doesn't work then that is a bad sign.

  10. #10
    Junior Member
    Join Date
    Aug 2020
    Posts
    7
    Quote Originally Posted by PhilB View Post
    Well, yes, ESD can kill anything if high enough. Do you recall some sort of event that might have lead to a discharge on the board. I'm a little skeptical though.

    I noticed that you have what looks like a motor controller socket. Perhaps you plugged the controller in backwards?

    Have you tested the Teensy not plugged into the PCB?
    I'm pretty sure the motor controller is the proper orientation as I had been controller the motors previous to this code. I've also tried the teensy without the pcb now that I reconnected VIN and VUSB.

    Quote Originally Posted by defragster View Post
    With the stand alone Teensy and VIN<>VUSB connected have you tried the 15 second Restore again?

    Start a timer with visible second count and watch the RED led spot by the USB connector. It will flicker about 15 seconds after pressing. Releasing at that point will do a factory Restore of a blink sketch.

    If it goes past 20 seconds with no red light then - and trying again doesn't work then that is a bad sign.
    I did try the restore again and haven't seen any LED flash, so I'm pretty sure it's probably dead just hoping I can diagnosed what might've caused it before risking another teensy in the same environment.

  11. #11
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,660
    in 5 years here with Teensy I have yet to work as a static safe workplace. Usually they hang off a USB cable and get touched grabbed as needed - when I remember I touch the USB hood first.

    Not one has died yet from handling - even in winter in the carpeted dry room with the woodstove that is hard on cat noses. That includes production T_LC's, and 3.x' and T_4.x's and multiple T_3.6 and T_4.x beta units.

    Not to say it hasn't involved lots of luck and just enough safe practice - and a few resets - but general ESD seems to safely dissipate.

    More likely would be some errant gang of electrons going rogue.

  12. #12
    Member
    Join Date
    Apr 2016
    Location
    Honolulu, Hawaii
    Posts
    41
    Two observations:

    The first is to consider overlooked obscure opportunities for ground loops. I killed a few myself before I figured out how badly ground loops can affect the Teensy and how subtly they can creep in. I've seen hundreds of volts of ground differential in my lab.

    Ground loops may not be your problem, but it's worth mentioning that if you connect a USB cable to a PC or a laptop that is plugged in and you have any other possible momentary path to ground then you must use an isolation solution for your USB connection.

    Sources of ground path that I've had to deal with for Teensy projects have included a grounded power supply or charging circuit, audio output to a grounded amp or speaker, an ordinary oscilloscope without a high-voltage isolation probe set, a grounded ESD pad or strap, and others.

    The oscilloscope was a strange one -- my teensies never died while I was looking at traces, but periodically they were dead when I came back to them after having used the scope. I finally was able to replicate the problem by leaving an oscilloscope probe clipped onto a teensy that was connected to USB D+/D-/Gnd but was not powered up, and then turning the lights in my lab off & on. I use high voltage isolation probes now whenever I have a teensy connected to anything that might provide another ground path.

    Since there's always a chance that people will create their own path to ground for one of my devices during field testing, I prevent any possibility of USB ground problems by using an ADuM4160 optical isolation chip to provide an isolated USB2.0 data connection (D+/D-/+5v/Gnd). That chip will pass maybe 100 mA of fully-isolated isolated power from the USB source, but I need more than that so I typically don't connect that power line and instead use a CUI SWM12-5-N medical grade power supply to provide a fully isolated source of 5v power both for the device and for the teensy side of the USB isolator itself. Of course batteries, but they have to be plugged in somewhere/sometime for recharging. I don't necessarily always do this as part of my design -- I just keep one on the bench that I use to provide both isolated power and isolated USB connection to my laptop.

    When configured in this way there is no possibility of a common ground connection from the device via USB to the laptop, nor from the power/charging circuit to earth ground at the power supply wall socket.

    FWIW the CUI SWM12-5-N is certified under 60601-1 edition 3.1 safety standards for 2X MOPP applications, and meets all 4th edition EMC requirements.

    = = = = =
    My second thought: I've also killed a couple of teensies when working with powered motors. The spikes can be prodigious, particularly when motors lack flyback diodes. Some of these small motor controllers have two different ways to configure the handling of inductive back-currents and if you get that wrong you can have all kinds of unexpected behavior. The controller board is isolated if properly connected, but those spikes still affect the ground line and they still couple into your signal traces and wires -- they show up everywhere and can wreak havoc with the I2C bus, among other things.

    = = = = =
    Finally, I'd pull that teensy off and try another reset before condemning it. Maybe you did that, but I couldn't be sure from what you wrote. I've had times when I could not reset a teensy in-circuit, but was not able to see why that should be so. A Hakko desoldering gun makes it so easy that I no longer hesitate to just pull the board off as needed

    Good luck!

    If you get it sorted (or even if you just give up on it) don't forget to come back and tell us what happened.

  13. #13
    Junior Member
    Join Date
    Aug 2020
    Posts
    7
    Thanks for the detailed response! I'm a bit unfamiliar with ground loops but trying to read up on them. Are you saying the GND from the usb connection to my PC and the GND from the battery could have enough potential difference that the current running between them to equalize could fry it? Vin and Vusb weren't connected if that matters in this case.

    On your second thought are you saying even though the motor controller should prevent back currents it could still induce some in the ground line? Would that then cause a ground loop or am I misunderstanding that? Is there measurements I could take to see if something like that would be happening? I've already looked at the voltage between 3.3V and GND when manually spinning a motor and no power source plugged in. That seems like the motor controller is doing it's job as there isn't voltage there but I guess I didn't think about it being able to affect gnd or how that would work.

    I have tried just plugging in the teensy all by itself outside of the circuit and wasn't able to reset it either.

  14. #14
    Senior Member
    Join Date
    Mar 2016
    Posts
    241
    One thing I have learned the hard way is to keep my workspace clean. Little bits of wire and other metal pieces have a nasty way of finding themselves onto the bottom PCBs. Also, never power up a board on your bare work surface. I have a piece of HDPE (cutting board cutoff) that I use for that.

    I've lost more than one board to an errant short piece of wire.

  15. #15
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,996
    Two huge advantage of a solderless breadboard are insulating all the wires from the rest of your workbench and the added weight, so the slightest tension from the USB cable doesn't pull Teensy & other stuff across your desk.

  16. #16
    Junior Member
    Join Date
    Aug 2020
    Posts
    7
    Yeah usually I use a breadboard for most prototyping. This teensy was actually in a custom PCB.

    My desk, especially where it died was pretty clean. I try to keep the soldering and wiring of things on a separate desk from where I am actually powering up and working with it, so I don't think it would've been a stray wire.

    Some of the legs on the bottom of the pcb could've poked through the cardboard I used as insulation between the pcb and the metal plate it is attached to. However, it's pretty stable and don't see any signs of puncture so I don't think that was super likely.

    If >3.3V were applied to one of the I/O pins, how would that manifest itself? Would the 3.3V regulator still likely work? Based on what I've read elsewhere on this forum, it seems like if >5V is applied to VIN the regulator will fail. Is that a reasonable assumption?

Posting Permissions

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