Introduction: Arduino Chicken Coop Controller

Picture of Arduino Chicken Coop Controller

Over the last few years my family has been keeping ex-battery hens - they are about 18 months old and have lived their entire lives within a caged environment. As much as we love these little bundles of joys and eggs it can be a drudge getting up in the early morning letting them out to roam the garden because the sun is up and bright at 5.00am!!

It would be great if we could have an automated door that could open just after sun rise and close half an hour after sunset where hopefully they are all cosying up to each other in the coop. Sadly there have been times we have forgotten to lock them safely away and discover the horrible consequences when a fox has attacked and killed some of them.

This instructable brings together a number of ideas I have seen on the web to create an Arduino Chicken Coop Controller (ACCC) to automate a chicken coop door and where possible I will give direct credit to those people designs/code I have adapted to create this personal sleep saving device. Many thanks to those who have shared their great ideas which has spawned this device.

The main features of the ACCC:

  • Based on the Arduino architecture for easy prototyping and adaptation to your coop requirements
  • Uses common parts easily found at you local DIY/hardware store/shop such as cheap electric screw drivers
  • Uses a real time clock to maintain time even when the device is temporary disconnected from power
  • Adjusts the opening and closing times of the door according to the current month - you can set it to your own timezones
  • Provides a manual override just in case one of your lovely darlings misses sunset!
  • Provides a min and max temperature reading inside the coop from midnight so you can keep an eye on your brood's welll-being
  • A display which can be switched on and off to read out the current ACCC status and will not disturb your feathered friends sleep at night

Most of the electronic components were sourced from eBay and I estimate the whole device excluding the wood was under £30

Step 1: Building the Door

Picture of Building the Door
The door is based around a design by Clint Fisher which I discovered on YouTube.  This is a brilliant design as it actually locks in your precious darlings regardless how scrupulous the local fox or other vermin are in trying to prise open the door.   You could use a simpler design of just a sliding up and down sheet of ply.  It is up to you on how complicated you want the door - just don't make it out of solid steel as the motor will struggle to lift it.

Clint  didn't actually provide the plans on his YouTube link so I set about to recreate them and I have attached a PDF file which you can scale to your needs.  I hope from the series of pictures and my video file you can see how the door assembles and works.


Some pointers:
  • I would advise using the acrylic sheet facing plate rather than plywood as it provides a frictionless face for the pieces to move freely
  • You really need to see it moving to make sure it works freely and you know where to make any tweaks
  • It really looks cool and you should show off your handy work
Most of the pieces can be cut from 3/8" (10mm) ply using standard tools such as cooping saw, jig saw or a small band saw if you are fortunate to have one.  I have included the plans and templates.  If you print them on A4 paper the door levers and round are to scale.  You can always use a PC print driver scaling function to make sure they come out as the correct size.

Use brass screws/stainless steel bolts where possible and treat the ply with a suitable wood preserve - I wouldn't use a vanish as this might over time cause the workings to foul.  When fixing the perspex cover use brass screw cups to spread the load and will hopefully stop the cover from shattering.

I found loosely fitting the door lock levers ensured they worked even if they were damp from the outside weather.  I made two doors to test.  One has been in manual use to see how it would stand the damp and cold english weather - which it did!  So hats off to you Clint it is a very practical design.

I have taken loads of pictures so you can see from all angles the design and how it is constructed and assembled.  I haven't commented on every picture as I think it is reasonably self explanatory - well I hope!

Step 2: Motor Assembly

Picture of Motor Assembly
I have seen many people do some extraordinary things with electric drills and screw drivers as kinetic power sources and wondered if I could go one step further to make them less bulky when incorporating them into the door assembly.

I wanted to source a motor and gear assembly that was under £10-15 which isn't easy.  I came across a cheap electric screw driver for less than £6 and when I stripped it discovered I had all the components I needed.  Including a:
  • 3.5v-4.5v Motor which could be hot wired to a chunky 6v battery
  • planetary plastic gear box which was going to provide enough torc to raise the plywood door
  • chuck and screw driver bit to attached a wooden real pulling the door opening cord
  • rechargeable battery pack to test the door assembly
  • plug transformer to trickle charge the motor battery - eventually substituted it for a 9 volt plug PSU so I could trickle charge the 6 volt lead acid battery and the 5 volt arduino regulator.
