I have a working DIY UPS for my Raspberry PI 3B board. My requirement is that whenever the main power goes off the PI, the software should be able to detect it and immediately trigger a graceful shutdown. Right out my plan is to poll regularly the DC adapter (5V / 2A output) positive line by connecting it to a GPIO pin. With this, I need your help on:
- Knowing the voltage/current tolerance of GPIO pins.
- Any additional component(s) need to be added before connecting to GPIO pin.
- Deciding a proper GPIO pin (with number) for my requirement.
Thank you for your time and help.