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.

* To prevent discharge you can add a blocking diode, but I’m not going to get into that  (Google has your back) — the solar charge controller below is a better method for about the same price.

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.

So that’s it for power supply options. Here are some other useful notes:

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: So far this design seems reliable. I’ve only had to replace 1 timer that stopped switching after 5 years of use.

Troubleshooting: See below for two videos that demonstrate normal operation of the relay & tips such as how to set the relay module trigger & test the relay.

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:


SCAM: Web Content Scraping in Realtime


  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.

  31. Claus

    Just out of curiosity before trying out this setup, what would happen if one sets timers to actuate at the same time (or some fault leads to them both triggering at the same time)? Any difference in the 2ch optocoupler relay version and the dual spdt version in that regard? Im guessing the optocoupler has some sort of failsafe inbuilt? My brain struggles to calculate what (if any) effects this would. Im not using the linear actuator motor by the way, but a smaller 12vdc brushed reversible motor.

    • Wick

      Hi Claus,

      If both timers activated simultaneously: see the “Circuit Details” section of my post which goes over this scenario. Short answer — it’s safe, not a short circuit.

      Optocoupler vs relay: Optocouplers are designed for situations where there can’t be any interference passed between the switched circuit & the coil circuit, especially where there’s a large voltage difference. For this chicken coop application where everything is 12V & nothing is electrically sensitive, optocouplers have have no benefits (that I’m aware of).

      • Claus

        Thank you!

        Just as a caution to anyone trying this out: I have purchased three batches of the Cn101A specifically in “12VDC version” (i suspect there are actual differences on the circuit board between 12vdc and 220vac, but they are all called “Cn101A”) _and_ one batch called “L701” (same timer but rated for lower temperature (-20) and with a curvy arrangement of buttons) the last month or so (april – may 2017), and they are all clearly market for wiring Positive IN on the first terminal that is shown as Negative here. Since I assumed the stamped on wiring diagram was wrong (and this page correct), I wired this all up, and blew a small something connected right after the Relay inside the Tmer itself. No sound, no smell, only indication something was wrong was the timer lit up its indicator light when set to “auto” _and_ when set to “off” even though there was no “auto” (programming) set for the timer. No current passed through the Timer (no DC out) on the far right pole either in ON or in AUTO even though light came on.

        Funny thing is, when this little whatever blows, it creates a short, that obviously affects (and shorts) any other timers added after removing one faulty within this diagram.

        I am sure this wasnt of much use to anyone, but short story is: I have blown a little reddish-brown cap, diode or whatever thet are called on four brand new timers trying to power them as shown in the diagram on this page. All bought 2017. Three branded Cn101A 12VDC, and one branded L701 12VDC. The little thing that blows looks like an ant, and when measuring Ohms across blown ones, they act as wires (Ohms measures equally on both sides), where non-blown only can be “Ohms-measured” one way.

        Also note that this fault does not blow the Relay in the Timer. All sounds are ok. Only thing missing is DC out…

        And just to be clear: I have no idea what I am talking about. I could be completely wrong on all this, but four timers blown warrant me at least warning if it turns out polarity is “changed back” or is randomly switched by manufacturer still. -Oh and Yes, All is working fine if I set Timers up with first pole as Positive (DC 12V in) and change any and all wiring from there accordingly.

        Great page though! Thank you for sharing 🙂

  32. Keith

    Thanks for the info! I have everything set up but no power to the linear actuator. Red light on the timers when I turn them on, I don’t hear anything coming from the relay. Have the exact power source you mentioned 6amp. timers are the same. Could it be they are bad? Actuator work straight from power source.

    • Wick

      Are the jumpers on the relay module set to high-level trigger? When they are wired correctly, the relays on the module will make an easily audible click when activated, just like the timers do. To test the relay module, run (+) straight to the IN1 or IN2 terminal to trigger the relay manually. If you send a closeup photo of the wiring, I can try to troubleshoot it that way.

  33. JF


    I come back to the question related to the relay, i review you answer but can we replace it with two diode simply?

    T1out +——————-+
    – ——-||—-+——– + |
    | |
    – ——-||—————————— +

    Wathever input voltage on Timer out should be Ok if the 2 timers output are not on at the same time?


  34. Bill

    This looks like something that can be used on a fly door….which is nothing more than a swing door like a screen door allowing the chickens to have a fly and then a door letting them out to free range. Can the actuator be used horizontally?

  35. jason

    The 12 V 6 AMP power adaptor is for a laptop. I need to cut the end to the laptop, and strip out two wires, right? Is there AC to DC converter to which I can use wire connector?

  36. Brian

    I had mine working then a red light on the relay came on. It’s labeled LED2. Any idea what that means? The green power light is also still on. Thanks for the help.


    • Wick

      Hi Brian, I believe that means it’s being triggered. Is the timer connected to IN2 activated? (red light on in the top left, next to the “MANUAL” button).

  37. Chad

    Hey Wick, So i’ve wired everything up and cannot get the relay module to switch. The timers make the click when programmed or turned on manually. The module is set to high level trigger. I’m using a mortycycle 12 V battery to power the system. Are there lights on the relay module when it switch’s?

    • Wick

      Hi Chad, I’d try triggering the relay module manually rather than using the timers — keep all the wiring the same (even the timers can stay connected), but jump positive power straight to the IN1/IN2 terminals (one at a time). Some people have complained that the timers they are getting are defective. If you have a multimeter, measure continuity (or resistance works too) on each timer’s switched terminals when the timer is activated & see if it’s really switching. From what you wrote though, sounds like nothing is working & that would be rare for both timers to be bad. It could be a bad relay module but again for both relays not to work, that would be pretty odd.

      The timers do take a certain amperage level for the internal relay to work but it’s pretty low — your 12V motorcycle battery should be plenty, so I don’t think that’s the problem.

      Maybe send a photo or video of your setup?

  38. Robyn

    Thank you so much for these directions. All the details you included made it easy to build and troubleshoot. Thanks for taking the time to be so thorough and include all the links to supplies. My new automatic door is working great! The chickens aren’t so sure yet but I think they will learn to appreciate it.

  39. John Boy

    Hi, this is a question pertaining to the D.C. Timer a.k.a cn101a. I have used this timer in the past to successfully run a water pump while out of town.

    This year, however, I have set up the same timer to the pump (never changed the wiring, still the same), programmed the timer, checked that is will work, then left it in the AUTO mode. Upon returning back to town, the timer somehow had switched itself to the Off position!!!

    The first time this happened I assumed user error on me for not leaving it in AUTO mode. Then it happened again! I switched the cn101a timer with another I have successfully used in the past, and BAM, same thing! The timer is somehow switching itself from AUTO to Off mode! I am totally baffled. Maybe the wiring is wrong somehow, but it was never changed from previous years.

    Any insight to this problem and these timers would be greatly appreciated! Has anyone else noticed this anomaly, or had this happen repeatedly? Thanks.

    • Wick

      Hi John, I’ve never had the mode on those timers change on its own. Excessive moisture maybe?

  40. Matthias

    Hallo ,
    i have tried to build this electronic system (the two clocks and the relay) with your plans but it doesn´t work. I wired it like in your plan, but i have no elektricity at the com1 and com2 places . I think i should have there +12V or -12v . At the relay there are three lights flashing.
    Can you please help me?

    • Wick

      The relay module shouldn’t have any flashing lights. Did you purchase the same module I linked to in the post?

      Without knowing more, sounds like a problem with the power supply, the wiring to the relay module, or the relay module jumper settings. I’d go back & double check everything.

      Keep in mind the relay module needs it’s own dedicated, unswitched power source as shown in my wiring diagram. I’m guessing you have the relay module power source mistakenly connected to the switched power from a timer. That’s the only thing I can think of that could make the relay module LEDs blink.

      • Matthias

        thank you for your answer,
        i have bought a new relay and now it works.
        Maybe the relay was damaged by myself by a short circuit.
        I´m very satisfied now.
        Greetings from Matthias

  41. Justin

    Thanks for the great detailed write up and additional troubleshooting. The links are all still live and well and obviously very useful. I got mine set up today and looking forward to years of happy hands free door openings and closings. Couldn’t have done it without some kind of help like you provided. I will share with anyone who will listen. Thanks!

  42. John Boy

    Also, you mention in the instructions when using a solar array that it will slowly drain the battery at night… this shouldn’t happen if you have installed a diode in between the array and the battery, allowing the electricity to pass only in one direction.

    • Wick

      Hi John, I didn’t mention the diode because the charge controller option (the next paragraph) is typically the better inexpensive solution for managing a battery, and includes a blocking diode. But of course you are correct that a blocking diode does solve the discharge problem.

  43. Mike

    I ordered all the parts for the photocell setup but I cant get the photocell to reverse polarity on the linear actuator. I bought a photocell that has 3 leads, red/white/black. Any suggestions?

  44. Brandon

    Will hooking the battery up backwards (positive on negative and negative on positive) burn out the relay? I accidentally did that with out a fuse and now the relay turns on, but does not work. It’s has a constant green and red light all the time when hooked to the battery.

    • Wick

      Brandon, just a guess but yes I bet something blew. Polarity doesn’t matter with the relay coils but I bet there’s other components on the module where polarity probably matters. Luckily $9 will get you another relay module & another shot at it.

  45. Carol

    Hi, Thanks for this carefully detailed explanation. However my attempt is not working. I followed the wiring diagram at the top. Then I looked at the bottom and saw that the testing diagram was wired differently. Why is that?

    • Wick

      Hi Carol, see the caption under the wiring diagram image, & also this section near the top:

      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.

      That’s the only wiring difference I’m aware of.

      Let me know more about how your setup isn’t working & I can try to help further! What happens when you switch the timers to “manual” (does the red light come on the timer, & do you hear a click?), & are there any lights illuminated on the relay module?

  46. Carol

    Thank you for your response. My wiring is as at the top of the page. Yes, there is one green light on the relay module (SMAKN0). When I changed the timers to manual they did not click.

    • Wick

      Hi Carol, near the end of the instructions I’ve posted two new videos that may help troubleshoot relay & wiring problems. Although since your timers aren’t clicking, I think in your case the timers are the problem.

      You might try swapping the power leads to the timers. You’ll see in my two troubleshooting videos that the timers I received from Amazon 2? 3? years ago need (+) wired to the far left terminal & (-) goes to the 2nd left terminal (looking at the timer from the front, as in the videos). A number of people recently reported that the timers they received in 2017 needed (-) to the far left terminal & (+) to the 2nd terminal, so earlier this year I changed my wiring diagram, but you may have some of the older timers that need power wired the same way I have mine? I don’t know.

  47. Carol

    Also the red lights did not come on. The box my timers came in had a place to check CN101A or CN102A. Neither box was checked.

  48. Tshann

    Wonder if anyone can help. I’ve got everything all wired up and get the same result twice – with two different relays. So I’m assuming I’m doing something wrong. Whichever timer I connect to IN1 fails. The Red light comes on, I hear a click and then it turns off. IN2 does what it’s supposed to, it just turns on. I sent back the first SMAKN relay module and got another. Got the same result. It seems like it’s shorting or something when it happens. Initially if I disconnected to the timers and then reconnect I could test manual again. But this last time, now both timers seem dead. Any ideas on what I could be doing wrong?

    • Wick

      Hi Tshann, assuming you have a reliable 12V power source, sounds to me like defective timers. You can always try the timers without them connected to the relay module. They should turn on (red light) for the entire period you program them to run. Not sure what else to suggest.

  49. Theresa

    Built the door, worked like a charm for 3 days then nothing 🙁 looks like the voltage reads 11.5. on the solar controller. I read that it needs to be at least 12 volts to program it (I didn’t do this before oops). When I do manage to get it to 12 volts should I program it to shut off at a lower voltage? What voltage is the lowest I can get away with? Or can I get a larger voltage battery? If so what kind? As a novice to this, I’d appreciate the help.

    • Wick

      Hi Theresa, the default settings of any solar controller I’ve ever used should do the trick. Any 12V solar panel in proper sunlight will put out more than 12 volts which then charges the battery. My guess is the solar panel is either defective or not in enough direct sunlight each day. There could also be something draining the battery faster than the solar setup can charge it, but assuming you’ve built this setup, the timers are the only constant (very low) power draw & the 10W solar panel I mention in the specs will easily keep up with that.

      A higher-amp (not volt) 12V battery still needs more than 12V volts being output from the solar panel/controller to be able to charge the battery… using a larger capacity battery would just extend time until the same problem happens. Good luck!

      • Theresa

        Good to know! I live in cloudy Portland, OR, so perhaps I’ll try a bigger solar panel and/or moving it. The panel is charging, but there’s too much drain on the battery for the light I’m getting.

  50. George

    I appreciate all the work you did on this but you real only need the 8 pin DPDT relay and 1 (yes ONE) timer. The relay itself is the key.

    You put POS and NEG straight from the battery/Power (or Fused) source to the 1 and 8 PINs

    Then put criss cross jumpers across PINs 3 to 5 and 4 to 6.

    Put lead to motor to PINs 4 and 5, make sure the polarity is wired so the door is to the down position. (night time position).

    Wire the NEG from battery to PIN 2.

    The POS battery goes to the timer on/off terminals. Then to PIN 7.

    And you are done, that’s if you use the an actuator like you did here. If you use a motor of a different sort that does not have internal limit switches the you simply add them.

    The way it works is that when down and timer switch is off there will be power going to the actuator in the down/closed direction, and the limit switch disconnects the power. And there it will stay all night until the timer turns the switch on. The switch goes on and the relay activates. door goes up/open and it stays there until the timer turns the switch off.

    A photo cell can replace the timer or be added as a bypass (add switch for testing) or as the main switching source. Timer will run but if timer fails the photocell will open the door, and visa versa.

    Lot cheaper and less complicated. I hope this helps.

    • Wick

      Hi George, thanks for the comments. That method has its pros & cons. I think the main issue there is your way energizes the DPDT relay coil for the entire time the door is open (or closed, depending on what cycle you wire the relay to reverse polarity for). Energizing the relay for 12 hours each day causes the relay to heat up & wear out — the limit switches only cut power to the actuator, not the relay.

      Your way is also a much higher power drain since the relay coil is on for hours at a time. That would be fine of course with a constant power supply but not with a solar panel/battery setup. With the two-timer method, the relay coils are only energized for a minute during the actual door opening/closing — so the two-timer method is far more efficient for power consumption and the relays will last much longer.

      Also I don’t agree that your method would be a “lot cheaper”. One less timer is $5 savings & the single DPDT relay vs the double is maybe a few dollars difference. You might save $10 total.

      Definitely more than one way to accomplish a coop door opening. Just be aware of the pros/cons of each method & choose what works best for the situation. Thanks again for writing.

  51. Chris

    When using a charge controller, are the timers down the line, after the charge controller?

    • Wick

      If you’re using a charge controller, everything connects through that. There are 3 sets of terminals on the controller: panel, battery, load. You’d connect the timers/relay to the “load” terminals. So yes, with that setup I’d say the timers are “down the line” from the charge controller.

      • Chris

        Thank you for you help, I’m sorry to bother you, I hooked everything up and nothing worked, then realized the Pos & Neg on the timers where reversed from your diagram.

        The actuator closes on Manual but I cannot get it to open. What might be the cause for that? What is wrong? Do both timers need to be in Manual? I have tried every combo to no avail.

        Also, can you walk me thru the timer settings please?
        The “OPEN” timer is set to on 7:30 then off 7:32?
        The “CLOSE” timer set to on 17:30 then off 17:32?

        So many wires, so confusing.


        • Wick

          Hi Chris. To force the door to open you’d want to set the “open timer” to manual (red light on), & the “close timer” should not be triggered (red light off) — in other words set it to AUTO mode & not during a programmed event. If that doesn’t work, either the open timer is bad, or the wiring might not be correct.

          To test the relay module, unplug the timers from IN1/IN2 & skipping the timers completely, jump positive power to IN1, then to IN2 (separately). Power to IN1 should trigger open; power to IN2 should trigger close.

          To test the timers, try swapping the timer wires where they plug into IN1/IN2, so the open timer becomes the close timer & vice versa. Then try activating manual mode on the timers (one at a time). If the door opens but not closes, the problem is a defective timer.

          There’s a small chance the problem could be the actuator or built-in limit switches but I think that’s pretty unlikely.

          Good luck! Let me know how it goes.

  52. Tim

    Would using a International ST01 timer change the wiring diagram any? I want to try and use one of those because they have a feature that auto adjusts dusk and dawn times throughout the year. Seems that it would help eliminate necessary adjustments. Thoughts?

    • Wick

      That’s really cool!! I’m assuming you mean the Intermatic ST01. Looks like that will work except for possibly the operating temperature range, which is listed as “32°F to 104°F (0°C to 40°C)”.

  53. Chris

    And the timer settings please?
    The “OPEN” timer is set to on 7:30 then off 7:32?
    The “CLOSE” timer set to on 17:30 then off 17:32?

    Is this correct?

    • Wick

      Yes, that’s correct. Unless your actuator run time takes longer than 1 minute, 7:31 & 17:31 should work for the off times, but the 2-minute times you have will work fine too.

  54. Chris

    Both timers seem to be working, they light up, they click, etc.
    But, auto on one and on for the other would do nothing.

    The relay has a green light and a red light on, but: “unplug the timers from IN1/IN2 & skipping the timers completely, jump positive power to IN1, then to IN2 (separately). Power to IN1 should trigger open; power to IN2 should trigger close. ” DID NOT do anything.

    I know the actuator works b/c direct to power opens it. This wiring setup closes it only.
    I took it all apart, off the coup, brought everything up on a bench, re-wired everything from scratch, got some better wire connectors, but it will not work.

    • Wick

      As I mention in the instructions, make sure the relay module’s jumper block is set for high-level trigger (jump “Com” & “High” for both S1 & S2). If that’s not the issue, then I think the relay module is either wired wrong or defective. Let me know, interested to know if you figure out the problem.

  55. Chris

    It’s on high, wired like your pic at the top of this page.

    • Wick

      If a high-level trigger isn’t triggering the relay module correctly, that’s the problem. One other thing to consider before replacing the relay module is make sure whatever power supply you are using is within spec for the relay module.

  56. Chris

    Thanks for you help Wick, I have the same battery as you linked on this page.
    I will order another mod.

  57. Chris

    With two lights on the mod, it’s hard to see it as defective….

  58. Chris

    Vids are great, thank you. Will report back.

  59. Chris

    My volt meter died recently, but the actuator works, it’s the same thing. When I put the act. to power it opens, when I hook it back to the mod. it closes.
    My mod. always has a red light on, it does not look to be the case with yours?
    It will only go out when I disconnect the DC+ wire. Which tells me the mod might be bad? I have a new one coming in a few days. I hope that does it.

  60. Mike

    Wick, could you please show me how to wire this photocell with the octocoupler? I bought 2 and fried one already so i am super hesitant to put power to it now until i am sure

    Thank you kindly

  61. Chris

    I received my new relay module and it works. Happiness and joy.

  62. Olivia

    Hi Wick,

    Thanks for the awesome tutorial! I’m a total noob, so please forgive my ignorance. I am wondering how to connect the ac power adaptor to the relay circuit. Do I just cut off the barrel plug to expose the positive and negative wires?

    • Wick

      Yes, exactly. Separating & stripping the power supply wires cleanly can be a little tricky but if you cut the wire way out near the 12V plug end, you should have plenty of wire length for a few tries 🙂

      If you want to get fancy you can always buy a 2.5×5.5mm barrel jack that the 12V end from the power supply would plug into, like this one — you’d cut the plug end off (this extension, not the power supply) & just use the jack end with the wires running to the timers/relays.

  63. Jill

    Hi Wick, I’ve been following this blog for quite some time. What you do here is awesome! How would we do it without people like You!!!

    Anyways, a few comments above from “Mike” asked about a photo cell and I would like to change from timers to that option. He had asked how to wire it up. Is that something you will be showing us, or should I hold off? I really don’t want to buy the supplies and have no idea how to book them up…..ha!

    Again thanks for what you do.


  64. Rich

    Thank you for the simplest, most cost effective set up I’ve yet seen, not to mention showing how to hook everything up!

    While I’ve got my orders in for the relay and timers, rather than a linear actuator, I’m planning on using a DC motor I salvaged from a cordless drill. I’m assuming the setup will work (power the device) essentially the same. I have dedicated power to my coop so I will be going that route, but my question is, I have several “wall warts” to choose from to power the motor and the one I found that turned the motor at a safe speed for opening and closing the hatch was a 9v 350ma one. Do you think that would cause any issues? Thanks again!

    • Wick

      Hi Rich, thanks! Assuming the motor is from a 9V drill then the 9V power supply is right, & the amps you supply to it just need to be adequate to keep the motor turning well. The drill motor draws a lot more power than 350ma under load but as long as your coop door is a very light load on the motor, that setup should fine.

  65. John

    Hi there from South Australia. Thanks very much for the guide Wick. I was not able to purchase the dual relay board in Australia so I used 2 x SPDT relays (Horn relays) instead. Worked a treat. I have some pics of my setup if you are interested.

    Thanks very much for the guide, it was inspirational. Once I got my head around the fact that: when the relays are “at rest”, positive current is flowing to both terminals of my actuator vie the COM of the relay. When a timer turns on the negative is supplied to the COM instead and thus completes the circuit and powering the actuator.

    Cheers mate, great stuff


    • Wick

      Looks great! Nice work using the 2 relays. One other nice thing about this setup is that in the unlikely event both relays are triggered at once, they’ll just supply negative to both COM outputs & that’s also a “rest” state. Thanks for writing, have a good one!

  66. Gus

    I really appreciate the work you did on this post. I had purchased a photo cell activated chicken door on ebay three years ago. It stopped working and the seller did not offer technical help. I ran across this post, ordered the parts, wired the parts and almost soiled myself when it worked! And it works well with almost no current drain when idle. Thank You!

  67. Matthew

    Wick, thanks very much for the post. I’ve assembled this set up, but actuator isn’t moving. Timers clicking, green light on relay, but the red lights on relay don’t burn. Tested the relay as your video suggests: red lights are extremely faint and fleeting. Any suggestions?

    • Wick

      What’s the power supply you are using?

      • Matthew

        Thanks for your response. I’m using a 12 V battery.

        Once difference b/w my setup and yours. I’m using 22 awg, which is the size on my actuator. Could that be making a difference?

        And I assume the connections at the relay are stripped wire into screw terminal. Or are you using some kind of connector there?

        Really appreciate your help!

        • Matthew

          Update: I rewired with 18 awg and replaced the relay. It’s working now.

          Thanks again for posting this design. very helpful!

        • Wick

          Yep the connections at the relay module are stripped wire. I twisted & soldered the wire ends before clamping them in the screw terminals, but that’s not really necessary. The only “fancy” connectors I used were quick connect spade connectors that push onto the timer terminals. Most hardware stores carry them in the small parts drawers, or you can get them on Amazon, Digi-Key etc.

  68. IdeaTrunk

    Thank you! Works great. Used an old lawn mower battery, put electronics in old fuse box after removing innards.
    Linear actuator is too long though. I wanted the pivoting door to open to about 60-70 degrees from vertical so snow and rain would shed off, and the door also blocking direct wind into the chicken house. 17 inch hinged door. Anyone have a link to the math for actuator placement?
    Here’s pencil and paper method: “Model each of the parts as circles with their centers representing the hinge points. The actuator will be represented as two circles with the same center point, one circle with radius equal to the retracted length, and the second with a radius of the extended length. When you overlay the circles you will see where they intersect. By moving the hinge points (or circles) you can experiment to find hinge points that work. I do it using a CAD program, but you could do it with paper models drawn to scale if you don’t have a favorite CAD program to use. – Entrepreneur Jul 2 ’17 at 21:49”

Leave a Reply

Powered by WordPress & Theme by Anders Norén