I am sure most DIY stores have similar ranges of value priced tools that make great sources for strong, robust and cheap motor assemblies.

I mounted my motor on some formed wooden support pieces and left plenty of space for the motor controller and regulators.  I housed the motor assembly so no moving parts would be pecked by my feathered friends - my coop isn't a tall shed.  The pulley is an old wooden cotton real but any real would suffice - make sure you can drill a hole through it for the chord.  As the real would only be moving for a few seconds up and down I didn't go overboard on bearings and tried to keep things simple.  

I attached the real to the motor via a screw bit and some very strong double bubble glue- it goes rock hard when cured.  

Step 3: Testing the Door

Picture of Testing the Door
Do use the battery pack to test the up and down movement and that everything is working fine without binding the gearbox or motor.  I only used 2.4 volts (2 batteries) so the movement was slow enough for you to see.  When you use 6 volts it certainly opens a lot quicker!!

I am sure there are better ways to mount everything but I must say the assembly has been working now for over 3 months and seems to be holding up well.

Step 4: Power - Arduino, Motor and Battery

Picture of Power - Arduino, Motor and Battery
The original intention was to use the RK Education Technology Solutions RK L298 H-bridge board. This little board can deliver 2A per channel - it is a 2 channel H-Bridge.  It also has a handy 5V regulator which can be powered off the same battery as the DC motor.

In testing I found that the motor was producing far too much noise and was severely affecting the arduino through its regulated supply.  Fortunately the PCB is designed in such a way that I could separate the regulator section and feed it directly with a 9V plug power supply which immediately resolved my noise issues.  I have also read elsewhere folks not recommending using the same battery for the motor and arduino.

Again this H-Bridge could be scratch built or bought as an arduino shield but do make sure the power output cables are robust enough to take the high current.  I wanted to keep the heavy current unregulated circuits away from the arduino so this is why I went for this option.  It is all nicely tucked behind an airy box which hides the sealed lead acid battery.

I sourced a simple and intelligent trickle charge circuit to keep the 6V battery topped up. This I managed to mount all the components on a small square of vero board.  The preset pot needs to be set to provide 7.2V on the charger output (no battery attached) and will charge the battery up to 0.5A which is usually the maximum charge manufacturers recommend for 6V batteries.  The motor can withstand short burst of 6-7V and in fact really helps when pulling up the door assembly.

All regulators and power amps I placed heat sinks on as the:
  • H-Bridge does get warm when lifting up the door as it takes a whooping 2.5A for 3-4 seconds.  I could use both channels together to provide 4A capacity but the current is only for short bursts and within the manufactures specs
  • 5V regulator on the RKL298 board does get warm when the arduino display LCD light is on for viewing ACCC status
  • LM137T can get warm if for any reason the 6V battery has been drained - max output is 0.5A
As you can see in the picture I used ribbon cable and IDC hoods to connect the arduino to the motor controller and the 5V regulator to the arduino. The trickle charger is connected to the H-Bridge power input using the same terminals to connect the battery.  A diode in series from the trickle charger stops any nasty back EMF affecting the trickle charge circuitry and draining the battery.

Step 5: Building the Arduino Electronics

Picture of Building the Arduino Electronics
For those of you who are confident with a soldering iron this is a relatively straight forward task.  I have attached a full circuit diagram of the main Arduino electronics.  I basically scratch built my main Arduino board except for keypad LCD shield - you can't beat them on price and quality

You can short circuit the work involved by choosing some excellent Arduino prototyping boards which provides RTC and connectors for probes.  Do check out eBay or other distributors.  The basic digital electronics needs to provide:
  • Ardunio processor board based on either Atmega328P or Atmega168 (£7-£10)
  • Real Time Clock based on the DS1302 or equivalent (£4)
  • Onewire digital thermal DS18B20 temp probe (£4)
  • Keypad Shield 4Bit 1602 LCD Module Display with an ISP header for programming using the Arduino IDE ver1.0 (£5)
  • A couple of pull-up resistors and micro switches for door sensors, IDC connectors and ribbon cable (£2)

Step 6: Testing the Logic

Picture of Testing the Logic

Before running the full code it is worth testing the microswitches by moving the door up and down with the spare battery you have left over from the dismantled screw driver.  Stick an AVO meter across the mirco-switch cable and check you get continuity about 20 mm from hitting the bottom or the top.

