Automated Chicken Coop Door




Introduction: Automated Chicken Coop Door

About: Hey! We're Yasmine, Simon, Blaze, Nick, and Ben. We made a bunch of little guides for our engineering senior design project that we decided to share with you. Our aim is to encourage upcycling/recycling, hom...

Automatic doors in Chicken Coops are a solution to nighttime predators such as raccoons, possums, and feral cats! A typical automatic door, however, costs over $200 on Amazon (Automatic Chicken Coop Door) and is prohibitively expensive to many small-scale chicken owners. To create this project, some background with Arduino is necessary. See these Arduino Tutorials for an introduction if you have never worked with Arduino. This guide was created in parallel with guides linked below to create an automated, upcycled chicken coop. As such, it's assumed that your coop will have a similar layout as well as a 12V power supply/solar panels capable of outputting up to 10 Amps.

Finally, we do not take responsibility for any harm/injury that befalls you on this perilous guide to DIYstruction!

Step 1: Tools You Will Need

Soldering Iron

Small Phillips Screwdriver

Wire Strippers

Drill and drill bits

Step 2: Choosing Your Materials

Most of the materials in this guide can be sourced from various waste streams, however, here are some components that you will likely have to purchase.

Purchased Materials:

Note: If you are able to pull the relays from a car vehicle you only need 2

We sourced the rest of the materials by going to our local pick n' pull or junkyard. If you aren't able or don't have the time to find the materials you can purchase them online.

Upcycled Materials:

We found ours at the local pick n'pull. A quick google search will turn up locations near you. Also, Youtube has videos to disassemble car doors on most models!

You can scrap these from the same vehicle (above).

These can be pulled out of an old dresser

This plywood will act as the door. Any square foot board or metal sheet will do!

Step 3: Circuit Construction

It is easier to connect the 5V, 12V, and ground nodes in the figure using wire nuts from Step 2. Here's a helpful video on How to Use Wire Nuts Properly.

In the first figure, the 12V connections can either come from a 12V motorcycle/car battery or some other 12V power source. Whatever power source you decide to use, make sure it is capable of delivering up to 10Amps as the startup current for the inductive motor can be quite large. It may also be helpful to set a 10A fuse in line with the power source to protect the rest of the electronics from potential shorting.

Solder Snap-Action Switches

This next step requires some soldering. Here is a helpful video on Soldering a Switch. Since the snap-action switches are going to be placed at the top and bottom of door travel, make sure that you cut enough wire to run from that position to where your Arduino will be in the coop. Solder one wire to the Normally Open (NO) terminal and wrap it in electrical tape or shrink wrap (the other end will attach to the 5V source). Solder another wire to the common terminal (C) and wrap it in electrical tape, also. The procedure for the top and the bottom switches are the same, however, the common pin on the snap-switch at the top of the door attaches to A8 on the Arduino whereas the common pin on the bottom snap-switch attaches to A14 on the Arduino (see wiring diagram).

Wiring the Clock and L-298 H-Bridge

Use the male/female wires to wire the clock and h-bridge to the Arduino (see wiring diagram).

Wiring the Relays

The relays from Step 2 come with a wiring harness that can be pushed onto the pins on the relay. If you are using a different single pole double throw relay, the third figure above may be helpful to you.

Wire terminals 85 and 86 on the relays to the output pins of the L298 H-Bridge by screwing them into the board (Polarity doesn't matter)

Connect the center pin (87A) to the ground node (wire nut).

Connect pin 87 to the +12V node.

Finally, make sure any exposed wire is insulated with electrical tape around all loose connections!

Step 4: Uploading Code to the Arduino

Download Arduino Ide

First, download the Arduino IDE for your operating system here: Arduino IDE

Download Arduino Code

Automatic Chicken Coop Door with Solenoid

The solenoid is an optional attachment in this project. To see how the solenoid circuit is set up, visit our automatic misting instructable!

Import the Libraries

There are 4 libraries you will need to import for this project.

Timelord, DS3231, OneWire, and DallasTemperature

Here is a helpful video on Library Installation should you need it.

Changing the Code

The only sections of code you need to change are highlighted in the figures given.

The first section is the latitude and longitude. Update these to match the geographic location of your chicken coop (you can find these by hovering over a point in google maps).

Next, update the timezone to match your own. Here's a helpful link to figure our your UTC Timezone.

Finally, update the setTime and setDate lines in the Arduino code.

i.e. rtc.setTime(Hour, Minute, Second)

rtc.setDate(Day, Month, Year)

Step 5: Installing Hardware

1. Drill a hole in the top of your chicken coop door and attach a string.

make sure it's level by hanging the string. If it's tilted too much in any direction, make a new hole closer to the side that is hanging lower.

2.Install the Chicken Coop Door with slides

3. Mount the motor above the door in line with the string (make sure you have enough clearance for the door to open completely.

4. Install the snap-action switches at the top and bottom of the door

We drilled two holes lined up with the holes on the switches and secured them with zip ties.

Slide the door up and down the track and make sure that the switches are pressed. If not, you may need to add some sort of spacer. We drilled some holes in plastic that was lying around and thread the zip ties through those.

4. Create a shelf for the electronics

Make sure it's out of reach of the chickens

5. Place all electronics in a waterproof container (we used a clear Tupperware container and drilled a hole in the side for the wires).

6. Ensure your electronics are peck-proof. We accomplished this by adding a hinged box around the battery, and installing barriers in front of snap-action switches to make them harder to peck.



    • Creative Misuse Contest

      Creative Misuse Contest
    • Metalworking Contest

      Metalworking Contest
    • Water Contest

      Water Contest

    2 Discussions

    After importing the appropriate libraries I'm getting an error when trying to find the hardware/avr/HW_AVR_defines.h file. Can anyone shed some light on how to fix this?

    Arduino: 1.8.0 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

    In file included from C:\Users\Chad\Desktop\ChickenCoop-master\SolenoidDoor\SolenoidDoor.ino:2:0:

    C:\Users\Chad\Documents\Arduino\libraries\ChickenCoop-master/DS3231.h:27:42: fatal error: hardware/avr/HW_AVR_defines.h: No such file or directory

    #include "hardware/avr/HW_AVR_defines.h"


    compilation terminated.

    exit status 1

    Error compiling for board Arduino/Genuino Mega or Mega 2560.

    This report would have more information with

    "Show verbose output during compilation"

    option enabled in File -> Preferences.

    Know why a chicken coop has two doors? Because if it had four doors it would be a chicken sedan.