Self latching power for UNO

I have a small circuit where I need to control two relays using an UNO in sequence. This is a very intermittent operation and operated on battery. If it was only the UNO, I could have resorted to a bare bone Atmega328P and followed the Power saving tips outlined by Nick Gammon. http://www.gammon.com.au/power

But in this case the relay board also is battery powered and so at the end of the operation ( 5 sec maximum ) I need to shut down the whole stuff.

Refer the attached circuit which I tried and it " kind off works" But of course I am not happy with it as the Pin 3 is powered even when the UNO is off. Blocking diode did not work. This is a P-Channel MOSFET which needs the Gate to be pulled low to fire. Would a N-Channel MOSFET be OK instead ?

Anyone try anything like this ? Would be glad to get some tips !!

Look here http://forum.arduino.cc/index.php?topic=442716

Connect the button to a pin change interrupt on the m328p, and use the Power Down sleep mode. Use one of the digital pins on the m328p to control the MOSFET.

The microcontroller can go down to under 1uA in it's deepest sleep mode. That is over 500 times less than the current that just the 10k pulldown resistor burns when the system is on. If you've got enough juice to switch relays then you can spare a microamp when it's off. There's no need to go through the trouble of physically disconnecting power to it.

Just to be sure, how big's your battery, and what are you using the regulate the voltage down to 5V?

I’ve used this on one of my project :

pwr_on.jpg

The button used is part of a rotary encoder, and is also used inside the sketch, if you don’t need that you can omit the diodes and the other parts. R33 can (and should) be higher.

edit: in this case the arduino ouput pin must be high to latch the circuit, and switched low to power down

Ciao, Ale

Here’s another schematic that should work.

This was not that well drawn and the resisters are just rough guesses.

If you give this a try and it works out please post a schematic with your final design.

Sorry about the delay for the attachment. I was not able to upload it directly from my iPad.

Thanks

Thanks for all those who cared to send in their responses.

Just curious - instead of two MOSFETs, will not a single N-Channel MOSFET do the job ?

Right now travelling and will be back in base in a day. Shall try out your ideas and revert.

Mogaraghu:
Thanks for all those who cared to send in their responses.

Just curious - instead of two MOSFETs, will not a single N-Channel MOSFET do the job ?

Right now travelling and will be back in base in a day. Shall try out your ideas and revert.

Possibly, try replacing the P-Channel MOSFET with an N-Channel, reverse the Source and Drain and get rid of the other stuff. Once again your control pin will have to be high when the Arduino starts up. This may work but could also be unreliable.

Only one way to find out, try it, you can't damage anything unless you really screw something up.