Arduino Power On/Off with 2 Buttons

Good day,

i've run into an issue with my project:

I'm trying to implement a Power On/Off function for my little autonomous 12V battery system, with 2 separate power buttons (1x for 12V & USB loads, 1x for 230v plug).
The idea is to switch off the arduino when both buttons are switched off. As soon as 1 button gets switched on (or both), the arduino should be turned on and running.

I've seen some simple designs which can implement this feature via a mosfet and some coding, for example here:
https://www.youtube.com/watch?v=L55QrKQQZJk

The problem is, this only works then the power voltage is 5V as well. However, i'm powering my arduino with 9V. This would blow out the Arduino Pin.
I thought about installing a voltage divider to get it down to 5V, but if i'm not wrong there would be a constant current and power loss due to the resistors.

Is there another simple design i'm not seeing?
I'm relatively new to microcontrollers so i appreciate any advice :slight_smile:

My current circuit (the 230V loads are not included yet):

Thank you in advance.

What are you trying to say here?

Much as your diagram is illegible and your 9V "regulator" wiring is thoroughly confused, I will say that you should be powering your Nano with the proper 5 V, not attempting to use "Vin". :roll_eyes:

The 10k pull-downs are supposed to go from the Nano control pins to ground, not at the FET gates.

If you propose to put the Nano to sleep to conserve power, you should be using a Pro Mini instead.

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