The code has some natural latency so by the time it stops the motor the door will be well and truly fully up or down! Once you are happy the micros switches working fine and in place do put an additional screw through the perspex holder to stop any future movement.

I found that producing a simple wooden cover for the bottom microswitch stopped the occasional failure when the door closed.  I suspect my feathered friends took a liking to the wires and connectors and also thought it was a good target for their daily movements!!

Step 7: The Code Is the Glue

Picture of The Code Is the Glue
I have included the code which hopefully read with the following notes should make it self explanatory.

I used the latest Arduino IDE 1.0 which I must say has been brilliant especially as you can now programme using the ISP programmer and not have to worry about USB dongles or circuitry.  One thing I would say you still need to burn the boot loader onto your blank ATmega328 chip otherwise debugging becomes a bit of a challenge as the Arduino environment hasn't been set up properly!!!

The code I have compiled is 8,346 bytes in size so you can use the ATmega168 chip if you have a few kicking around.


Arduino.h - the standard and very large library
DS1302.h - Real time clock library
LCD4Bit_mod.h - Library supplied to support the LCD/Keyboard - very similar to the Standard library
OneWire.h - Provides communication to the temperature probe

Pinout Allocation and Global Variables:

This is where you need to set your own sunset and sunrise depending on your location.  We have summer savings here in the UK but I decided to keep my system on GMT which means when I look at the clock in the summer saving time period it is an hour behind so the sunset and sunrise times need to be set accordingly.

  1. Sets the pinouts for the motor
  2. Sets the display back light which is switched off on reset.  
  3. The current MotorState is set to STOP
  4. The top line of the display is initialised with the status headings.  
  5. At this point we check the temperature to initialise the min/min max settings and display it. 

In the code you will notice a commented out routine 'set_time()' to set the RTC.  This should be uncommented for the first time programming so the clock can be set.  Comment it out and reprogramme the ATmega328 again this way if the board is reset or further changes to the code are made the RTC always has the correct time.

You need to experiment  on setting the RTC in sync with the laptop time.  I discovered on a Mac environment you need to allow 40 seconds for compiling and uploading to make sure the times where exactly synced.

  1. Print the current time
  2. Pause for 0.5 second so the display can be read.
  3. Print the bedtime which is in total minutes with the '^' symbol in front of it.
  4. Print the minimum temperature with the 'v' symbol in front of it.
  5. Pause for 0.5 second so the display can be read.
  6. Print the wake time which is in total minutes with the 'v' symbol in front of it.
  7. Print the maximum temperature with the '^' symbol in front of it.
  8. Pause for 0.5 second so the display can be read.
  9. Print the current time
  10. Check the door activation button (display on/off, close door or open door manually)
  11. Change the Motor State according to activation button
  12. Check to see if it is wake time if so set Motor State to DoorUp
  13. Check to see if it is bed time if so set Motor State to DoorDown
  14. While the State Motor isn't 'Stop' call door_change to either close the door or open it and display status on screen
I would suggest you familiarise yourself with the code and hopefully you can understand it enough to make your own modifications, i.e. no temp probe but a LDR instead.

As you can see from the code I have created a state motor variable which ensures actions are completed before the main loop code goes back on itself.

Step 8: Installing Into the Coop

Picture of Installing Into the Coop

I was fortunate enough to design the coop opening to take this size door and to provider two uprights to give a strong fixing see diagrams below.

Make sure the battery is nicely tucked away from the reach of the hens and the 9V input cable is securely attached to the door which is behind the motor housing.

I would reset the door and check the time is correct and the right sunset and sunrise minutes are displayed for that month.  At the time  of taking the photo's we were in March which meant the time section would display:

Actual Time           Sunset              Sunrise
 Coop                       ^Coop              vCoop
15:30                        1140                 345

Note - 1140/60 = 19:00 and 345/60 = 05:45

I left the sunrise and sunset times in mins from 12.00pm as it made a clear display distinction and was easier to translate to an opening and closing time.  I was being a little lazy!!

Step 9: What Would I Improve?

Picture of What Would I Improve?
Where do you start!  The ACCC has been operating for over 3 month now and seems to work fine - such a relief not having to get up or worry about whether our babies have been let out or locked in.

