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

Thread: Teensy 3.2 boot problem with 3.3V power (200 board statistic)

  1. #1
    Junior Member
    Join Date
    Feb 2018
    Posts
    11

    Teensy 3.2 boot problem with 3.3V power (200 board statistic)

    Hi everybody,
    Iím using 150 Teensy 3.2 to do motion control for an interactive installation.
    We have problem at boot. Randomly some board do not boot with the sketch.
    Sometimes for the boards that do not boot pressing the reset button make them work, sometimes not.
    To have them boot we have to power them multiple time.


    All the board are powered with 3.3V provided by Murata OKI-78SR-3.3 DC/DC converter and connected in parallel to 3 main power lines with linear regulator that provide 24VDC on each line. When we power the system the booting behaviour is not consistent.

    Some numbers:
    We have 6 board out of 200 ordered that systematically donít boot the program when we power the system.
    To have them running we have to disconnect and reconnect them multiple times.

    We have around 15 board out of 200 ordered that donít boot the program around 1 time out of 10
    To have them running we have to disconnect and reconnect them one time.

    We have around 10 boards that donít boot the program around 1 time out of 50
    To have them running we have to disconnect and reconnect them one time.

    The other boards are behaving correctly and boot all of the time.

    All the teensy are mounted on a custom PCB and the PCBís are machine assembled.

    We checked the 3.3V power line with scopes and the rise time is the same when the board boot properly and when the board do not boot properly.
    We have a 300ms delay as suggested in the forum as first line of setup function.
    I would exclude a software problems since lot's of board boot every time and the software is the same.
    We have also tried to load the blink example on the board that don't boot consistently and the behaviour is the same.

    What is going on?

    Best,
    G.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,319
    Years ago a similar startup problem was reported with Traco power supplies. In the end, it turned out those little DC-DC modules were not stable unless they had an extra input capacitor. The Traco datasheet said the extra input cap was only necessary with certain input voltages, but it turns out the supply would go unstable without it, even in the ranges where the datasheet implied it wasn't needed.

    Here's that old thread.

    https://forum.pjrc.com/threads/23647...Teensy-3/page2

    Also, you should be aware the button on Teensy is "Program", not "Reset". It puts Teensy into programming mode.

  3. #3
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    We have more that 100 boards that boot every time without problems and all have same DC converter, all the PCB are machine assembled.
    Here I attach you two images of the 3.3V rising front, you can see that the powerup ramp is the same when the teensy boot or not.
    Sorry for the "reset" button!

    This is the front when the board boot
    Click image for larger version. 

Name:	IMG_5954.jpg 
Views:	28 
Size:	180.0 KB 
ID:	13022

    This is the front when the board do not boot
    Click image for larger version. 

