Power Up on Button

Hi,

I want to build a project where I will power-up the device by pressing a button. Here is the schematic I done for the device. (not built, yet).

As you can see, I use Enable pin for this purpose.

There is an SPDT switch to make it work all the time.

There is a push button which I will use to power it up. When it is pressed, the MCU will take it from there by logic state on the pwrPin, thus stay powered until the condition is made.

Questions:
Does this circuit looks ok? Should I need to change something?
What if I want to power it down with a button? I need another one to give an input to the MCU, or this circuit can be modified?

Thanks in advance.

Why not simply use a latching button ?

I'm not a hardware guy so I use Pololu Power Switches


it's a simple package, can deliver continuous currents from 4A to 16A and you can use the same circuit to shutdown your project by using a simple command pin on your arduino. and they consume next to nothing whilst in off state (~0.01 μA)

you can use the on board button or attach your own button (they have pins for that)

1 Like

I haven't messed up with this before. Any suggestion? Example? :slight_smile:

I think he meant using an ON-OFF switch

image

just switch off the current when you don't need it. plain and simple

Something like this was what I had in mind

Press the button and the switch turns on and stays on
Press it again and the switch turns off and stays off
and so on

I could always use a switch. LOL. :slight_smile:
There is a switch on the schematic already. :slight_smile: SW1

I meant to make it a little bit stylish. Back to schematic. :slight_smile:

Why, when someone asks how to achieve something, do people answer with 'why don't you just do this....' In this case, a latching button or a switch.

Because clearly he doesn't want to do that!

I have powered an Arduino before with a momentary push button before and used a pin that is told to go high immediately to switch a P channel transistor (via an N channel transistor) to then hold the power on.

Advantage is then you can switch off the Arduino in software.

1 Like

Because it is a legitimate suggestion based on the requirement to turn power to an Arduino on and off as originally stated

No mention of a requirement to turn the Arduino off in software. If it had been mentioned then a mechanical switch would not have been suggested

I'm not sure your switches will work as you want. If SW1 is switched to ground, pressing SW2 will still enable the regulator.

If the GPIO pin in INPUT_PULLUP mode can supply enough current to turn on the NPN transistor, then I think the circuit shown below would let you use the push button to power on the circuit, and then use it as an input source thereafter. Then it could be used to signal the processor to power down, or for something else.

Edit: You will probably need to replace the NPN with an N-channel mosfet like the 2N7000, with a 1Meg pulldown gate resistor to ground:

so how is you own answer relevant?

on off

The SW1 should be used only when you want to use it no matter of the SW2 or pin logic state. Say, for testing or uploading a sketch. I think, it will not be exposed and used ever again. You can not upload a sketch if there is no logic to force this pin HIGH. You should keep SW2 pressed all the time. This is the only reason of SW1.

SW2 will be used to power it up, and later keep it powered up with the logic state, until the condition is made.

I believe, in such a case, this should do the job. Just wanted to here if there is some other solution, better, some suggestions... or maybe if I am wrong.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.