Reflecting over the build there are some improvements I will do over the next few months and no doubt publish ACCC v2.0:
  • Look at putting the arduino to sleep thus conserving power.  I tried running it on a rechargeable battery but the code was eating power at a rate of 40mA which meant it drained rechargeables overnight.  I believe I can get it down to 10mAh or less when asleep and then normal rate for the duration of opening and closing the door
  • If power can be conserved I will put a small solar panel up on the roof to trickle charge the motor and arduino batteries so it can be completely off the grid
  • I would like to add an LDR (Light Detection Resistor) to one of the spare analogue lines and combine the reading to fine tune the opening and closing times.  I wouldn't trigger the door opening or closing on light detection alone as it could be volatile to poor weather or the garden flood light as the fox enters our garden!
  • Alternatively instead of one fixed opening and closing time each month create an algorithm that takes current and next month and works out the daily increments to the times for opening and closing
  • Integrate the microswitches into the pine side rails for extra protect from nosey hens
  • Create a pair of flashing LEDs to show when the door is down.  At the moment we are still checking by going out to the garden.  It also acts as a deterrent to vermin as they don't like anything with flashing eyes
I really hope folks have enjoyed reading through this instructable and has inspired you to create something similar and no doubt better - please post your comments and suggestions so I can create a ACCC Version 2.0 soon!


itsmescotty (author)2016-04-17

NO criticism.

But why do you need to to close the door anyway. Ive been keeping 20 hens and 1 rooster for 9 months in an 8' X 8' X 8' enclosure with a man door on one side and and a 16" X 16" opening for chicken access on the other. Oh yeah, there is an 8' X 8' skylight for a roof. The chickens are free to come and go as they please and roam around.

I had a fenced in area but the goats destroyed the fence climbing in so they are no longer fenced. When it gets dark they go in and roost and when the sun comes up they go out and 'play'. Only problem with the skylight is the full moon - rooster crows at 3am., sigh.

I'm curious where you live that you've managed to keep chickens alive for 9 months with an open coop and run. I don't live near a nature reserve or in the wilderness. I'm in the suburbs of a large metropolitan area. We have coyote, fox, bobcat, raccoons, opossum, mink and weasels - not to mention hawks and owls. On almost every occasion I haven't made it home by dusk, I lose birds - sometimes whole flocks. Until I closed off every opening larger than 1/2", mink started attacking. In 5 nights I lost 5 flocks to mink. No meat eaten, just killed.

When it comes to raccoons, in retrospect I would have saved money by buying a premade auto coop door for every building. And saved a lot of rare birds in the process.

As for Robot-Chicken, I really appreciate the detailed sketches of the latching mechanism.

Typo, should have been 6 months.
I live on an island in the Pacific Northwest in a rural but becoming a suburbanized area with people buying 5-10 acre parcels around me and putting up fences to keep their animals in and deer out, sigh.
I acquired 20 chickens and a rooster late Oct., early Nov. Lost three then acquired another 3. Now I'm down to 14/1. I'm assuming the losses were due to Eagles as there is no shortage of them around here.
They would exit the roost at dawn and be back in bed by 7pm.
The deer and coons roamed all over the place 20 years ago but I haven't seen either for years, again sigh. There was a neighborhood dog that took out 4 of the ducks I was trying to raise and he hauled them off and I never found the bodies. With the chickens I've lost there was always a pile of feathers and if I found it early there was an eviscerated body otherwise just wings, head and feet.
On occasion I hear a coyote and have seen two. We have hawks, HUGE 'horned owls' and Eagles. It's total woods where I live but there is a clear cut area next door.
I'm experimenting with hatching, as of this morning I have three out of 17 eggs where the little buggers are escaping from their shells. Should be more later on in the day and over the next week as the incubator was added to over the course of a week. Started with 18 but one didn't candle after 10 days so I culled it. Brown, white and 'green' eggs - that's all I know about the chickens.
Turned an old fridge into a brooder for them to run around in until they are big enough to turn out into the 'wild'.

None taken.

Our coup is next to a nature reserve full of foxes which have in the past devastated the coop and my little ladies!! We have also put a fence around as a first line of protection.

The other reason which you eluded to is we can keep our little darlings in the dark and release them at a more sociable time for them to cluck and forage. Having hens clucking at 4 in the morning wouldn't make me popular with my neighbours who live less than 25 yards from us in either direction.

