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

Thread: Power switch for a 4.0 board

  1. #1
    Junior Member
    Join Date
    May 2021
    Posts
    15

    Power switch for a 4.0 board

    I want to power my 4.0 board with USB, and am planning to use a power switch for my build so that i can keep the board connected without plugging/unplugging the cable all the time. Right now, i'm looking at options, and wanted to ask for your feedback to find the least complicated solution.

    I'm considering using a breakout USB board and then wire a switch inbetween the USB board and the teensy's pins. Or is it possible to manage power on/off by connecting the USB cable to the board as per usual, and connecting a power switch to a digital pin? Any other options?

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,068
    Teensy 4.x's 1062 processor supports an ON/OFF button which is exposed on the PCB.

    Default is pressing about 5 seconds when On turns it Off and about 0.5 sec when Off will turn it On.

    With vBat powered it will remember this state across loss of external power, with external power it will hold the indicated state, but without vBat for memory, loss of power will turn the Teensy ON when power is restored.

    Some details on Forum as tested - and Frank B has this code that may show alternate features: github.com/FrankBoesing/T4_PowerButton

  3. #3
    Junior Member
    Join Date
    May 2021
    Posts
    15
    I completely oversaw the on/off feature, so thanks for bringing my attention to it!

    I'll take a look at the code you linked, but until then i suppose connecting a momentary switch should be enough to do the trick!

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,560
    Again not knowing your setup... Or your full needs... like is it a one off just for you or for product...

    But for my own stuff, I simply use a USB Hub with power switches for each port on it:
    The one I am currently using for the last couple of years: https://smile.amazon.com/gp/product/B07G8CMR18/

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,068
    I had that same p#4 hub - it failed in just over a year - according to my New PC it was suddenly 'shutdown for taking too much power' ?? It is a powered hub???

    I replaced it with this: RSHTECH USB 3.0 Hub Powered 7 Port USB Data Hub Extender Aluminum USB Splitter with Individual On/Off Switches
    > It is working well - had SEVEN Teensy 4.1's and 4.0's on it last week
    -> it has push latch buttons for On/Off instead of 'long press for off' like the Atolla
    -> Also has a blue LED showing power for each port that is easier to read - the Atolla LED glows under the port and bleeds across ports
    -->> AND the LED flickers when (enough) data is active on the port.

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,560
    Quote Originally Posted by defragster View Post
    I had that same p#4 hub - it failed in just over a year - according to my New PC it was suddenly 'shutdown for taking too much power' ?? It is a powered hub???

    I replaced it with this: RSHTECH USB 3.0 Hub Powered 7 Port USB Data Hub Extender Aluminum USB Splitter with Individual On/Off Switches
    > It is working well - had SEVEN Teensy 4.1's and 4.0's on it last week
    Will have to try one if/when mine fails...

Posting Permissions

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