The Automagical Chicken Coop

What?? An automated Chicken Coop

Similar projects worth following
The Automated Chicken Coop will have three primary, initial, objectives:
1. Open and Close the coop door, the door must be open 14 hours a day and any time it is open outside of sunlight must be pre dawn.
2. Turn on the lights when the door opens and turn them off after sunrise
3. Monitor Temperature in the Coop

The Coop Controller has three additional senor inputs and 5 additional outputs that are currently unassigned. Eventually I may add heaters, water heaters and Camera triggers to the outputs. I may also add weight sensors in the nest boxes to detect eggs and/or egg laying.

I will also be adding a new power supply with battery backup and 5 volt power regulator for the Pi. The power supply also has a trigger to notify of mains outages and I will add a script to override the door schedule and open the door if power goes out.

There will of course be a Web app to monitor and control the coop manually but the objective here is to automate everything.

View all 11 components

  • Power Supplies Installed!

    Ansen Labardee09/24/2015 at 22:12 0 comments

    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.

  • New power supply Thursday

    Ansen Labardee09/23/2015 at 04:11 0 comments

    I get my new power supply Thursday at which point I'll mount everything and post a new pic.

  • I Know, I know

    Ansen Labardee09/23/2015 at 04:10 0 comments

    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.

View all 3 project logs

  • 1
    Step 1


View all instructions

Enjoy this project?



mark wrote 09/23/2015 at 20:13 point

Do you have limit switches to detect the door status? I used an old window mechanism for a car on our chicken coop, with a top & bottom microswitch. It had a time limit for the motor to run in case something went wrong (it did, frequently). I really must get round to getting an Rpi fitted instead of the Arduino.

  Are you sure? yes | no

Ansen Labardee wrote 09/23/2015 at 22:16 point

There are limit switches built into the actuator, but they do not give any external feed back. The switches simply shut off the motor when the actuator  has reached its limits. Which is helpful since its easier to code always on than run once. I do have plans to put in reed switches in to detect open/close failures. I love the power of the Pi in such a small form factor.

  Are you sure? yes | no

zakqwy wrote 09/23/2015 at 14:10 point

That's a pretty serious actuator! Any concerns with squishing absent-minded chickens, or is it too slow for that?

  Are you sure? yes | no

Ansen Labardee wrote 09/24/2015 at 01:54 point

It is! I live in Minnesota so Ice clogging the door may be a problem, I wanted an actuator that would be able to break through any ice in the track. I've thought adding a light barrier  to ensure that a hen doesn't prematurely become chicken dinner. Alas, I think that the senor would catch far too many false positives (chickens are dusty, messy animals). The door closes very slowly at the rated 24 volts; it closes and opens in about 60 seconds.

  Are you sure? yes | no

zakqwy wrote 09/24/2015 at 13:42 point


Yeah, I took a look at the actuator spec and it says something like 5-6 mm/sec. Seems totally reasonable. Is this your first MN winter w/ chickens? It's something my wife and I have been considering, but we haven't quite gotten that far..

  Are you sure? yes | no

Ansen Labardee wrote 09/24/2015 at 21:40 point

LOL, Corcoran!

It is our first winter with them yes, they were born late winter last year and did not come out until the spring. They are well worth the effort theres nothing like fresh eggs! We have 14 and they started laying about a month ago we get 5-8 eggs a day as of now, in a month or so we expect 12-14 per day.

  Are you sure? yes | no

Does this project spark your interest?

Become a member to follow this project and never miss any updates