One day I was up early when a fox came over and started inspecting our chicken coop. All the chickens where inside and the door was closed so no chicken breakfast for the fox. Then Another time I had a coop that was left open all the time with a wire fence around it. One day I went out to find the a hole in the wire fence with 7 dead chickens. From that moment on the chickens got closed up at night. It is better to be safe then sorry.

I'll see you but won't raise. Been having phone and internet problems so phone guy was here last Friday morning and we were outside fiddling with the junction box. Bald eagle with at least a six foot wing span came down 20' away in front of my cab over motor home trying to get one of the chickens that had run underneath. Hank ran around one side and I, the other. Eagle left 'empty handed' this time.

Ah ha, neighbors. Good incentive for auto door. My closest neighbor is a couple hundred yards away so, no one to bother and were probly not on good terms anyway.

Chrome98 (author)2016-01-12

I've automated our coop as well using a Raspberry Pi. The system controls heat, a/c, open and close of the door, turns interior light off and on, video camera inside just for fun mostly, and texts/emails me when door opens and closes, controls auto feeder and keeps my wife and I happy!
The biggest suggestion I can make to you is to use an electric linear actuator to open and close the door. This precludes the need for any locking mechanism. This is the 16" actuator I use:

fabelizer (author)2015-09-24

Following up...3 years later...We started with 12 peeps, sold 4, 4 gone to predation (the risk of letting them run free). Arduino based Uno R3 running continuously all 3 years!

