A windsurfing, CSS-grudging, IE-hating, web-developing, gigantic-machine-puzzling blog

Heavy Duty Automatic Chicken Coop Door – Easier Timers

In March 2015 I posted a method for making an automatic chicken coop door using two timers & a DPDT relay, but the timer setup was complicated — one timer provided power, while the 2nd timer controlled reversing polarity & had to turn on simultaneously with the power timer. Not easy.

Here’s another method of wiring the timers that’s more straightforward. One timer opens the door & the 2nd timer closes the door. One event per timer … Simple, easy, inexpensive, & should be as reliable as the old way.

Automatic Chicken Coop Door Wiring

NOTE: Older CN101A timers may need the two power wires swapped (reverse polarity).

This new system uses a $9 dual-SPDT relay module which replaces the DPDT relay in the old design.

Any 2-channel SPDT relay module with a high-level trigger should work. Typically there are 6 terminals on one side: NO/NC/COM for each relay, & 4 terminals on the other side: signal inputs for each relay (IN1/IN2), & power for the module (marked as +/-, or VCC/GND). There’s a jumper block to select the trigger type.

The timer wiring is the same as before — daisy chain power to each timer, & then to the module. Jump (+) to both NO terminals, and (-) to both NC terminals. Connect the actuator leads to the COM terminals. Run the output from each timer to the module’s IN1/IN2 terminals.

NOTE: Both trigger jumpers must be set to HIGH (outward setting). Apparently this relay is occasionally shipped with the jumpers set to LOW (inward), which would require different wiring from what I’ve shown.

YET ANOTHER NOTE: Sometime in 2016, apparently whoever manufacturers these CN101A digital timers made a change so the polarity for the two power leads to each timer needs to be reversed from how my timers from 2015 & earlier work. I’ve updated the schematic diagram to reflect this change — so now ground is connected at the far left of each timer.

Parts list:

I’ve received several questions about my wiring diagram’s purposefully ambiguous “power supply”, so here are some different options.

Simple solar panel setupSolar panel: You can use a very low-watt solar panel connected directly to the battery with a fuse, so that the solar panel acts as a trickle-charger. The problem is the solar panel also slowly discharges the battery at night, & so this system relies on whether the solar panel can generate more power during the day then it uses at night – normally not a problem, except if you live somewhere like I do without much sunshine in the winter.

Solar panel with charge controllerSolar panel w/ controller: This uses a solar charge controller which regulates power to the battery & automatically disconnects the solar panel at night. You can use any size solar panel, although panels over 20W are probably not necessary unless you are using a different system with a higher constant power draw (like a photocell) rather than the two timers.

Dedicated A/C powerDedicated power: If you have A/C power to your coop, you can use a 12V power adapter with an amp rating higher than the power draw of the linear actuator. This method is by far the least expensive, but if the power goes out, your chicken coop door won’t open/close.

Dedicated AC power with battery backupDedicated power with battery backup: Nice method that handles power outtages. With this system you need a trickle charger (sometimes called a “battery maintainer”), and a 12V battery with an amp rating higher than the power draw of the linear actuator. As with any battery, you should definitely put a fuse on the positive lead coming off the battery.

Fuse sizing: Typically the fuse is rated 50% more than the maximum power draw of the linear actuator, so for instance if your linear actuator is rated for 5 amps max, use a 7.5-amp fuse. For a 6-amp linear actuator, use a 10-amp fuse.

Wire gauge: 16-gauge or 18-gauge wire should be fine, unless you are using more than a few feet of wire for some reason.

Wire connectors: I used spade terminals to connect wires to the timers & battery tabs. Keep in mind you’ll need to use a larger size terminal (than your wiring) when you splice 2 wires into one terminal. You can order a nice assortment of terminals on Amazon for $14, or your local hardware store typically sells individual spade terminals from the small parts drawers.

Timer setup: First, set the time. Hold down the “clock” button & (still holding down “clock”) press D/H/M buttons to set day of the week, hour & minute.

Then press & release the “P” button. The number in the lower left shows the timer event number (1, 2, 3 etc) & whether you are setting the ON or OFF time for each event. So the first time you press “P” the timer shows “1” and “ON” in the corner — you are setting the start time for the first event. Press the D/H/M buttons to set the event start info. To have the event occur every day, push “D” until all the days of the week are shown (MO TU WE TH FR SA SU). When you’re done setting the event start info, press “P” again & set the same info for the first event’s end time. Press the clock button when you’re done.

