OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › safe shutdown on power loss with larger capacitor › Reply To: safe shutdown on power loss with larger capacitor
September 18, 2017 at 7:58 am
#47746
Ray
Keymaster
I would think adding a capacitor on the 5V (VIN) line is easier as it’s much cheaper to get a super capacitor that can withstand 5V. You can detect power loss by checking the voltage at capacitor C1 (the input voltage capacitor that is generally at 30 to 36VDC when 24VAC is plugged in). Use a resistor network to drop it down to something below 3.3V and connect it to a RPi GPIO pin (best through a 1K series resistor to be on the safe side).