Name:	IMG_5953.jpg 
Views:	24 
Size:	166.5 KB 
ID:	13021

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,319
    Well then, I'm out of guesses, based on only the info written so far.

    As a next step, I'd suggest adding a distinctive LED blink at the beginning of your code. Lots of startup problems can appear as if your program never booted up. Plenty of other people have wasted a tremendous amount of time believing their program wasn't starting, only the later discover it was indeed running but doing something that crashed before they could observe any signs of life.

    Also pay careful attention to whether any C++ classes or Arduino libs you're using run stuff in their constructors. Those execute before setup(), so any problems in constructors can appear as if your program never ran.

  5. #5
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    Interesting.
    Whats the output load on the Murata 78SR and what does your input voltage look like at start up?
    We use the 78SR's at work and I also use them at home. They are very handy and fairly clean even without external caps. We have been using them as drop in replacements for 7805's on one of our VFD drives.

  6. #6
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    As a next step, I'd suggest adding a distinctive LED blink at the beginning of your code. Lots of startup problems can appear as if your program never booted up. Plenty of other people have wasted a tremendous amount of time believing their program wasn't starting, only the later discover it was indeed running but doing something that crashed before they could observe any signs of life.

    Also pay careful attention to whether any C++ classes or Arduino libs you're using run stuff in their constructors. Those execute before setup(), so any problems in constructors can appear as if your program never ran.
    All the teensy (200 units) have the same program and we have the problem just on specific hardware modules.
    I'm starting thinking this is a Teensy problem because I really can't find anything else.

  7. #7
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    Quote Originally Posted by Donziboy2 View Post
    Interesting.
    Whats the output load on the Murata 78SR and what does your input voltage look like at start up?
    We use the 78SR's at work and I also use them at home. They are very handy and fairly clean even without external caps. We have been using them as drop in replacements for 7805's on one of our VFD drives.
    Hi, the images attached in my previous post there are two startup ramp of the Teensy input voltage. As you can see they are the same but in one case it boot and in the other not.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,319
    Quote Originally Posted by wedontplay View Post
    I'm starting thinking this is a Teensy problem because I really can't find anything else.
    Does that mean you're not going to try adding a distinctive LED blink as the very first thing your code does?

  9. #9
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    Sorry Inforgot to mention that I already have a distinctive led blink.

  10. #10
    Senior Member
    Join Date
    May 2017
    Posts
    208
    Do your 6 worst boards boot when you disconnect all I/O? Do they boot if you replace the switching regulator with a linear regulator?. Do they boot if they are just running a very simple program?

  11. #11
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,551
    Since it might be a borderline symptom, happening only on a part of your Teensy boards, I wonder if a delayed boot with a 2.2uF from the MK20's reset pin to ground might solve it... If the issue persists, you can definitively exclude the power supply issue. But if this solves the problems, it would mean that the ramping up of the supply voltage is near the Teensy's tolerance band.

  12. #12
    Senior Member
    Join Date
    Dec 2014
    Posts
    306
    We have observed a similar issue with a MC34063 DC-DC converter set for a 5V output on the PCB, fed into a 3.3V linear regulator. Fortunately our boards are powered individually, so usually takes just unplugging and replugging to bring them back to life. I too, could not find an issue with rise times or a discrepancy between units that frequently suffered the issue and those which booted every time.

    We later identified an alternate mains AC/DC converter to replace the one we were using which remedied the issue for 80% of cases.

    This probably isn't particularly helpful information for you, other than to say we had what sounds like the same issue; however we never really solved it, just worked around it.

  13. #13
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    Quote Originally Posted by Cosford View Post
    We have observed a similar issue with a MC34063 DC-DC converter set for a 5V output on the PCB, fed into a 3.3V linear regulator. Fortunately our boards are powered individually, so usually takes just unplugging and replugging to bring them back to life. I too, could not find an issue with rise times or a discrepancy between units that frequently suffered the issue and those which booted every time.

    We later identified an alternate mains AC/DC converter to replace the one we were using which remedied the issue for 80% of cases.

    This probably isn't particularly helpful information for you, other than to say we had what sounds like the same issue; however we never really solved it, just worked around it.
    This is exaclty our situation. I tried to do other tests but I didn't find any difference in voltage rise at power up between boards that boot and boards that don't.

  14. #14
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,551
    Did you try adding the capacitor to the reset pin to give an additional boot delay?

  15. #15
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    Quote Originally Posted by Theremingenieur View Post
    Did you try adding the capacitor to the reset pin to give an additional boot delay?
    Unluckily I can't because the reset pin is under the board and the PCB's are already assembled.

  16. #16
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    Since we would like to use the teensy again in other projects is there a way to avoid the booting problem when using external regulated power? The problem is related to the external power converter I think.

  17. #17
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,551
    Problem is that the Teensy is (compared to older AVR or PIC processors) so quick starting up and initializing internal build blocks that you can run sometimes into these issues if you have the power more or less slowly ramping up. In my modest experience, an additional capacitor from the reset pin to ground, delaying the boot by 0.1 to 1s is the cheapest but efficient solution. The more professional way is using a voltage regulator with an open collector "power good" output which keeps the reset pin low until the output voltage has stabilized. IIRC, all the ATX power supplies in common PCs work this way.

  18. #18
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    Quote Originally Posted by Theremingenieur View Post
    Problem is that the Teensy is (compared to older AVR or PIC processors) so quick starting up and initializing internal build blocks that you can run sometimes into these issues if you have the power more or less slowly ramping up. In my modest experience, an additional capacitor from the reset pin to ground, delaying the boot by 0.1 to 1s is the cheapest but efficient solution. The more professional way is using a voltage regulator with an open collector "power good" output which keeps the reset pin low until the output voltage has stabilized. IIRC, all the ATX power supplies in common PCs work this way.
    This seems the best solution.
    There is just the problem of the reset pin position that on teensy 3.2 is not exposed on a pad or a ring.
    How do you cable that pin under the board?
    I'm thinking about soldering the teensy board on my PCB as it was an SMD component.

  19. #19
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,551
    There is a small round pad marked "RST" on the Teensy 3.2's bottom side which allows to solder a capacitor towards the nearby USB GND pad. As I'm somewhat 1980ies when it comes to circuit design, my Teensys all get pins and are plugged in corresponding sockets on the PCB. That leaves enough space for the capacitor.

  20. #20
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,093
    As I mainly only do things here for my own fun and on a onesy or twosy basis, the others here talking about the hardware are much more likely to be on the right path...

    But if it were me, I would also try to do things to verify that it is not something with the software. For example if all of the chips are programmed with just something like Blink, do you still have the same problems?

    I know Paul mentioned about putting in a distinct blink as the first thing that runs... Which in #9 you implied you have done something like this. But without seeing the code it is sometimes hard to say, what is going on.

    At one time I had issues with a program that sometimes booted up and other times did not. Turned out there was an issue with a set of constructors which tried to touch the hardware, but depended on other things like the Teensy init code to have been completed... Sometimes worked sometimes not... I fixed this, by NOT having the constructors touch the hardware, but instead having an Init function that was called during setup... But again just throwing darts...

  21. #21
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    Quote Originally Posted by Theremingenieur View Post
    There is a small round pad marked "RST" on the Teensy 3.2's bottom side which allows to solder a capacitor towards the nearby USB GND pad. As I'm somewhat 1980ies when it comes to circuit design, my Teensys all get pins and are plugged in corresponding sockets on the PCB. That leaves enough space for the capacitor.
    How you program the board after you solder a capacitor between rst and gnd?
    When i try to program the board the capacitor hold up the pin causing this behaviour:

    Click image for larger version. 

Name:	Screenshot 2018-04-18 11.49.34.png 
Views:	13 
Size:	730.9 KB 
ID:	13620

  22. #22
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,551
    Ah, good question. Up to now, I programmed first, then soldered the capacitor and assembled everything. I never tried to re-programm a board with capacitor.

  23. #23
    Junior Member
    Join Date
    Feb 2018
    Posts
    11
    I think the best option is:
    - Use 5V DC converter
    - Put a PMOS between the 5V converter output and the VIN of the teensy
    - Activate the PMOS when the 5V line is above 4V

    In this case the rise time of the 3.3V line should be ok.

  24. #24
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,551
    Quote Originally Posted by wedontplay View Post
    I think the best option is:
    - Use 5V DC converter
    - Put a PMOS between the 5V converter output and the VIN of the teensy
    - Activate the PMOS when the 5V line is above 4V

    In this case the rise time of the 3.3V line should be ok.
    This should give the same result as using a power supply with an additional “power good” signal output.

Posting Permissions

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