What?? An automated Chicken Coop
Got my KPS-5-1 power supply installed today! Along with the Buck Converter and Boost Converter.
The KPS-5-1 takes 24v(AC) in and 12v(DC) from a battery and out puts 13.8v DC. The Buck Converter drops 13.8 down to 5v to power the rPi, Driver board and relay board. The Boost Converter raises 13.8v to 30v to power the actuator. The KPS-5-1 has an LED to show AC power status (LED illuminates with AC power off when powered by battery). So.. I swapped the LED with an optocoupler and wired the output to GPIO 25. Next I will write a script that checks GPIO 25 for high every 5 minutes and then install it as a service. If GPIO 25 goes low we know that power failed so the script will shutdown the automation service and open the door, after GPIO 25 goes high again it will check it for 10 minutes and then restart the automation service again.
I get my new power supply Thursday at which point I'll mount everything and post a new pic.
I shouldnt be using GPIO 7 and 8 for outputs. Its a chicken coop. I'll write a startup script that changes their mode to out at start up.