Introduction: Automatic Chicken Door Opener With PICAXE

Picture of Automatic Chicken Door Opener With PICAXE

Using the superb PICAXE 08M2 chip I put together an automatic coop door opener (named the Cluck-O-Matic) so I did not have to get up so early in the morning to let the chickens out from their coop. This cheap chicken door opener only opens the door of their coop and the control electronics are kept in my garden shed but could just as easily be mounted on or inside the coop itself. An alarm clock is used to trigger the door opener so it is an inexpensive device that can help keep your chickens safe.

Things needed:
PICAXE 08M2 Chip (£1.80 from the PICAXE site)
08M2 Prototype board AXE021 (£2.39 from the PICAXE site)
Download cable AXE027 (£11.99 from the PICAXE site)

Soldering Iron

5 volt supply (Could be USB supply, solar panel, batteries or mains transformer)

Cheap electrical alarm clock (I purchased mine from a pound shop)

RC Servo (Can be purchased off Ebay. I would choose a larger one because it must be able to apply enough force to operate the locking system of the door.)

A lock or bolt for your chicken door that could be modified so it can be operated by a servo.

A container for the control electronics (Would have to be weather proof if kept outside, I used a seal-able lunchbox)

Step 1: Assembling the PICAXE Circuit

Picture of Assembling the PICAXE Circuit

When you get your PICAXE proto-board kit the first step is to solder it together. This is fairly straightforward if you know how to solder. PICAXE revolution education provides a PDF in which it describes where all the components go. I have attached it onto this Instructable if that makes it easier. However if you used a 5 volt transformer like I did, then you will need to cut off the plug and strip the wires before soldering them into the PICAXE board.

Finally plug in your 08M2 IC and then install the PICAXE editor 6 and follow the instructions on how to install the appropriate drivers for your USB download cable. Here is the link for PICAXE editor software: And here is the link for the drivers and information for the cable:

The next stage is to attach the servo and alarm clock.

Step 2: Finishing Off the Electronics

Picture of Finishing Off the Electronics

This handy proto-board produced by PICAXE revolution education will be the bare bones of our door opener. However to actually make this useful we must add the input and output devices for the door opener.

First open the back of your alarm clock to reveal the innards of the device, usually this is a case of undoing several screws and opening pesky clips in the casing. You should be able to see a brass disk behind the noise holes at the back of the alarm clock. This is the piezo transducer which makes the noise. We are going to harness the signal that the timing chip in the alarm clock gives to the piezo to trigger the PICAXE chip. First while keeping the red and black wire attached to the piezo (the audible alarm is useful for testing and can always be removed later in you desire), solder on your own red and black wires from the connection on the piezo (about 150mm long).

Then file two small grooves in the casing to allow your wires to come out of the case and allowing the case to screw shut again.

Now you will have to attach the wires from the alarm clock and the servo as shown in the diagram above.

Step 3: Programming and Testing

Picture of Programming and Testing

Below I have included the code which will hopefully allow the hardware you have just created to make it work. Of course there are many improvements that can be made to the code but this seems to work. To program the chip you will have to ensure that the board is plugged into a supply and that the download cable is also plugged in. The 3 pin download header on the board also needs to have the black connector in download mode. Copy and paste the code into the code editor and change the chip type to PICAXE 08M2. Then press the download button on the toolbar.

'Chicken door opener

#PICAXE 08M2 ' sets the chip type to picaxe 08m2 only


readadc10 c.4, w1 'read the voltage across the piezo tranducer

If w1 > 50 then goto open ' If this value is bigger than 50 the alarm clock must be going off so the program will goto a subroutine which will open the door and loop back around.

goto Chickentimer


servo 1,250 ' This line is the line that controls the position of the servo to open the door, you will have to fiddle around with the positioning value (75 - 250) to allow the door to open with your particular mechanism.

Wait 50 ' pauses 50 seconds to let the servo finish positioning and to ensure that it has fully opened while preventing repeat openings until the alarm has finished beeping.

servo 1,off 'switches off the servo to save power

goto Chickentimer 'Loop back around

After you have programmed the device you will want to test it by connecting the power to the circuit and setting the alarm 1 minute in the future. If you move the servo to the middle of it's travel you should see the servo move to one end of it's travel when the alarm goes off.

Step 4: Installing

Picture of Installing

This will all depend on the type of mechanism that you had in mind and this will of course depend upon your chicken coop. I took a picture of the locking mechanism but I am sure that you can think of a much more ingenious method. If you want to keep the control electronics away from the coop you will have to make some extension wires.

Happy chicken keeping!


nigeco (author)2017-04-14

Surely chickens awake at dawn and go to bed at dusk. So a light sensor would do the job, of opening the door at dawn?

Charlie Godfrey (author)nigeco2017-04-15