Final step is press the “Manual” button until you see “AUTO”. That means the timer is ready to be triggered by the events that you set up.

Press “Manual” whenever you need to override the timer. It cycles through AUTO -> ON -> AUTO -> OFF, so you may need to push the manual button several times to trigger ON. Remember to set the mode back to AUTO when you’re done — otherwise the events won’t trigger the timer.

The “C/R” button resets the time if you make a mistake setting up an event.

Manufacturer instructions for the CN101A timer are here.

Troubleshooting: If the actuator runs backwards, switch the actuator leads where they plug into the COM terminals. If the wrong timer controls the wrong event, switch the timer output leads either where they plug into the IN1/IN2 terminals or at the timers (doesn’t matter, same result). If a timer doesn’t switch at all, reverse power polarity to the timer (swap positive & ground). Also make sure the power supply has sufficient amps because otherwise the red light will come on but the timers won’t actually switch the circuit. If the timers don’t work when an event occurs (no red light & no “click” sound), make sure it’s set to AUTO mode — push the MANUAL button until you see AUTO on the display.

Automatic Chicken Coop Door

Wiring & testing the prototype.

Circuit Details: With neither timer activated, both motor leads are (-). With one timer/relay pair switched on, one lead switches to (+), the other stays (-) & the motor either runs forward or reverse. With both timers activated, both motor leads are (+) … that shouldn’t happen with your timers set properly, but it’s fine if it does (not a short circuit).

Don’t shoot the hobbyist: I’ve only been running this new setup for a week so I can’t vouch for it’s longevity yet, but I don’t have any reason to doubt it will be as reliable as the prior design. So far I’ve only had to replace 1 timer that stopped switching after 5 years of use.

Questions for electrical engineers:

  1. Does this module handle EMP from the actuator motor being switched off, or ideally should I add something to manage that? There are a bunch of other components on the circuit board in addition to the two relays, not sure what it’s designed to handle.
  2. I’ve come across this relay module used with IN1/IN2, NO1/NC2, & NC1/NO2 each jumped together, like this, which seems to provide the same exact function as a single DPDT relay wired as an H-bridge. To me this makes very little sense — essentially using two SPDT relays to accomplish the same function as one DPDT relay, but with more complicated wiring & greater possibility of component failure. Are there any benefits to this setup over a single DPDT relay?
  3. Is there any benefit to using a motor reversing solenoid over this 10-amp relay module (perhaps built-in handling of EMP)? Or are those solenoids just primarily designed to handle more amps & a longer duty cycle?

Happy chicken coop dooring. Any questions or comments, let me know!


