Death by barrel jack?

Status
Not open for further replies.

pictographer

Well-known member
I just smoked my first Teensy. I have a guess as to why, but I'd like help to avoid frying a second one. Also, perhaps someone else can learn from my mistakes.

Parts:

  • Teensy 3.2 running FastLED at 12MHz with clock on 14 and data on 7
  • 10A 5V power supply
  • 74VHCT245N level shifter
  • 180 APA 102 RGB LEDs
  • 4-channel barrel jack driving the lights
  • 2-channel barrel jack supplying power
  • USB-A male connector normally plugged in to a wireless router.
  • Momentary push button connecting the Teensy PROG to ground.
  • LED through a current limiting resistor to Teensy pin 2.
  • A5-V11 wireless router not connected at the time of the incident

The rig had been up and running for a couple of weeks with no incidents, changing the lighting several times per day. Measured current with a Kill-a-watt and nothing seemed out of line.

I wanted to extend it from 180 to 220 LEDs. I unplugged everything. Connected the Teensy to my laptop as usual. Updated the sketch for 220 LEDs. Doubled the number of LEDs actually connected from 180 to 360. The sketch initially displays the LEDs at a minimal brightness.

Normally, I connect power last. This time I connected the power barrel connector and then connected the 4-channel connector to the APA102s. Smelled burning plastic. Unplugged power. Noticed the Kinetis processor was too hot to touch.

After letting the rig cool down, I tried again but making the power connection last. The rig lit up as per usual, but again the Kinetis was hot, so again I unplugged the power.

Unplugged everything and tried to connect it to the laptop. Tried holding the reset button while plugging it in several times. No device appears for it in /dev. The built-in LED flickers once very briefly when the power is first connected. The processor gets slight warm. The external power indicator LED doesn't light up, so I don't think my sketch is running.

From tip to base, the barrel connector has DI, CI, 5V, GND. This can momentarily connect 5V to GND as the plug is being inserted. I suspect that when I plugged in the LEDs, I briefly shorted 5V to one of the other inputs.

Here are some pictures of my wiring. Is there anything else you see wrong or that you'd do differently?

bottom.jpgtop.jpgfront.jpg

After I replace the Teensy, would I still damage anything by simply plugging too many LEDs in, even though most of the additional LEDs would be unused? At full brightness, 360 LEDs would be about 2x too much current for the power supply, but at minimal brightness of 8 (3%) it shouldn't be a problem. Should I be concerned about damage to the buffer chip or the LEDs becoming the source of new problems?

Will post the code if anyone thinks it's relevant. Thanks in advance.
 
That plug is going to be a problem, since if I understand the wiring right you will be hitting 5V into both data lines while it's pluged in, and most likely shorting power several times. This is going to be pretty rough on the level converter but wouldn't normally kill the teensy. Teensy may have died due to wildly swinging 5V power placing it in a brown out condition and/or overshooting above it's 5.5V max, or because the level converter died and punched 5V into pins configured as outputs.

Also be aware that because the LED strips use PWM while low brightness levels will average low current draw there will be instants in time when a majority of LEDs are lit and stated max current draw will be hammering the power supply. Filter caps can help with taming the peak draw and at brightness 8 the actual instants of peak draw should be very low, still may have been causing interesting ripples in the power supply.

Regards getting project working again would suggest testing the level converter to make sure at the very least it's not driving anything out it's inputs and then think about the connection method for the strips. Doing as you have done and only touching that plug with power off will work, more robust would be swaping order around so connections go Gnd,Data,clock,5V so the deepest part of the jack is the 5V connection and therefore nothing else will ever touch it (and unlikely to short to ground). Still has risk of shorting the other three, though placing a current limiting resistor in series would help tame that. Better still would be using a connector that doesn't cross connect things and allows an order of connection to be followed (gnd first, data/clock then power) but these are not as cheap or easy to work with as the audio jack. USB plugs would do the job, but then you have two very different USB jacks in your project which isn't a good idea either.
 
Thanks, GremlinWrangler!

I think what you said about filter caps had an observable effect: the LCD display of the Kill-a-Watt showed ghosting like it was rapidly alternating between different values.

I had an additional idea. Since the level converter has unused channels, if I powered the Teensy from the output of the level converter, it would be shielded from reverse polarity. This isn't ideal because the minimum voltage spec for power is -0.5v, but probably better than nothing. The level-shifter is only spec'd to drive 25mA, so this isn't a good idea.

I see your point about the barrel jack connection order. This has the unfortunate side-effect of leaving the 5V channel exposed to the outside of the case. Sigh. OK, I guess I didn't quite get it the first time, but I've got it now! :eek:

Thanks again for the help, GremlinWrangler. This was a good learning experience and I think I can avoid repeating it!
 
Last edited:
Re the plug order, the idea would be the have the tip of the jack and the deepest part of the socket 5V, and the outer part of the socket and the base of the plug as gnd. Idea is that as the plug goes in it first contacts gnd, then contacts it's final target, ensuring that ESD etc is bled off as a helpful side effect. Certainly having 5V on the case of the jack would be bad since it would result in a very strange voltage sequence to the strips as the plug went in. Plug design is tricky!
 
Status
Not open for further replies.
Back
Top