Yes a light sensor would do a better job, a timer has to be adjusted throughout the year

M L G (author)2016-03-09

Hi Charlie disregard some of the comments well done! I couldnt make this right now if I wanted to, I'm an intelligent grown man with good design experience, Garden Design, that is! but electronics!?? its alien to me so again a very well done to you. perhaps now you could modify it now to include a closing feature? Do you think its possible to use these cheap components to create a door that opens and closes? if you do know how it can be done the pickaxe way as the amount of money people are spending on all the separate components you might as well buy a an automated garage door?! lol

Charlie Godfrey (author)M L G2016-03-09

Thanks! Here is version 2 commissioned this summer. It has an OLED display, 3 buttons for time input and an Arduino pro-mini (I did unfortunately have to leave PICAXE, but off ebay it was pretty cheap as well). A gearbox off ebay opens and closes the door according to settable times. And also controls an internal LED lighting system for those longer winter nights. There is no danger of decapitated chickens with an open and close time of about 15 seconds. An uninterruptible power supply in the garden shed ensures normal operation during a power cut. Although this system is more expensive it does have many more useful design changes. I was really proud of version 1 because of its simplicity and price, especially when compared to commercial versions! It was almost sad to decomission it.

zedonetx (author)Charlie Godfrey2017-01-11

hi, i would like to make the same circuit for my chicken house door. is it possible to take the circuit diagram and component list? i would appreciate it. thanks

Charlie Godfrey (author)zedonetx2017-01-21

Although I did not produce circuit diagrams I do have a parts list (Sorry this is pretty general but may give you an idea...):

L9110 motor driver (is able to control 12V motors as long as the current draw is less than 800mA which may not be enough)

Arduino pro mini (But Nano would be better, easier to reprogram in the field)

DS1302 real time clock module (a light sensor could also be used instead/in conjuction with)

3 push to make buttons - Plus, Minus and Enter

128 x 64 OLED I2C or SPI display

MOSFET for controlling lights if you want them during the winter months (could use 12 Volt strip lighting)

I'm powering my version off a small USB power bank constantly being charged via USB so acted as an uninterruptible power supply.

Hope this helps...


Oh hi Charlie, again well done! If I were going to give any constructive c criticism my only concern is the lack of insulation in both versions? But as I always say to people who comment on things, only fools and children comment on things b before they are complete so shall I Assume that you've shared these photos without covers so as to show the inner workings of your project? I've never seen anyone leave their circuit on a bread board as a finished product, but then again, I know very little about electronics. Enlighten me if you care to. :-)

Thanks. You are quite right. These photos were made during the early testing phase. Now it has its own wooden box to keep it out of the rain and mud-splatter caused by the chickens.

M L G (author)Charlie Godfrey2016-03-15

lol, im new to instructables and I just got a slap on the wrist to tell me to respond directly on the website! I'm a Garden Landscpae Designer by trade so you probably wont hear from me again as the season starts to hot up now right through to January next year! I'll come up for a breath of air agin in the new year.
Not if I can help it though, have to switch off sometimes and i do that by vegging in front of the ol computer! I know that sounds nuts and yes you are right it is nuts! Ive got as far as printing off the template for the door locking mechanism that RobotChicken so helpfully supplied via pdf! I probably wont get much further atm as running my own business takes up all of my time and when I have any time left all I want to do is nothing!lol!

urbanfresh (author)2016-06-18

that is epic lol

PeterM61 (author)2015-08-30

Hi Charlie, this is just amazing

yo mom (author)2015-06-06

This was just the thing I've been looking for this!!

Charlie Godfrey (author)yo mom2015-06-08

Superb, I am glad that this could be of use.

LukeS16 (author)2015-06-06

maybe you should make a kind of timed chicken feeder that opens up and a amount of feed falls out

Charlie Godfrey (author)LukeS162015-06-06

You are quite right, the chicken door opener could be quite easily modified to do this. However our chickens just eat out of a feeder that needs to be refilled every week. They just eat what they need.

Nemesis201077 (author)2015-03-30

I started a thread on this many years ago. This is a neat and simple idea, but a closing feature would be a great addition. I have an automatic drinker set up for the chickens and a feeder so I only have to top them up once a fortnight. By automatic the opening/closing of the coop door by either timer, light sensor or manual buttons would be really helpful.

You can see my thread here with a circuit diagram I was looking to adapt/use.

NathanSellers (author)2015-03-26

Cool idea.

I agree but it could be improved by adding a closing feature.

amberrayh (author)2015-03-26

Great first Instructable! Thanks for sharing!


About This Instructable




Bio: I am 17 and I enjoy inventing new things. I also have a Labrador cocker spaniel cross as well as some chickens.
More by Charlie Godfrey:3D Printing Bio-composites Arduino Rocket dataloggerLinkit One Energy Harvesting
Add instructable to: