Teensy 3.2 (and 3.1) occasionally not running on power up!

Status
Not open for further replies.

gatheround

Well-known member
I wonder if anyone has any experience with this problem before...

I recently noticed that my most recent Teensy 3.2 based project wasn't executing code occasionally, maybe 1 in every 20 power ups. I did some investigation and this is what I've found so far:

1. When the Teensy fails to execute code, 3.3V is still present and the teensy is drawing 20mA from my +5V supply compared to 40mA when the Teensy is executing code.
2. It seems more likely to happen during quick power on-off-on cycles, but also happens during a power on after a long duration of being off.
3. One of the things I tried was different value capacitors on my +5V supply and Teensy's 3.3V supply. All combinations, including no additional capacitors would still occasionally have the Teensy not executing code on power-up.
4. If a large value capacitor was placed on Teensy's 3.3V supply and left to slowly discharge after power off, powering on my +5V supply just as the +3.3V was at 350mV would almost always guarantee that the Teensy would not execute code!

I'm at a loss for this one, but #4 is pretty interesting.. so I can't help thinking there's some sort of weird condition happening during power-up that hangs the Teensy. Also of note:

5. The behavior is the same with the Teensy 3.1 that I also have, so it's not an issue with the Teensy itself.
6. It is also not code related, I uploaded the blink sketch for my tests.

About my setup:

I am powering the Teensy with +5.00V applied to the Vin pin with the VUSB trace cut on the back (but no USB cable present for the tests). My +5.00V is coming from an L78L05 with a .1uF ceramic capacitor on the output and nothing else connected to it.
 
Here's some scope shots of the +5V supply and the Teensy's 3.3V supply in the 30ms after power is applied. I was hoping to see some sort of pattern indicating why the Teensy occasionally decides to not execute code on power up, but I can't see any differences. I'll also add that I'm also able to get the Teensy to not start if I use my bench power supply for the +5V, these scope shots were with the L78L05 though.
 

Attachments

  • teensystartupscope.jpg
    teensystartupscope.jpg
    95 KB · Views: 125
Last edited:
I’m surprised by the unreliability of the blink program under these circumstances.
Are you saying blink does not blink the LED one in every 20 restarts?

Is this truly a plain vanilla Teensy 3.2 running blink, with VUSB cut, and powered by 5v on Vin?

Could you provide a wiring diagram? Is it 1 wire on Vin?
 
I’m surprised by the unreliability of the blink program under these circumstances.
Are you saying blink does not blink the LED one in every 20 restarts?

1 in every 20 is just a guess, sometimes it fails to execute twice in a row for example.

IIs this truly a plain vanilla Teensy 3.2 running blink, with VUSB cut, and powered by 5v on Vin? Could you provide a wiring diagram? Is it 1 wire on Vin?

Yes. Power supply 5+ to Vin and GND to GND.
 
I tried with a LM7805AC voltage regulator and 0.1uF capacitor, but I could not reproduce this problem.

Here's a video so you can see what I tried and how Teensy 3.2 (programmed with LED blink) responded.

 
This is the power supply I used to the LM7805 input.

View attachment 21703

Thanks Paul, I also rigged up an experiment last night using a second teensy to wait a random amount of time and turn on the first teensy and then monitor for the result. It logged thousands of passes and no fails. I will come back to this and make a video soon, thanks for taking the time to try it on your end Paul.
 
I can confirm I've also seen a similar problem.
In my case, the teensy 3.1 was mounted on a PCB, with 3.3V fed from a linear regulator (ST117 iirc) in turn fed from 5V from a MC34063 switching regulator, down from 12V DC. This came into the board via a typical 2A off the shelf AC/DC converter.

I had about 10 units built identically; some seemed to exhibit the problem more often than others.
I couldn't find any problems with rise times etc that I expected to see based on the behaviour. I did play with switching regulator frequencies, adding series impedance, more / less decoupling. Just couldn't correlate anything.
Eventually I found a different AC/DC converter which seemed to reduce the occurrence down to ~ 1/100, which was acceptable for my application.

I'm interested to hear how you get on!!
 

Okay I made a little video of the problem happening. It happens on a cold start (after being off for minutes to hours), but the easiest way to demonstrate it on camera seems to be a quick power cycle.

I'll also another observation: I couldn't reproduce the problem when unplugging/plugging the +5V supply into the breadboard (banana conn), only using the power supply switch itself would cause the teensy to not execute.
 
Last edited:
Which power supply are you using?

It is a Mastech HY1803. I'm also able to get the problem when switching on my project power supply (LM317 +15V into the L78L05) which also has a mechanical switch before the LM317. I did notice that when the Teensys don't run, the crystals aren't oscillating - if that's any help.
 
I'm also able to get the problem when switching on my project power supply (LM317 +15V into the L78L05) which also has a mechanical switch before the LM317.

Could you give me some more detail about this circuitry? Maybe photos too? Any chance you could try with a LM317 and regular LM7805?

If the problem only happens with L78L05, can you give me the exact part number at Digikey, so I can buy the exact same part you're using?

I'll try to build it here and test again. But I'd really like to make sure I get all the details, like the capacitors and any other parts, as close as possible to what you're using so I have the best chance of reproducing the problem.
 
So I might have found what was causing this.

My initial problem was that the Teensy in my application sometimes wouldn't turn on from a cold start (after being off for several minutes). When I isolated just the Teensy, I was able to make it not turn on properly, but only by cycling the power pretty fast (~ 1/4 second) - this was demonstrated in the video I posted above. I'm still not sure why this happens. I was able to see that the crystal fails to oscillate when this happens though, and I'm pretty sure I eliminated the possible cause of start-up transients with TVS diodes. I also know that the power cycle time that has the best chance of making the teensy fail depends on how much capacitance is in the power supply and also how much capacitance is on the Teensy's 3.3V rail.

But cycling the power at 1/4 of a second was not my initial problem; it's unlikely to happen in the real world and solving it is beyond my skills.

So I went back to my initial problem of the teensy not starting after being off for minutes/hours. My application included a bunch of BAT54S diodes on the analog inputs for overvoltage protection, and these were connected between ground and the Teensy's 3.3V supply. When I disconnected these, the Teensy was once again reliably powering up!

I have no idea why the BAT54S cause a condition that stops the Teensy about 1 in every 10 attempts to turn it on, but I am happy to at least know what was causing the issue. I've included a screenshot of the schematic in hopes that someone might know what is going wrong.
 

Attachments

  • bat-schematic-section.jpg
    bat-schematic-section.jpg
    156.3 KB · Views: 97
Status
Not open for further replies.
Back
Top