Now returned to door design for the next batch next spring. I modified some code from Roger Reed. My controller takes care of lighting, power ventilation in summer, shared with water heater for winter. (inverted flower pot with light inside). RTC will remain as a system clock. It also has a separate egg box light that flashes should the egg box be left open. One indoor temp sensor (no display :( (yet!)), but still actively in control!

Hope to add 2 more temp sensors and an indoor remote controller over rf this here, time not. The implementation of all features desired will require a mega 2560, and I am considering off loading door control to a subsystem for modularity. Light is currently relay controlled AC CFL, and will be replaced with LED pwm, filtered to remove flicker, and fading up/down to improv asthetics for the girls. Door will have a servo lock as I did not like the mechanical solution for the added weight. Locking will be verified by status LED, as will door position.

An addition I really like (for anyone considering a smlilar project) is an LED flashing a heartbeat. It is visible from the house, dims at night based on a light sensor, and provides reassurance that all is well, without being over bearing at night. It provided great feedback during the -20F temps last winter to know the system was surving and operating normally! (I was delighted the UNO clone kept on chugging through the 2+ weeks of sub 0 temps!)

Many thanks for your continued inspiration! Where is V2.0?



Altoidian (author)2015-08-05

What an excellent instructable! When I first looked and saw the wooden door and the banged on latches, and rather odd looking elevator mechanism. I was a bit skeptical. But, you have thoroughly impressed me with your very well thought out design and the code is absolutely fabulous. Are you sure you want to keep raisng chickens with your time or go into product design and code development? (kidding...of course you seem totally happy doing what you do). I just wanted to thank you for a delighful experience in learning and say you have helped me with my little project quite nicely. I've gotten some very nice new ideas (for me) from your project. Thank you.

JB from Las Vegas, Nevada

Robot-Chicken (author)Altoidian2015-08-06

Many thanks JB for the comments

I originally was a modem product introduction engineer when I first left University and also a digital signal processor coder. So I kind of gone full circle! I am also a master class lecturer for The Royal Institution (of Faraday fame) so hopefully encouraging kids to enjoy building and programming Arduinos. A few of your countrymen have also built the coop controller adding their tweaks.

CarlC3 (author)2015-03-17

Is there a way to make a servo with a timer used to pull a door open at
sunrise and let it slide down at sunset automatically everyday? It's for
a chicken coop. That's a good idea for sunrise and sunset, but what if I want a timer so
I can adjust the opening and closing at times I choose? Letting the
door open too early is not good because my neighbors are asleep and the
chickens will wake them up. I would ideally like to adjust the time of
opening 1-2 hours after sunset.

Robot-Chicken (author)CarlC32015-04-27

It would need to be a large servo as the door is quite heavy.

I set my time to open the door for around 6.30 in the summer so as to give my neighbours a lay-in but you need to make sure your coop is sealed from the light. You can adjust the time within the program or the menu

Kent_In_KC (author)2015-01-07

It amazes me what people can do. I too am a small time chicken rancher and have also wanted a way to open and close the coop automatically. ALso, there is a need to automate watering. Unfortunately, I know nothing about Arduino.

My rough concept is to use water trickling into an empty bucket on a lever (with the door on the other end of the lever) as a weight to eventually, gradually, open the door, which would ultimately tip the bucket into a water trough for the chickens to drink and close the door. Then the bucket would spring back up, right itself and begin filling again. Each fill/dump-open-close cycle would need to take about 12 hours.

I have not prototyped it yet. I do prefer simple machines that don't require a computer to operate. But, that's just me.

Robot-Chicken (author)Kent_In_KC2015-01-23

I am also interested in Automatas and you idea would be brilliant to see in operation all powered by water. Outside temp may be an issue hear as it went below -10oC here in the last month

sethm603 (author)2014-04-15

Hi love the build. Do you think it could be done with a photo cell to trigger open and close instead of the timer ? That would be an ideal setup in my opinion.

iyusnita (author)2014-03-11

Hi may i know all the components used in this project?

RentonZ (author)2013-09-02

Great instructable! I'm just finishing my coop and will be giving this door and controller design a go.

With the experience you've gained, which arduino board and shield(s) would you suggest I use? I'm not very good at soldering so I'll be looking at constructed components when available.


Robot-Chicken (author)RentonZ2013-09-03

Hi I am probably about a month away from publishing ver2 which uses a rotary switch and a 4 x 20 LED screen. All the components are modules except for the Arduino board which is a modified prototype board - which you could use an Uno v3 if you don't fancy any soldering. I have attached a some of images to show you the new hardware layout and screen. As such I didn't use shields just discrete modules with interconnect wires which you can do with the ver1 design.

Any motor module that can deliver 2-3amps usually has an LM298n chip with the 2 channels linked together will do. There are some very cheap 1302 RTC modules with battery holder. I used a cheap 20x4 LCD in 4bit mode with the standard crystal LCD library. There are some shields to fit the UNO with integrated analogue keyboard and screen you can use. Hope that helps

totof60 (author)Robot-Chicken2014-01-16

very good job .

your project let start me learning arduino.

we wait for v2


RentonZ (author)Robot-Chicken2013-09-03

Thanks for that, I'll look forward to seeing your v2!

Nate Cougill (author)2013-10-09

Wow. I just love this idea! Great execution.

ackman21 (author)2013-08-24

So how much would you charge for one to be built and sent to the US??

Robot-Chicken (author)ackman212013-09-03

Honoured that you would buy it from me but unfortunately I just don't have the time. There are at least 3 folks in the US who have built it so perhaps they might be able to help you without putting them under too much pressure!! I suspect it will be a lot cheaper as well - happy persuading!

ianmi (author)2013-06-25

Love it!! But how does the door stay open, is the motor engergised all the time the door is open? if so why the top micro switch?

Robot-Chicken (author)ianmi2013-06-25

Hi glad you like it. The planetary gearbox is stiff enough to keep it open once the top limiter switch is triggered. So it only needs 2 amps of battery juice for about 1 second - very efficient

Orngrimm (author)2013-05-24

That lock is really smart! And well made 'ible!

If you think about it and add a long spring to replace gravity, you can use that idea even in horizontal direction for other projects...

Robot-Chicken (author)Orngrimm2013-05-25

Well I can't take credit for the design - only the reverse engineering of it. I like the idea of the spring. I have another follower who is in the process of making his own. Really looking forward to seeing how he has improved the design - I think he is using draw runners for a smoother action.

Scheffield (author)2012-12-10

i built a 10x10 shed for my two geese. i really like your plans, i am going to use them with some modification.. it will have a steel plated door because i live in the middle of the woods and foxes and other such animals are common. to heat my coop i have a forced air propane heater. the unit is also a a/c so in the summer the vents are blowing nice cool air. all the walls and doors are insulated, do you have a suggestion for insulating the automated door?
as a final comment i would like to thank you for caring for the ex-battery chickens. in a unrealted way: one of my geese broke is femer (which is inside its body, not accessiable by topical cast) so i went to the only place i know crazy enough to do sugery of a pet goose (cornell universty vet hospital) it cost me close to $2000 in medical bills, and a entire summer vacation inside caring for it.

VelzevulGR (author)2012-11-17

Hello R C,

I need first of all to congratulate you for this great design and implementation!

I've been planning for some time to implement for my own coop an automatic door but with the use of an LDR (we have no lights where the coop is), so now that I found this I will certainly start building it!

As I have almost no knowledge of electronics, just good soldering skills and good "follow instructions" skills I have probably a couple of rather "dumb" questions (English is not my native language so you may have already answered this in your instructable and I just didn't get it!).

Is the output of the trickle charger connected on the power input of the H-Bridge? Is the battery connected in the same power input of the H-Bridge?

Does everything work with the main power supply and charge the battery at the same time and when the main power fails the battery kicks in?

Thank you very much and once again thumbs up!!!



mdavenport3 (author)2012-09-25

Hi R C,

Firstly, a great instructable - I'll definately be basing my set up o it in the spring.

One suggestion That would be good is some form of timed switch to trigger an LED light in the coop that would increase the light-hours - to ensure decent egg production in the darker winter months. NOT on a battery level!!! But I've read it can be better for the chickens to have a minimum of about 11hours light a day.

I'm not an electronic/programming buff, so there's every chance it may not be possible, but would be good if it was.

I look forward to version 2. Any ideas when it will be ready?



Firstly many thanks to those who have given me some great feedback and have built their own chicken coop controller.

I am currently working on version 2 which has:
- a visual indication the door has closed successfully,
- ability to turn on a low power heat lamp when the temperature drops too low
- Improved display and time setting
- those who would like to keep the lights on for a little while to keep their egg production up. Chickens normally needs10 hours of light to produce a single egg

It is likely to be a couple of months so watch this space. Further improvements for my fine feathered friends serious or funny are greatly welcomed - R-C

jmaahs1 (author)2012-08-31

Thank you for a great Instructable! The door instructions and measurements really helped me build my own.

I decided to use a remote control to open/close the door from the house. This way I could make sure no predators were around first. If you wish check out the short video -

Again, thank you for a great Instructable. :)

Wazzupdoc (author)2012-04-13

Also Chicken lover. Nice project. Very clever all round. Three thumbs up!!!

MichaelAtOz (author)2012-04-08

Nice job, !! <- two thumbs up.

From that last photo, one improvement that the hens would like is to add a heated towel rail for their roost ;)