Bad Crawler Bots:


  1. Tom

    Hello again Wick, Well after about 7 tries I finally got a working set of electronics using the photocell instead of the timers. Couldn’t have done it without all your instructions and attention to detail on your project.
    So now I am on to the construction phase and that should go by fairly uneventful.

    I know there was a concern for the buzzing sound of the switch when the light is right on the edge of being where you need it to be but looking through the reviews on the part in Amazon, I found a comment that says to place a 30k OHM resistor between the #5 and #7 pins on the Op Amp. ( I’m probably going to eventually try this but it is the least of my worries… a little buzzing I can handle)

    My main concern is what you brought up about the constant battery drain from the photocell. My possible solution to this is to try an Adjustable Repeat Timer Delay Relay. My thinking on this is this: if I splice the line out1 and out2 from the photocell individually to 2 separate delay relays that I can adjust the time to allow energy to flow though the system for 1-2 minutes allowing for the functioning of the actuator but after that time, the delay relay will disconnect the flow of energy until another cycle begins.

    (When the energy from out1 , opening the door, is complete the energy to the control module is cut. When out2 initiates, out1 is no longer energized and the delay relay resets itself waiting for the out1 to energizes itself again starting the cycle all over again.)

    I would add a picture of the wiring but I do not know how to do that in this blog…


    • Wick

      Hi Tom, that’s great you got it all working. I agree that delay timer method you described to cut power to the actuator relay(s) is probably the best method in terms of handling the power drain. A few months ago I bought some programmable timer modules — the 18 available timer modes sounded promising! I’m thinking there’s probably a way to handle it with just one timer module but again haven’t had time to sit down & try it out yet… Luckily, winter is coming 🙂

      Which photocell are you using?

  2. John Greene

    I am interested in building one of these for use when I am out of town. This looks far better than the ready made versions I have seen on Amazon. Where can I get a list of parts and where to buy?

  3. Laura

    novice here but where does the solar play into new model here?

    • Wick

      Hi Laura, I wrote more about the “power supply” including 2 options for solar power.

  4. dave


    I ran across your blog after researching a way to open/close a ceiling vent using a linear actuator. I am searching for a simple way to slide a insulated foam board back and forth to open/close a vent to my whole house fan. My question is would I be able to use a on/off light switch in place of the timers? When the actuator fully extends/retracts does it turn off or continue to drain power?

    • Wick

      Hi Dave, an ON/OFF switch — single pole single throw (SPST) — wouldn’t work, but a DPDT switch like this ON/ON switch or this ON/OFF/ON switch will work great & you don’t need the relay module. You’d run positive/negative power to the center switch terminals & then run the linear actuator leads in an “X” to the terminals at opposite corners, like this.

      The 3-position ON/OFF/ON switch I linked to stays in position, so in other words if you switch it ON, you can take your hand away & it stays ON. The linear actuator has built-in limit switches so it cuts power to the actuator motor automatically when the arm is fully extended/retracted (so to answer your question, there’s no power drain). If you’d prefer the switch to automatically return to OFF, you’ll want a momentary DPDT switch. However because of the limit switches you don’t need a momentary switch & in fact it would probably be less convenient since you’d have to push the switch for the ~20-30 seconds it will take for the vent to close. I think the simple ON/ON switch might work best.

  5. Steve

    Hello. Not sure if it matters but what Guage wire did you use? Also what connectors were used? Thanks

    • Wick

      Good questions — I’ve updated this post with info about wire size & more about the connectors.

  6. Joyce

    Hello there,
    We are wondering why we need a relay at all with one timer opening in the morning and one timer closing in the evening?

    • Wick

      Hi Joyce, the only timers I’ve seen available are SPST, meaning they only switch one wire (“single pole”), & only on or off (“single throw”).

      So with SPST switches, the (-) wire needs to be connected permanently & the timer controls (+). However since for each timer you need +/- connected opposite from each other (to reverse the polarity to the motor), that forms a short circuit when any timer is activated.

  7. Lee

    Wick, Thanks for the great post. I have wired all components as you depict in your drawing but neither timer is causing a movement of the linear actuator. The timers and the SPDT are getting power. I tested the linear actuator straight to the battery and it works fine. The only thing I can guess is the testing picture you posted and the drawing do not seem to correlate…maybe I can’t zoom in far enough on the picture though. Any thoughts would be appreciated. Thanks, Lee

    • Wick

      Hi Lee, sorry for the delay there. Can you hear the relay switching? If it’s working it will make an audible clicking sound & if you put your finger on the relay you will feel it as well. If it’s still not working, can you post a photo?

  8. Michael

    Hi Wick,

    I like the simplicity of this door opener. As I shopped for the bits, I found this timer on Amazon
    Any reason why two of these couldn’t be used directly, eliminating the relays?

    • Wick

      Hi Michael, see my reply to Joyce above — with only the SPST timers, there’s no way (I know of) to have just the timers reverse voltage without also short-circuiting.

  9. SlowBro

    Any way to do this without two timers?

    • Wick

      Hi, yes you can although I think 2 timers is the better way. That said, you can use one timer or better yet, a photosensor. With 1 timer you’d set up one single event spanning the entire time want the door to stay open, & it uses a DPDT relay. Run power directly to the NO terminals on the relay, & also to the NC terminals but with reversed polarity. Then wire the timer or photocell to the relay coil, & connect the linear actuator to the common.

      The downside with that setup is the timer relay & DPDT relay both stay energized for the entire time the door is open, so there’s more power consumption (mainly only an issue for solar power, not dedicated power) & more likelihood for the system to fail — the timers are pretty cheaply made & I’m not convinced they would do well staying powered up for ~12 hours each day.

  10. SlowBro

    FYI you mentioned, “The problem is the solar panel also slowly discharges the battery at night”

    Use a diode to prevent that.

    • Wick

      True in theory but I’ve read that “as a general rule in 12 volt systems, you will lose more power from diode losses than you will from leakage back into the panel at night.”

  11. Michael


    I built this using the linear actuator in the horizontal position to open and close a standard chicken coop door. Works like a charm. The only problem that I had was that the DPDT module requires the timer to sink the voltage to ground, so it didn’t work (for me) when wired as shown in your diagrams. I simply made the switch connect to ground (common) instead of the 12V shown, and all was well. Can send pics if you wish.

    • Wick

      Hi Michael, sounds like the difference probably is just that you didn’t notice the relay module as I’ve shown it has both jumpers set to HIGH (outward). HIGH is how my module came shipped, so that’s what I went with.

      Either setting works, but as you found out, if you have the jumpers set to LOW (inward) then you’d have to modify the wiring.

  12. Thomas

    Can you replace timers with Arduino nano? Or pro?

    • Wick

      Hi Thomas, yes that should work fine — Arduino has libraries available for time & timer functions. However you’d still need to use a relay since the Arduino can only switch 40mA (maximum, 20mA recommended) @ 5VDC.

  13. Jack-K

    Thought I would chime in after my build experience. Please add a note advising people to check the position of the two jumpers on the relay in the bottom right corner of the unit. The jumpers should be positioned as shown in your image; all the way to the right (don’t have the relay with me to indicate the names of the pins). My unit arrived with the pins on the left and I spent a good hour troubleshooting the circuit, including disassembling and reassembling three times before seeing that tiny detail in the image.

    • Wick

      Great suggestion. I’ve added a note about that. My relay came shipped with jumpers set to HIGH & I just assumed that was the standard setting, but clearly not! Thanks for catching that.

  14. James Sayre

    I have purchased all the correct parts ….wired per diagram…the only way I can get the actuator to reverse operation is to reverse the wires on the optocoupler…do you have any suggestions….

  15. Hello, Not sure if my first comment took..I don’t see it anywhere so….I have wired exactly per diagram…The actuator goes out but won’t retract ….It will retract if I reverse the actuator wires to the (SMAKN® DC 12V 2CH 2 Channel Isolated Optocoupler High/Low Level Trigger Relay Module)…Do you or anyone that has one working have any suggestions….Thank you so much…..

  16. Nicely done, going to attempt this. Got a Paypal account folks can send donations to for your effort?

    • Wick

      Hi Gabriel, thank you for the donation offer. I’m all set, just happy to hear people find it helpful. Any questions, let me know.

  17. Solved the problem….Thank you for this design…I noticed on one review that the SMAKN® DC 12V 2CH 2 Channel Isolated Optocoupler High/Low Level Trigger Relay Module wasn’t rated so high because of the poor quality. It works great but I do agree the low quality screw terminal blocks need improved. I have two that are stripped…
    Again, Great job and thanks

    • Wick

      Hi James, glad you got it working. Just curious, were the screw blocks the problem with it not working initially, or something else?

      • James Sayre

        The screw blocks strip out very easily….I didn’t over tighten…My initial set up was getting in a hurry..My fault…The door works great now and I feel very confident that no predator is getting my girls…Again, great setup..

  18. Ian

    Awesome and very useful information. I have had your recent version up and running and worked flawlessly for a week or so. The past two mornings however it has stopped a few seconds into the opening. Trying to do manual mode the timer and the relay blink in unison with each other. Temps have recently dropped to frost levels and I am thinking that maybe this is the culprit. I went through the wires making sure all connections were good after the first malfunction and it worked as it should.

    I was just curious if you or anyone else may have similar issues with frost/cold temps. I am going to try to make an enclosed housing for this. I am in TN so winters are not crazy but we do have freezing temps most mornings. I have dedicated power dropped with a 12c 5a adapter. Just trying to put my finger on the issues with opening as we will be leaving the following weekend and would like to ensure this doesn’t happen when we are gone.

    I feel bad b/c the chickens can get their heads out but not their fat bodies. If you have the patience you can lower the overall cost by shopping ebay (from china). I have about $75 into it.

    Thanks again for this tutorial. One of the best things for any chicken owner.

    • Wick

      Hi Ian, that’s interesting. I live in VT & haven’t had that problem due to frost. I did have a timer fail after 3-4 years & it did something similar then, would blink (very) rapidly. I’ve also seen that happen when the timer doesn’t have sufficient power. But, I’m not sure why that would be happening with dedicated 12VDC power like you have. The timers are cheaply made so that’s my guess — maybe try swapping them & see if the same problem starts happening when the door closes? …that would definitely indicate a bad timer. Hope you figure it out, good luck.

  19. Jeff Hall


    I’m unable to my instruction sheet for the uxcell timers. I can’t figure out for the life of me on how to set these timers. Can you tell me how to get these timers working or help me find a set of instructions.



  20. Damien

    When using electricity to the coop do you still need 2 timers and the relay board. I was thinking of a timer from a lizards cage, with 2 power supplies. When ones on it will hold open and when it shuts off and the other one turns on it would close it. I am no electrical guru, so im not sure if that would work

    • Wick

      The problem is these timers only switch 1 wire. So there’s no way I know of to wire opposite polarity (to reverse the motor) without short circuiting, unless you use a DPDT relay (or two SPDT relays) wired as an H-bridge. There’s no situation I can think of where you’d ever need 2 power supplies.

  21. Damien

    i built and assembled the while thing with the same parts, per all your diagrams. The board has the green light lit and the timers are set. But it is not moving it in or out. Is there a specific way some of the pieces on the board need to be positioned. I am a little scared to push or pull on them. Thanks

  22. Damien

    I believe this could be where I am wrong. Does this just pull out with needle nose plyers
    NOTE: Both jumpers must be set to HIGH as shown (outward setting). Apparently this relay is occasionally shipped with the jumpers set to LOW (inward), which would require different wiring from what I’ve shown.

    • Wick

      Yes if your module was shipped with jumpers over the inner/middle pins, pull each jumper block off & push it back down so it’s connecting the middle/outer pins.

  23. Damien

    Is there a way I can send you a picture to make sure everything is right. The pins are in the right spot, I believe. Its still not working

  24. Damien

    I just took my plyers and jumped on the side with the 4 pins. From the first to the last I got it to move and then from the second to the last I got it to move the other direction. Maybe that could help you help me troubleshoot the issue.
    Thanks. I am not very smart with this stuff

  25. Damien

    I am looking on YouTube and everyone has the negative or their black wire on the far left side of the timer. I am thinking i could have a timer issue because I cannot even get the light on the timer to come on at all. I hit the manual button and i get nothing at all. But the board has the green light on and i can jump the actuator to work on the board.

    • Wick

      That does sound like a defective timer. If you push the “manual” button a few times, you should hear a loud click & the red light on the timer will come on. It should work like that as long as you have power connected to the two “power” terminals (left side) — for testing the timer you don’t need anything connected on the two “switch” terminals (right side).

      Here’s the wiring schematic I used for the CN101A timer which shows positive power to the 1st terminal & ground to the 2nd terminal (going left to right with the timer facing you), which is what worked for me. Like you mentioned, some other commenters have mentioned they reversed the power leads & that worked. Could be different factories manufacturing the same timer different ways? I don’t know.

  26. Damien

    I am thinking that it is defective timers, but odd how I would get 2 bad ones in one order. I have pushed the manual button over and over and nothing happens. I will try just having the power connected and the other leads off of the timers. I never hear a click at all from the timers. When I jump them on the board I hear the board click. I have someone with a little knowledge coming to help me out tomorrow. I have been chomping at the bit to get this in the coop. I love that I found this one. I was going to build one with a car antenna. This looks much stronger. Thanks for all your help. If I do have a problem after tomorrow I will get a hold of you

    • Wick

      Hi Damien, a number of people have written back just in the last few months to say they only were able to get these CN101A timers to work if (looking at the timer from the front) they connected ground (black) to the far left power terminal, & positive (red) to the 2nd power terminal.

      Previously I had the power to each timer wired the other way, which is how the CN101A timers I purchased in 2015 & earlier years worked. I’ve updated the wiring diagram to reflect this apparent manufacturing change. Hope that helps.

      Keep in mind these timers have a rechargeable battery so the clock will continue to function regardless of how you have 12V power hooked up. The real test is if the internal relay will actually switch (audible “click” and the red light comes on) when the timer event occurs or if you push the “manual” button. The button cycles through ON -> AUTO -> OFF -> AUTO so you’ll need to push it until the display reads “ON” to manually trigger the timer. Remember to set it back to AUTO when done.

  27. Skye

    Hey Wick,

    Great tutorial. I’m working on getting it all set up now as well as adding a light on a timer too.

    One thing I found different was your timer wiring. Your negative and positive power terminals on the timer seemed to be the opposite of the model I got.

    Can you comment on the relay I purchased? I think I purchased the wrong one. The one I found on was different than the one you used:

    It has PINs on the one end which I have no idea how to connect wires to.

    Did I buy the wrong one?

    I also just found this one too which looks similar to the you got:


    • Wick

      Hi Skye, thanks for letting me know about the timer power polarity. This year a bunch of people have left similar comments about the timer power polarity, so today I changed my wiring diagram. I had ordered several CN101A timers back in 2011 & again in 2015 that worked the way I had it (positive on the far left, then ground), but apparently things have changed since then…

      In terms of that blue relay you mentioned, that should work fine. It doesn’t have the selectable high/low level trigger that the other relay has, but according to the specs on Amazon, that relay is hard-wired for high-level trigger & that’s what you need. It doesn’t have the easy screw terminal block but to connect wires to the pins, get breadboard jumper wires that have at least one female pin connector. The wires typically come as a connected strip but they just tear off easily from each other … think Twizzlers. So you’d use female plug ends to connect to the pins on that relay (VCC/GRD/IN1/IN2) & strip the other end for use with a spade connector or whatever you’re connecting to. Most electronics/hobby stores should have breadboard jumper wires. Just make sure you get female/plug ends (not all male/pin ends).

      That 2nd relay you found is the identical model to the one I linked to in the post, just a different brand name (uxcell rather than SMAKN). But I don’t think there’s any reason why that blue uxcell relay you ordered won’t work just fine once you get pin connectors. Or with a soldering iron you can always solder bare wire ends directly to the pins. It’s a little tricky but works fine, I’ve done that too. Any other questions, fire away.

  28. Aaron

    Are there any concerns about the force the actuator can apply? 225 pounds is a lot of force if it gets applied to a chicken! Or does the noise keep the chickens away from the door while it’s in operation?

    • Wick

      Hi Aaron, good question. Like you mentioned, the noise does the trick. Also the door closes VERY slowly. Ours travels ~18″ over 30 seconds which is plenty of time for any chickens to move out of the way. You could also put on a rubber or wire “bumper” to move chickens out of the way as the door closes if you end up having some obstinate chickens that prefer to stand in the doorway. Typically our chickens are happily roosting inside the coop by the time the door shuts & are nowhere near the door. It’s good to make sure the door shuts after it gets dark & not any earlier while the chickens are still active.

      In 5 years so far of using the automatic coop door we did have 1 chicken die early on. It was a small silkie that the other full-size chickens liked to pick on, so the silkie would roost in the coop doorway until the last minute as the door shut. We lost far more chickens to NOT having the automatic door, so even with the one fatality it’s been worth it.

  29. Spencer Tregilgas

    I just finished setting up the solar panel and battery version. The links to the parts were all active, except the timers came direct from China and took longer than expected. Easy to set up and install, the wiring diagram worked perfectly. I used 14 gage wire except for the solar panel and battery wires since I had about 15 feet of wire. I can’t believe it, my chicken coop closing days are over! Thanks for such a great tutorial.

  30. Mike


    Everything is wired and I have a green light on the relay board, and the antennae works when hard wired, however, I get nothing from the timers when programmed according to the manufacturers instructions. I don’t even get a red light on the timers when I push the MANUAL button. I tried with the polarity reversed also, nothing. Bad timers?

    • Wick

      Hmm sounds like it. You may have to push the MANUAL button up to 3 times to cycle through the modes to the point where it turns ON (red light & you’ll hear an audible click). The cycle is AUTO -> OFF -> AUTO -> ON. Try wiring your power source straight to each timer individually with nothing connected to the switched terminals. If that doesn’t work & you’re using a 12V power source that works (maybe try a different power source?), sounds like the timers are defective.

Leave a Reply

Powered by WordPress & Theme by Anders Norén