Author Topic: Wake Button  (Read 826 times)

0 Members and 1 Guest are viewing this topic.

Offline languid-langoustineTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Wake Button
« on: November 12, 2026, 11:46:46 pm »
Hello!

This is my first post so go easy on me.

I want to build a circuit with a momentary pushbutton that works some what like a soft latch.

I am sure this is a fairly common circuit people use but I want to make sure my idea for the approach works, learn what is wrong with it and best practices for my purposes.

The behavior I want is as follows:
SW1 is pressed allowing power in to the regulator LM2596S-5 which outputs 5V. The 5V powers a Teensy 4.1 which upon wake up will use a digital output (PIN_POWER_LATCH) to turn on a PNP MOSFET to keep the 12V line open. When my system becomes IDLE for a set amount of time, I would want the PIN_POWER_LATCH output to go low and remove power to the system.

Will this circuit work? If not, what am I missing?

An extra thing I would like is to have the same button turn off the system if pressed again. I saw some talk of possibly using a flip flop or a second transistor to achieve this. Would love to get some input on that.

Best
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: au
    • send complaints here
Re: Wake Button
« Reply #1 on: November 13, 2026, 01:55:24 am »
Will this circuit work?
The pfet is back to front, so it wont work as is. Where did the circuit come from? What specific depletion mode mosfet are you planning to use?
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2793
  • Country: us
Re: Wake Button
« Reply #2 on: November 13, 2026, 04:05:47 am »
The way it's usually done is shown below.  Driving the mosfet gate directly from the GPIO is not a good idea because when the MCU's power goes down, the GPIO will drop to ground, and that will turn on the mosfet.  So you add the extra NPN, which requires the GPIO to go output high to turn on the mosfet.  Then the two diodes let the push button also serve as an input for some other purpose.  If pressed a long time, that could be the signal to shut down.
 
The following users thanked this post: languid-langoustine

Offline languid-langoustineTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Wake Button
« Reply #3 on: November 13, 2026, 07:35:20 pm »
The orientation was a silly error on my part. Thank you
 

Offline languid-langoustineTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Wake Button
« Reply #4 on: November 13, 2026, 07:36:55 pm »
Excellent!
I found a COTS option too for testing and other features: https://www.pololu.com/product/2809
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->