I’m trying to protect an Arduino board (Adafruit Itsy (5v / 16mHz)) from the possibility its power gets turned off while devices connected to its analog pins remain powered on. Details on why this may happen are below, but I was hoping someone could take a look at this circuit and tell me if it would be effective, or point me in a better direction etc.
I’m using an Adafruit Itsy-bitsy to to monitor and manage the power for a few external devices (wall wart power, some 5V, some 18V plus USB coming from a Mac Mini). That’s all working fine. Now I realize I need to protect the Arduino in case it gets turned OFF. This is my first effort.
My thought with this circuit is that while the Arduino is powered ON, one of its pins could keep a MOSFET turned on, allowing an external device to be monitored from an analog pin. If the Arduino’s power were to be removed, the pin would stop supplying current/voltage, the MOSFET would turn OFF and the Arduino pin be safe from back-powering (as discussed in Analog input draws current when arduino is turned off)).
It seems to work just fine on a breadboard, but before I startup updating the pcb etc, I was hoping for other opinions etc.
I should mention that eventually there would be 4 or 5 devices given this treatment, each attached to another analog pin on the Arduino.
My questions would be - would the MOSFETs react quickly enough? Would I be better off powering a MOSFET directly from the 9V source that the Arduino uses (although I’m not sure how to best do that with many devices)?
A simplified circuit png is attached (I hope!).
Thank you in advance for any wisdom imparted in my direction.
WHY THE ARDUINO’S POWER MAY BE INADVERTENTLY TURNED OFF:
This device will be used in an orchestra pit of a Broadway show that I work on. Many departments are in charge of turning power on and off, which they do often, during a typical work / performance day (Lighting, Sound, Electrics etc). It’s also not uncommon for workers to be ferreting around my station while troubleshooting or updating various systems throughout the theater. So the possibility of a wall wart or power plug being inadvertently disconnected is not remote. Even the ‘always on’ power should be interpreted as ‘always on - in theory’. I’m just trying to be prepared for any eventuality.