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.
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.
- Dual-SPDT relay module ($9)
- (2) 12V programmable digital timers ($5 each)
- 12V linear actuator, 8″ extension, IP65 rated w/ built-in limit switches & mounting brackets (~$55)
I’ve received several questions about my wiring diagram’s purposefully ambiguous “power supply”, so here are some different options.
Solar 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 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.
- 10W 12V solar panel ($30)
- 12V 7-amp battery ($17)
- 20-amp 12V solar charge controller ($20)
- inline fuse holder ($5)
Dedicated 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 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.
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.
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:
- 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.
- 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?
- 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!