After years of tinkering, I’m thrilled to share my latest project—a solar-powered Raspberry Pi-controlled chicken door. This build is an evolution from my earlier Z-Wave attempt, which, while functional, was a messy jumble of wires. The switch to Raspberry Pi not only streamlined the setup but also opened up new possibilities for automation and integration with SmartThings.
Components and Setup
Here’s what I used:
- Raspberry Pi Zero: Compact and cost-effective, it connects seamlessly to SmartThings via WiFi.
- RasPiRobot Board V3: Handles the linear actuator and powers the Pi from a 12V input.
- DS18B20 Temperature Sensor: Monitors the coop’s temperature, adding an extra layer of environmental control.
- 12-inch Linear Actuator: Slow and steady, it ensures the door operates quietly, though my chickens still give it a wide berth!
- 20W Solar Panel and Controller: Powers the system cleanly, with a 12V 8Ah battery as backup.
The Process
I started with code from Mag Pi issue 43, tweaking it to fit my needs. WebIOPi and the Virtual Pi Relay from the community were invaluable for connecting everything to SmartThings. While getting the temperature sensor working was a bit of a hurdle, @paulc2’s guide was a lifesaver. A cron job now ensures the script runs smoothly, no restarts needed!
Results and Future Plans
The system has been rock-solid for six months now. The door opens at sunrise and closes 20 minutes after sunset, with the solar setup keeping everything running smoothly. Next on the list? Adding a reed switch and LED indicator so I can monitor the door’s status from indoors. Long-term, I’d love to create a dedicated SmartThings app for all coop sensors, but that’s a project for another day!
This project has been a fantastic learning experience, blending hardware and software in a way that’s both practical and endlessly satisfying. Huge thanks to the community for all the support and resources—I couldn’t have done it without you!