Last Autumn, I began the process of building a chicken coop and chicken run for about 4 chickens. One of the biggest concerns for me was making sure that the door to the coop is secure at night. There are plenty of expensive automatic coop doors available online, but I was more intent on building my own door because ... uh... well.... I like to build things.
Enough jibber jabber, let's get to it!
Mounting the motor
For opening and closing the door, I am using a 12 volt automobile antenna. My original plan was to make the door open vertically, but after a few tests, I opted for a horizontal sliding door design.
In the vertical orientation, is was common for the door weight to make the gears jump in the motor and then the door would come crashing down. I want a door, not a guillotine!.
Push/Pull Mount for the antenna
Much like the mounting brackets for the motor itself, the antenna is connected to the door using plumber's tape. Yea, it looks rather janky, but it is solid and it works.
Opened and Closed
On the top left and right of the sliding door, are magnetic switches that are used to register when the door is finished opening or closing.
A bar of soap was rubbed in the channels where the door will slide, in order to make for a smooth operation.
There is a gap in the door track (visible in the bottom left). As the chickens go in and out of the coop, the track will accumulate straw and droppings that may cause problems with closing the door all the way. By leaving a gap in the track, accumulated gunk will get pushed out of the way when the door closes.
Making A Case For The Controller
The coop door is controlled by a BeagleBone Black running Debian Linux.
Gather some supplies
- a ceiling lamp for the recycling center
- some j-b weld
- a beaglebone black
- a DPDT 12 v relay
- a 2 channel relay controllable via IO pins on the BeagleBone.
- some of those stand-off thingies I like so much
TAKE IT APART!
Sadly, this is the only part of this build where I get to take something apart.
All of the electronic internals were removed from the lamp.
Weld things in place
The relays and beaglebone black were mounted to stand-offs and then j-b welded in place.
The hole in the bottom of the lamp base will be used for routing wires and cables.
Route some wires.
There are 5 wires coming from the coop door that need to be routed into the shed where the controller will be mounted. One wire for each of the magnetic switches, the common ground for the switches, and two wires for the motor.
Here is the 'lamp' with the cover in place. Originally, I had hoped that I could use a USB WiFi adapter for the BeagleBone to access the network but the distance was too great. Instead, I configured a spare router running DD-WRT to act as a repeater bridge and the BeagleBone was networked to the repeater.
A 12v 6a power adapter was wired to the relays in order to send 12 volts of power to the antenna.
Platform and ramp
After the door was finished, a platform and ramp to the chicken run was added to the coop.
Now it is time to get some birdies! bok bok bok!
Why did I use GNU Linux when I could have used a microcontroller with a light sensor to control the door?
I used Linux as the basis for my door because I wanted to use skills and tools that I already know, and I like having choice when it comes to programming languages used in my projects... and the light sensor doors are all fine and dandy until those sneaky no-good raccoons get their hands on a flashlight!
Now quit reading, and go make something.
See also: http://www.jezra.net/blog/The_magic_starts_at_330AM_a_coop_story to see how the coop gets open and close times from the interwebs