Power switch for a 4.0 board

Status
Not open for further replies.

Frukost

Well-known member
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?
 
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
 
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!
 
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.
 
My power button is now connected and working, meaning it shuts down and immediately starts up after holding it for 5 seconds. As far as i understand this is expected when there's no code specifying the time between power off/on. Instead, what I'd like is to have the power button shut the teensy down, and wait for the next press to power up.

I haven't had the time to look at FrankBoesings repository until now, only to find that it's gone! I have searched this forum and google, and have yet to find anything about writing the code in order to accomplish the above. Any advice is appreciated!
 
Status
Not open for further replies.
Back
Top