DIY Smart Chicken Door with Raspberry Pi

After struggling with a complicated Z-Wave setup, I decided to switch to Raspberry Pi for a cleaner solution. I wanted to automate my chicken coop door, opening at sunrise and closing after sunset. Here’s how I did it!

Components Used

  • Raspberry Pi Zero: Compact and affordable, connects to Smartthings via Wi-Fi.
  • RasPiRobot Board V3: Controls the linear actuator and powers the Pi from a 12V input.
  • DS18B20 Temperature Sensor: Monitors coop temperature.
  • 12-inch Linear Actuator: Slow-moving but reliable, my hens even avoid it when they hear it!
  • 20W Solar Panel and Controller: Keeps everything powered sustainably.
  • 12V 8Ah Battery: Ensures continuous operation.

Setup Process

  1. Motor Control: Used code from Mag Pi issue 43 to control the motor. Added a cron job to restart the script every 30 minutes for reliability.
  2. Smartthings Integration: Connected via WebIOPi and the Virtual Pi Relay. Temperature sensor integration was a bit tricky but worked out using advice from the community.
  3. Solar Power: The solar panel charges the battery, which powers the Pi and motor seamlessly.

Future Plans

  • Add a reed switch and LED indicator for door status.
  • Install a coop camera and laser tripwire for added security.
  • Create a dedicated website and Smartthings app for all coop sensors and controls.

This project has been a fantastic learning experience and a joy to use. The Pi has been rock-solid for six months, and my chickens are happier with their automated door! :chicken::sparkles: