Auto-Power on/off circuit

Hi, since I blew up in the past an Arduino trying power circuits, now I prefer to be really sure of what I'm doing. Thank you for the support and for trying to understand my bad english.

I need something that give to my arduino to shut down itself. Let me explain: I power it up, it checks the voltage, it finds it's too low, it shuts down itself.

I was thinging to put an NPN in series with GND, a power on pushbutton and a digital pin both attached to the base of the transistor. To power the whole thing I would press the pushbutton and a start up routine will start, and mybe after 3 sec puts the digital pin to HIGH. At that time I would be able to release the pushbutton. In the startup routine and every 30 sec Arduino checks the voltage and if it is low, put the digital pin to LOW and everything should switch off.

In your opinion can this work? Did I miss something like a diode or other hardware?

Thank you again, Luca

Or...

You simply buy one of these: http://www.pololu.com/product/750

It allows you to use a pin to "shutdown" on command.

This is exactly how I created an auto-shut-off option on my LC meter.

If you are still feeling creative and want to build your own... check this out: http://www.eevblog.com/2012/03/30/eevblog-262-worlds-simplest-soft-latching-power-switch-circuit/

The button pulls PNP base down, ShutDown (SHDN) goes high, LTC3525 starts, the uC starts, uC-out pull SHDN high, a retriggerable timer starts and restarts at every press on any pushbutton (there are more buttons). After time out the uC out goes low and it all stops.
I hope it will work, I’m working at this projekt just now.

Pelle

Spänningsmatning radio.jpg

olimex: In your opinion can this work?

Yes.

pwillard: If you are still feeling creative and want to build your own... check this out: http://www.eevblog.com/2012/03/30/eevblog-262-worlds-simplest-soft-latching-power-switch-circuit/

I really like Dave, I've been watching his videos for a couple of years now. But like he says at the end of the video, a micro need a different type of circuit, also because the loop you jump in not releasing the button is just terrible.

fungus:

olimex: In your opinion can this work?

Yes.

I like your style. What FET/NPN and resistor do you suggest me?

Pelleplutt: The button pulls PNP base down, ShutDown (SHDN) goes high, LTC3525 starts, the uC starts, uC-out pull SHDN high, a retriggerable timer starts and restarts at every press on any pushbutton (there are more buttons). After time out the uC out goes low and it all stops. I hope it will work, I'm working at this projekt just now.

Pelle

Why there is a diode on the input pin?

olimex: I like your style. What FET/NPN and resistor do you suggest me?

Any logic-level MOSFET will do.

Add a pull-down resistor to the gate (this is what makes it switch off).

I found online this schematic that follows my idea perfectly, but what is the diode for? :cold_sweat:

olimex:

Pelleplutt: The button pulls PNP base down, ShutDown (SHDN) goes high, LTC3525 starts, the uC starts, uC-out pull SHDN high, a retriggerable timer starts and restarts at every press on any pushbutton (there are more buttons). After time out the uC out goes low and it all stops. I hope it will work, I'm working at this projekt just now.

Pelle

Why there is a diode on the input pin?

Otherwise the input protection diod will pull down the PNP and the circuit will never turn off.

Pelle

olimex:
I found online this schematic that follows my idea perfectly, but what is the diode for? :cold_sweat:

Something to do with “Switch detect”, but you don’t need that.

(so you don’t need the diode either)

nb. If you do it that way you need a P-Channel MOSFET

Actually I need the "Switch detect" output, it probes the pushbutton in case you want to switch it off! So I will put the diode :roll_eyes:

P- channel because it's driven by an HIGH level, isn't it? :%

I read something about how MOSFET works and then I made some correction to the circuit that i posted above.
Now the N-channel MOSFET is between GND and the load (Arduino), where it belongs.

One last thing, would you mind to check if the resistors values have any sense?

Thank you to everyone,
Luca

Now the N-channel MOSFET is between GND and the load (Arduino), where it belongs.

Is it a good idea to keep 5V connected and switch GND off ( What about signal lines ) ??? Except for the fact that N-channel are more common than P-channel mosfets, the previous circuit looks "nicer" to me.

( eev-Dave uses a P-channel as a switch, too. ) But I'm an electronics noob , and eager to read a comment on this opinion.