lford4 (author)MichaelAtOz2012-04-09

Don't for get the heated floors too :) A 30+ meters of insulated wire and the 12v power source and these guys will be loving it.

That is so funny - it is almost true. The reason for the temp measurement was to turn on an infra red lamp to warm them up if it gets too cold!!

Version 3.0 will be the automated turn the straw down before they go to bed!!

lford4 (author)2012-04-09

" I wouldn't trigger the door opening or closing on light detection alone as it could be volatile to poor weather or the garden flood light as the fox enters our garden!"

I was thinking that you could skip the arduino and go just with a photodiode and a few mosfets, but that is a good point. The fox walks near the security light, the light goes on, the door opens, and the fox gets a snack.

All around great instructable. Lots of good details..

Perhaps there is a photodiode out there that senses a wave of light that isn't emiited by the flood light but is still emitted on days with alot of overcast, maybe UVB light around 350nm. Then a temp sensor to control the heat lamp.

MartyMart (author)2012-04-09

Well done Robot-Chicken! Nice to see you giving those hens a better life. And I will be taking some aspects of your door design!

Robot-Chicken (author)MartyMart2012-04-09

Feel free - using any aspect of the design would be the greatest form of recognition - have fun with it

hsteinbe (author)2012-04-09

chickens create tons of dander (skin and feather dust) that coats everything, make sure all electronics and working parts are protected. Otherwise your door is going to gum up in short order. Also wood swells when damp, which means in the high humidity of summer, rainy springs and falls, depending on where you live, the door may jam. Especially when you mix the water with the chicken dander! Make sure there is plenty of free space in the slide mechanism. And, either build a sufficient overhang to keep the door completely dry, and/or better, yet prime and paint all of your wood pieces.

Roosters (plural) make a heck of a lot of noise. They have to compete with each other. A rooster (singular) makes less noise then a bunch of hens.

I've been raising free range (no fencing), chickens in a wooded area (and in the past in an open area) for more then 30 years and only one thing works to keep chicken predators at bay - a good farm type dog.

Robot-Chicken (author)hsteinbe2012-04-09

Your are right I had to create a wooden defence mechanism against the dreaded poop. Every week the door gets a good inspection to make sure everything is in order and the wood is treated so hopefully it will last a while but know doubt will need replacing. I had the manual door fitted for 6 months during autumn and winter and it seemed to fair well.

ekardell (author)2012-04-08

Your "before" and "after' pictures of the hen says it all. Great job with the rescue. It's wonderful to see how they can recover from that experience.

The coop looks great too. I love it, but I am very lazy —

Alternatively, a very, very simple solution is what I've been experimenting with this past year – totally free range-ing my chickens (small flock with two very big and very mean roosters, that is essential to the plan). Anyway, mine have branches for roosting high (about 5') in a run-in shed, and several modes of escape in the event of four legged predators. It's working so far. Hawks are another thing though, but that's a daylight problem.

The beauty of 24/7 free range for me is of course not having to get up early.

There isn't a chicken enclosure made that some predator can't get in, alas, and the carnage when they do is heartbreaking.

Robot-Chicken (author)ekardell2012-04-09

I agree total free range is clearly best route - I live in a town so Rosters are a no-no hence the small size garden and coop - Still worth it though just for the fresh eggs

ekardell (author)Robot-Chicken2012-04-09

Well---it's not necessarily "best" the way I'm doing things. There are a ton of variables to each persons setup. I live on and surrounded by mostly open farmland, so while we do have predators, maybe not as many as someone in a wooded area. I may have just found what works well HERE, but most people go the route of shutting them in at night, and that's probably safest in 90% of the cases.

Roosters make a hellava racket :)

miguipda (author)2012-04-06


as I still did not used arduino could you please consider this idea :

to allow solar power battery charging / or directly to power DC motor (may be change the current motor you used due to the voltage).

I ask you this because my backyard is too steep I though to use solar powering with those cheap small photovoltaic panels :

Or may be given the perfect photovoltaic solar panel that must be used to get the arduino power.

Sincerely thanks for your help and have a nice day,

Miguipda ;-)

Robot-Chicken (author)miguipda2012-04-06

Hi Miguipda

I very much like the tree hugger link. I am seriously considering reviewing the design so I can light-weight components and reduce the Arduino power consumption so that everything can run off rechargeable batteries and solar power. I think I will need to invest in a high quality motor instead of being thrifty with my £5 motor assembly

mgalyean (author)Robot-Chicken2012-04-08

I'm wondering if the arduino is required at all for a simple version that merely opens the door at sunrise and drops it after sunset. A solar panel, a motor and gearbox, a photoresistor, big capacitors, and some glue components are all you'd need. But the arduino certainly allows for adding on functionality like monitoring temperature or even detecting a fox or thief disturbance should one want to so I'm not saying that it doesn't have its coolness too. The minimalist in me just went down the other path.

Robot-Chicken (author)mgalyean2012-04-08

I think you are right you can get away with something simple. The only issue I have with a photo resistor are false readings opening the door in the middle of the night. In my garden we have a PIR light which comes on even when a fox is in the garden. So I didn't really want to present Mr Fox with an opening door to a late evening lunch!! In a big open space without spot lights you are spot on - pardon the pun.

However if you stripped the design down to the bare safety levels for my little ladies then everything thing you said plus a simple pwm arduino board would surfice.

mgalyean (author)Robot-Chicken2012-04-08

Ok. I was envisioning no batteries or external power and the actual presence of sunlight on the photovoltaic would power the motor to open the door. In the middle of the night there would be no power for the motor to open the door. The photo resistor would just be to detect darkness and trigger a solenoid to drop the door in the evening. The solenoid would be powered by a large capacitor charged from the panel when the sun was still up. Another capacitor combined with a resistor would be used to delay the door closing 30 minutes.

About This Instructable




Bio: I am consultant who spends his spare time dreaming up stuff and reading other people's great ideas. I have a growing family and a ... More »
More by Robot-Chicken:Chicken Coop Controller v4 Software UpdateChicken Coop Controller v2 Software UpdateArduino Chicken Coop Controller
Add instructable to: