Further to my previous question regarding using a single button as a power button that acts as an input button for a micro-controller/arduino, I finally stumbled on this site and found exactly the circuit I was looking for.
In particular this circuit:
All credit to free_electron (thanks whoever you are).
From my understanding, on first press of the button, this circuit connects the gate on the p-channel mosfet (IRLML6401) to GND connecting the battery to cpu-power.
Then when the micro-controller powers up, a pin ("power" in the diagram) connected to the n-channel mosfet (2N7002) is set high which also connects the pmosfet to GND. This allows the user to release the button and the micro-controller remains powered.
Any other press of the button will pull an i/o pin ("switch" in the diagram) to GND on the micro-controller thus registering an input by the user.
To turn off the device, I was going to listen for the button to be held (e.g >3 seconds) and, on release, drop the power pin to GND turning off the device.
Question:
If my understanding of the diagram is right, the issue I'm having is (having no experience with mosfets as I'm a more a hobbyist than a pro) it seems like the parts described in the above diagram require higher voltages than I can provide (around 60v) for them to work.
My circuit runs on a regulated 3.3v (via an LM3671 buck converter) and I dont know which mosfets would suit this purpose?!
In my research I've come across "logic level" mosfets and those which require negative gate voltages and its all a little unclear.
I'm trying to achieve the above with a 3.3v power rail and expect entire circuits current to peak at around 350mA. Can anyone suggest any low cost options?
I'd greatly appreciate any help. Thanks in advance. I really love this forum!
Chris