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

Thread: Teensy 3.2 - latch-up when not connected to USB

  1. #1

    Teensy 3.2 - latch-up when not connected to USB

    My application couldn't be simpler so I'll just describe it:

    - Teensy 3.2 supplied with 5.1V on Vin
    - UART level shifter (MAX3232) connected to RX1/TX1 and powered by Teensy's 3.3V line
    - Pin 2 as output connected to a WS2812B LED matrix data input via series resistor

    This has been running for weeks but now something strange occurs. When I power everything, the Teensy is suddenly trying to draw >800 mA and the voltage drops.

    However, when I have the USB port connected to my computer, or even a 5V-powered USB hub without connection to the computer, this doesn't happen and everything works normally! This regardless of whether I apply the external power at Vin or not.

    For testing I've isolated pin 2 and whether or not it's connected to the LED matrix doesn't make any difference. I've also measured the current to the LED matrix and it is not causing the issue.

    Any idea where to look? Could the USB chip on the Teensy be the culprit?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,088
    Is there a RS232 cable of some sort plugged into that UART level shifter? Where does it go? Or to ask another way, what is the ground of the connected equipment, and how does that compare with the ground connection with your external power supply, and the ground over that USB cable? And do you have any other ground connections to anything else?

    Often these "works fine with this power, goes horribly wrong with another power source" type problems end up being related to the earth vs floating vs something-else ground connections.

  3. #3
    Good point, but this is not "it":

    - the latch-up happens when I take the Teensy with the LED matrix out and NOT connect it to anything else besides a lab power supply. The level shifter's RS232 side is "in the air" then.
    - in the actual set-up, both the board the RS232 is connected to and the Teensy are powered by the same 5V source and they share a common ground.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,088
    Ok then, another blind guess... have you looked at the start up waveform of both power sources?

    Years ago we had someone (actually a few people) experience all sorts of strange problems with a particular Traco DC-DC converter. Turned out that little power supply would work fine in many cases, but if it got power input over long wires or from a weak (higher impedance) source like a nearly discharged battery, it would have terrible startup behavior and sometimes even become an oscillator. A 10 uF capacitor close to its input solved the problem, even though the Traco datasheet specifically said adding a capacitor was not necessary unless using a higher input voltage.

    So, there's another guess, maybe something to do with unusual or improper or overshoot or non-monotonic voltage ramping at startup?

  5. #5
    OK, looks like this is solved. I treated the two GND pins as "the same" so used one for the power supply and the other one for the display. But apparently the GND plane in the module can't handle the extra current and led to a voltage drop, or lift, however you want to look at it, which in turn led to the funky behaviour and lock up with the crazy current. An extra, thick ground wire was what it took. Why this wouldn't be a problem when powering from the USB port is a mystery to me but this'll teach me a lesson to "never assume".

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,916
    Quote Originally Posted by hello_world.c View Post
    … An extra, thick ground wire was what it took. Why this wouldn't be a problem when powering from the USB port is a mystery ...
    I was running a 32x32 LED display from external power { for display and Teensy } with the VIN<>VUSB trace cut. I didn't have enough GND on the Display board to the external power and Teensy Upload was acting funky.

    I measured current through the USB connector and over 1 Amp was feeding back through the Teensy GND to the PC.

    I added another GND wire from display board to the external power providing an easier path and that stopped the USB taking that extra hit. And in your case using the AGND gave another path that wasn't good as used, but on USB may have had an easier time passing the extra current from GND.

  7. #7
    After solving the persistent GND problem on the bench, believe it or not when I put it into the final set up, it would act up and show a wild LED pattern when turning on. Then I saw your post and added the capacitor and that has now solved it for good. I, too, was using a DC-DC converter (no name) to get the 5V from a 24V source, not on the bench but eventually. So overall I've solved two problems in one thread, with your help.

    Thank you, PaulStoffregen for the hint!

Posting Permissions

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