Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 26 to 50 of 63

Thread: Powering Teensy 3.6 with 3.3V?

  1. #26
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    P.S.

    I really hope that a future version of the Teensy 3.2 will provide a Reset pin, not just a pad on the rear side. Desoldering the Teensy to add the cap was a total PITA!
    (I know that there is no space on the board - I vote for killing some other pin. The reset pin is a must for projects related to vehicles.)

  2. #27
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,085
    @gimpo - startup init ordering change was made for T_3.6 - there was a recent post where that could be attempted on T_3.2 ...
    Last edited by defragster; 06-22-2019 at 10:59 PM.

  3. #28
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,085
    Here is the ref note from Paul forum.pjrc.com/threads/56541-Teensy-3-2-not-booting

    With notes in prior post ...

  4. #29
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,459
    The famous reset delay capacitor might in some cases fix boot problems which are due to the 3.3V line coming up too slowly. But the fixed delay applied by the capacitor might not be optimal in all situations (load, temperature, etc.)
    The correct solution is using a 3.3V voltage converter with a so called „power good“ signal which will keep the reset line low until the output voltage has fully stabilized. An additional advantage is that the rests during firmware upload are not impacted because the power supply will remain on and the power good signal won‘t interfere.

  5. #30
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Thank you guys for all the infos. Seems that Teensy lovers never sleep...
    I will check those intriguing threads.

    @Theremingenieur:
    where I can can find one of that so delicious voltage converters?
    I have some "products" yet assembled, but it could be an interesting upgrade for future versions.

  6. #31
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    The LM2597N-3.3/NOPB converter has a pin called "error flag" that seems very similar to a "PGOOD" pin:

    Open collector output that provides a low signal (flag transistor ON) when the regulated
    output voltage drops more than 5% from the nominal output voltage. On start up, Error Flag
    is low until VOUT reaches 95% of the nominal output voltage and a delay time determined by
    the Delay pin capacitor. This signal can be used as a reset to a microprocessor on power up


    Unfortunately it requires a bunch of components around limiting the applicability for people (like me) having not so much of space on the PCB...
    In my case, I can only offer a space max 20-30% greater than the footprint of an OKI-Murata converter (the version lying horizontally).

  7. #32
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,085
    Quote Originally Posted by gimpo View Post
    Thank you guys for all the infos. Seems that Teensy lovers never sleep...
    I will check those intriguing threads.

    @Theremingenieur:
    where I can can find one of that so delicious voltage converters?
    I have some "products" yet assembled, but it could be an interesting upgrade for future versions.
    With so many worldwide Teensy lovers {and unhealthy sleep patterns} - it is rare one isn't online it seems.

    If you have a test unit with repro - making/observing the Cores code change would be good feedback for Paul to alter startup for T_3.2. That wouldn't offer a reset or hardware challenge , but might stop startup hangs with just a code re-ordering.

  8. #33
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,337
    When I changed the startup for Teensy 3.6, I built a DC-DC converter board with extra slow startup. I tested on all the current 32 bit Teensy boards. Starting the RTC oscillator early on Teensy 3.5 & earlier boards did not seem to cause any issues. Only Teensy 3.6 seems to have its 32 kHz oscillator (control registers) in the VBAT power domain.

    On all the boards, the RTC is initialized late, to allow maximum time for the VBAT power to come up. Only the 32 kHz oscillator is started early.

    The 32 kHz crystal can take quite some time to establish stable resonance, about 400 to 500 ms. So starting it early may be beneficial for usage cases where someone may wish to do things the RTC in setup(). If anyone can show a clear case where early startup of the oscillator on Teensy 3.2 is causing problems, I'll make a change to solve it. But I did very carefully test this here and every indication was that early oscillator startup was not an issue on Teensy 3.2.

  9. #34
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Hi Paul,

    so a Teensy 3.2 owner like me should have not significant improvements by upgrading Teensyduino from version 1.45 to 1.46, right?

    Another question:
    after adding the capacitor between Reset and Ground, is the Teensy 3.2 still re-programmable via the USB cable when no other power-source is connected to it? (I didn't make the famous "cut" close to the USB pads...)

  10. #35
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Update.

    After adding the capacitor, the Teensy 3.2 seems no more re-programmable via USB (IDE 1.8.8 + Teensyduino 1.45):

    Code:
    Teensy did not respond to a USB-based request to enter program mode.
    An error occurred while uploading the sketch
    Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.

    I want to cry...

  11. #36
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,459
    The Teensy loader is obviously not willing to wait for the reset to come up delayed. That’s why I said that a capacitor was not always the best solution...

  12. #37
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    There is no "all-in-one" component available on the market that provide the "power good" functionality?
    I mean, something with a built-in prefixed threshold (3.3 or 5 volt) that can be put in the middle between the source unit and the Teensy?

  13. #38
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,459
    A Voltage reference, a comparator, 3 resistors...

    or something like this: https://www.onsemi.com/pub/Collateral/NCV8508B-D.PDF

  14. #39
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Hallo,

    your proposal would be applicable if only I could have the necessary space to solder all of that components. Unfortunately I'm still using PTH components soldered one by one.
    I think also that Teensy (and all of the rest of general purpose AVRs available on the market) are used in many smart application in real life where the space is critical. The main advantage of such devices is their size: they are small and can be embedded in an helmet, a glove, a t-shirt, an hat, on a bicycle, and so on. In such way, proposing an "external bulky circuit" is always a failure, IMO.

    There is no way to "neutralize" the effect of the "reset-cap" (i.e. the capacitor on the reset pad) when the USB cable is plugged?
    I mean something that realizes the two scenarios:

    Scenario 1

    - no USB cable is plugged
    - Teensy is powered via the Vin pin (at 3.3 or 5 volt)
    - the reset-cap is effective

    Scenario 2

    - USB cable is plugged in
    - Teensy is powered via USB and the supply line on the Vin pin is detached
    - the reset-cap is ineffective

    To "disable" the reset cap would be possible to connect the other terminal of the capacitor to the Vusb pad, so the potential difference between the terminals of the cap goes to zero and no capacitance effect take place?
    To avoid the Vusb from being shorted to ground one could add a big resistor, or even a PMOS transistor acting like a switch to ground?

    I don't know if Vin and Vusb are somehow connected inside the Teensy. If so, my idea would not work... : (

  15. #40
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,085
    Is there a T_3.2 without CAP mod to try the code change linked in post #28?

  16. #41
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Hi defrag,

    what source code file I should check?

  17. #42
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,085
    Quote Originally Posted by defragster View Post
    Here is the ref note from Paul forum.pjrc.com/threads/56541-Teensy-3-2-not-booting

    With notes in prior post ...
    Quote Originally Posted by gimpo View Post
    Hi defrag,

    what source code file I should check?
    That link from post #28 should have pointed here :: https://forum.pjrc.com/threads/56541...l=1#post207942


    If I'm reading right ... 2 hours late for sleep … Find the first and add "&& !defined(__MK20DX256__)" and then on the second add "&& defined(__MK20DX256__)"

    Quote Originally Posted by PaulStoffregen View Post
    Looking at the latest code, the RTC oscillator is being started early on Teensy 3.2.

    This code is at line 748:

    Code:
    #if defined(KINETISK) && !defined(__MK66FX1M0__)
            // If the RTC oscillator isn't enabled, get it started early.
            // But don't do this early on Teensy 3.6 - RTC_CR depends on 3.3V+VBAT
            // which may be ~0.4V "behind" 3.3V if the power ramps up slowly.
            if (!(RTC_CR & RTC_CR_OSCE)) {
                    RTC_SR = 0;
                    RTC_CR = RTC_CR_SC16P | RTC_CR_SC4P | RTC_CR_OSCE;
            }
    #endif
    and this is at line 1108:

    Code:
    #if defined(__MK66FX1M0__)
            // If the RTC oscillator isn't enabled, get it started.  For Teensy 3.6
            // we don't do this early.  See comment above about slow rising power.
            if (!(RTC_CR & RTC_CR_OSCE)) {
                    RTC_SR = 0;
                    RTC_CR = RTC_CR_SC16P | RTC_CR_SC4P | RTC_CR_OSCE;
            }
    #endif
    So if you have this version, maybe try altering those #if checks so the late start is also done with Teensy 3.2.

    Also, I'd like to repeat the suggestion to measure the actual 5V and 3.3V power up waveforms. They might be ok and simply much slower than usual, but this might also be a sign of something much worse going on with your power supply startup. Even if a startup code edit "fixes" this problem, check those power up waveforms!

  18. #43
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,459
    Quote Originally Posted by gimpo View Post
    Unfortunately I'm still using PTH components soldered one by one.
    I think also that Teensy (and all of the rest of general purpose AVRs available on the market) are used in many smart application in real life where the space is critical. The main advantage of such devices is their size: they are small and can be embedded in an helmet, a glove, a t-shirt, an hat, on a bicycle, and so on. In such way, proposing an "external bulky circuit" is always a failure, IMO.
    You are contradicting yourself. On one side, you use bulky through-hole components, on the other side you talk of wearables, where SMD components are much more suitable. So, I see the failure rather on the side of your engineering strategy. Besides the general purpose comparator circuit, I pointed you towards a specific IC which has a size of just 2x3mm and which has been designed specifically for use cases like yours.

  19. #44
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Quote Originally Posted by Theremingenieur View Post
    You are contradicting yourself. On one side, you use bulky through-hole components, on the other side you talk of wearables, where SMD components are much more suitable. So, I see the failure rather on the side of your engineering strategy.
    PTH or SMD, things don't change they are just on a different scale.
    A lot of hobby-makers simply do not have money to design and build complete product to specifically fit their needs and sizes (unless you build dozen of thausands of exemplars). More often we fight to fit our "toy" into a pre-existing design, and I ensure you that when there is not enough space... then there is not enough space. Point. Game over.

    Quote Originally Posted by Theremingenieur View Post
    So, I see the failure rather on the side of your engineering strategy.
    Thanks. I will be the first to subscribe to your course about business strategies.

    Quote Originally Posted by Theremingenieur View Post
    Besides the general purpose comparator circuit, I pointed you towards a specific IC which has a size of just 2x3mm and which has been designed specifically for use cases like yours.
    Didn't see that link last night. My eyes was like two fried eggs.
    Going deeply into that PDF just now...

    What you think about the MAX803/MAX809/MAX810? Seems more simple... a PTH component with similar functionalities would work?
    https://datasheets.maximintegrated.c...03-MAX810Z.pdf

  20. #45
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Quote Originally Posted by defragster View Post
    If I'm reading right ... 2 hours late for sleep … Find the first and add "&& !defined(__MK20DX256__)" and then on the second add "&& defined(__MK20DX256__)"
    Cannot find any file containing that text in the folder arduino-1.8.8/hardware/teensy/avr/cores/teensy3/
    I'm missing something?

  21. #46
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,459
    I wasn't aware of the 803/809/810 series. That looks like something useful in your case. But you'd have to decide once forever if you go for 5V or 3.3V. They seem to be available in smd only...

    BTW: I would never teach business strategies. All I'm personally concerned about is perfectionist state of the art engineering, be it in hardware or software, without caring about costs. My employer's bean counter department hates me for that. I have difficulties in understanding the hobbyist approach, putting so much time and effort into only a single copy, though.

  22. #47
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,459
    Quote Originally Posted by gimpo View Post
    Cannot find any file containing that text in the folder arduino-1.8.8/hardware/teensy/avr/cores/teensy3/
    I'm missing something?
    The file name is mk20dx128.c

  23. #48
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Quote Originally Posted by Theremingenieur View Post
    I wasn't aware of the 803/809/810 series. That looks like something useful in your case. But you'd have to decide once forever if you go for 5V or 3.3V. They seem to be available in smd only....
    Yeah, seems that you won. I have to migrate (although partially) to the SMD world. Now all I have to do is finding a device able to miniaturize myself to be able to handle those little components for hobbits in a more comfortable manner...

    Quote Originally Posted by Theremingenieur View Post
    BTW: I would never teach business strategies. All I'm personally concerned about is perfectionist state of the art engineering, be it in hardware or software, without caring about costs. My employer's bean counter department hates me for that. I have difficulties in understanding the hobbyist approach, putting so much time and effort into only a single copy, though.
    Don't underestimate the hobbyist-power!
    When you have to deal with difficulties having poor resources your brain starts moving at the speed of light.

    Just for talking: an engineer from a company that works in the space sector stated that the only way to produce thin flat steel-rings (some hundreds of microns) was by using their laser-robotized machine (costing 120.000 dollars!!!).
    An expert machinist (based in Utah, IIRC) manufacture the same rings by using an old lathe-machine coming from the '70s... and he is ten times faster.

    EDIT
    Anyway, I'm not properly an hobbyist. I do this as my side-business.
    Last edited by gimpo; 06-25-2019 at 12:46 PM.

  24. #49
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Found! Thanks.
    I will give it a try. Unfortunately I will not able to test it until the middle of July, since my motorcycle will be transported to Italy tomorrow...

  25. #50
    Member gimpo's Avatar
    Join Date
    Mar 2018
    Location
    Munich
    Posts
    51
    Actually, on Mauser I have found a lot of "supervisor circuits" realized by PTH components, with just three pins. Here my selection based upon the threshold voltage (2.9 volt):

    https://www.mouser.de/Semiconductors...yxuc8aZ1yxuca8

    All of this components basically hold the Reset pin down until the supply voltage reaches the desired level.
    But something is not clear to me: since all of them keep the reset down for a further period of time (typically from 150 to 500 ms) by using a timer, shouldn't they act like the capacitor soldered on the reset pad? I mean, are not they going to inhibits the re-programmability when the USB connector is plugged?



    Trpu = Reset Power-Up Timer.

Posting Permissions

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