Chickens roam around the yard during the day, they instinctively go to bed in the chicken coop at night. After sunrise they come back out again. Rinse & repeat. The coop door needs to be closed every night to avoid possums from eating the chickens’ food and the foxes from eating the chickens. Some nights I forget to close the door, this is really bad. Automating the opening/closing of the chicken coop door will solve the problem.


  1. Device mounted inside chicken coop (Arduino and RasPi) will connect to the internet and know what time to open and close the door.
  2. Mechanical arm (servo) on the device (Arduino + RasPi) opens and closes the door at the right times.
  3. This device (RasPi) talks to a web server (CentOS Linux on local network), giving it status information and waiting for commands.
  4. Home owner connects to the web server to monitor status of the door (and when it is going to open/close), and can also send a command to control the door.

This is the first part of the 3 part Coopener (Chicken Coop Door Opener) series.
Click here for part 2
Click here for part 3

Welcome to the Coopener (Chicken Coop Opener)

wSJv8oY - Imgur

Initially I made a simple Arduino-based mechanism to open and close the door on specific times of the day.
This was just a stop-gap solution made to prevent me from pulling my hair out in the short term. It isn’t too reliable because sunrise/sunset occurs at different times of the day throughout the year.

A long term solution would be to grab all the sunrise/sunset times for a few years from the internet and hardcode it in to the Arduino. A better idea is to have a smart IoT device which grabs the information in real-time and updates its status to a centralised server. Also, being able to manually control the door remotely would be nice.

Something like this (click to enlarge):
Data flow

Building it this way will give me a great framework which I can reuse in multiple other smart automation tasks around the house. The flexibility comes in the fact that we can have a Linux computer for most of the software tasks including network access, and an Arduino for interfacing with sensors and the real world.
To me, this is the cheapest and most versatile Internet of Things machine we can build.

Luckily for me, I have built several embedded and IoT machines for various companies in the past and much of the code can be reused. Unfortunately, I have signed contracts which won’t allow me to share this code, but the important parts I will likely re-write so that it can be uploaded to my GitHub.

This project is continued in part 2

[Update 6 September, 2016]
Part 2 of this project, including the Arduino circuit diagram is found here

[Update 30 August, 2016]
This project is actively being developed and built, the blog post will be updated as milestones are met. Subscribe to keep up to date with progress.