Introduction: Automatic Chicken Coop Door - No Programming Needed!
I started the process of automating my chicken coop door many years ago. After many failed attempts, I found the following video that didn't require any computer controls and seemed within my reach.
However, there was no wiring diagram and I found out that the daylight sensor would activate the door too early in the evening, so I had to modify the photo resistor so it would close slightly after dark. The last reason for this build is that there was an antenna motor used in the original build and after 4-5 months, the gears stripped out and the door quit working. This build is based on a vertical sliding door. You will need approximately 12-16” clearance past the actual coop door for the mechanism. It can be adapted for a horizontal sliding door. This build will focus on the door controller, but will briefly address other items necessary for a completed project. You will need 120v AC power at your chicken coop to complete this build.
Step 1: Tools and Parts Lists
Soldering iron and solder
Electrical test leads (helpful, not absolutely necessary)
Hot glue gun
Drill, drill bits
Tap and die set
woodworking tools if you’re building the actual coop door
Materials needed (with links when possible):
12v power supply (I’m using an old Wii power supply that’s rated for 3.7 amps)
12V Car LED Light Control Photo resistor Plus Relay Module –
3 micro switches - https://www.sciplus.com/defond-momentary-3a6a-mic...
Extra photo resistors https://www.amazon.com/HOODDEAL-Sensitive-Resistor...
These items can be purchase at your local big box store:
20 ga. door bell wire
Wire connectors [pictures E, F] (make sure you get the 1/4" male and female quick connect - I had to go back to the store to get the correct female connectors...)
1/2” Threaded rod
pipe nipple 1/2x3” galvanized [picture G]
Plastic case to house the controller
Step 2: Preliminary Stuff for This Build
I’m using an existing sliding coop door, and will be retrofitting this to work. I won’t spend a lot of time on this since this Instructable is really about the electronic controls to make an automatic door. Here’s a synopsis of the door modifications:
A. I used some aluminum angle that I had in my garage to make 2 brackets and used a 1/4” bolt to attach the motor to the brackets. This was screwed to the top of the door frame.
B. I needed to extend the shaft on the motor, so I took a 3/8x3 galvanized nipple and drilled and tapped holes in it so I could use machine screws as set screws to lock it onto the shaft. I used 1/2” all thread rod as the extension shaft. I also had to drill out the inside of the rod to get it to fit well onto both shafts.
C. Finally, I made a mounting block to hold a 1/2” nut for the shaft to run through to raise and lower the door. You can temporarily attach this to the door using a hot glue gun. The block should be set halfway up the threaded rod and in the center of the door. That way, when testing the movement of the door and limit switches, you’ll have time to unplug the controls if needed. It can be removed with a putty knife later if needed to adjust the range of motion.
Step 3: Now, Onto the Electronics!
Step 1. Look at the back of whatever power supply you are using to determine which part of the plug is positive and which is negative. Since this is low voltage, I just crimped a wire a little bit so that I would get good contact with the output and pushed it into the hole in the plug. Then I bent the wire over and taped it well with electrical tape so that the wires wouldn’t come out. Use red wire for the positive and white wire for the negative.
Step 2. On the end of the red wire, use a wire nut to add on 3 more red wire leads. On the end of the white wire, add on 2 white leads [not shown].
Step 4: Wiring the Daylight Sensor
Step 3. Connect one of the red wires and one of the white wires to the power terminals on the daylight sensor. Red will connect to the lug labeled DC+, white will connect to the lug labeled DC-. If you plug in the power supply, a red LED will light up. This is the power indicator. Covering the photo resistor on the daylight sensor should cause a blue LED to light up. There is a sensitivity control near the plug for the photo resistor. Use this to control the light level that triggers the sensor to switch between light and dark.
Step 4. Take another of the red wire leads from Step 2 and connect it to the COM terminal on the other end of the light sensor. Add another red lead wire to the NO (normally open) terminal. This will connect to the relay to control the opening or closing of the door. The daylight sensor is completely wired.
Step 5: Wiring the Relay - This Is the Part That Controls the Direction of the Motor
Note – All connections to the relay and the motor will be made using the female quick disconnect connectors. Strip off about 1/2” of the insulation. I usually fold the wire over to give a little more to crimp onto, and then crimp the connector onto the wire with a pair of pliers. For the remaining red wire from Step 2, put on 2 connectors as in the 2nd picture above.
Step 5. Now to wire the relay. The relay is labeled on the end opposite the pins with pin numbers. Also, pins 7 & 8 are oriented differently than pins 1 – 6. Per the wiring diagram,
A. connect the remaining red wire from Step 2 (now with 2 connectors on it) to pins 1 & 4.
B. The red wire from the NO lug on the daylight sensor will connect to pin 8.
C. One of the white wires from Step 2 will connect to pin 7.
D. Finally, run a red and a white wire from pins 5 & 6 to the motor. (Use enough wire to reach from the motor to where you want to mount the controls.) At this point, don’t worry about which wire connects to which motor terminal.
This turns into a rat's nest pretty quickly so follow the wiring diagram closely and add labels as needed to help you keep track of your wires.
Step 6: Limit Switches - Control the Distance Your Door Moves
Step 6. Limit switches – Using the multimeter set to ohms (resistance), check the microswitches to determine the normally closed (NC) terminals. In this case, when I connect my meter to the outside terminals, it reads 0 ohms when the switch is not pushed and 1 when it is pressed. I want to connect to these 2 terminals.
A. Using a similar amount of wire that was used to run from the relay to the motor, solder a wire to these 2 terminals on one switch. This will be the “open” limit switch.
B. Also using a similar amount of wire, we’ll wire in 2 limit switches for the “closed” limit switches. Solder one wire to each switch. Then solder a jumper approximately the width of the door. In my case, the jumper was about 8” long. (Note – I added the 2nd switch as a revision to my initial build, so I have an extra wire nut you shouldn’t need)
Step 7. Take one of the “open” limit switch wires and attach it to pin 2 on the relay and one of the wires from the “closed” limit switches and attach it to pin 3. Both of the other wires from the limit switches will be connected to the last white wire from step 2 by another wire nut
Note- I cut into the motor wires and limit switch wires and added quick connectors so I can disconnect these easily at installation for routing wires as needed. Make sure to clearly mark which wires pair up so that there's no confusion later.
Step 7: Testing Operation of the Door
When testing the operation of the door, be prepared to kill power quickly if something doesn’t work as you would like! This motor has a lot of torque and something will break if it doesn’t shut off when it’s supposed to, and can trap and/or damage hands or fingers that get in the way.
Step 8. Plug in the power supply and the motor should start to rotate. Without the photo resistor on the daylight sensor covered, the motor should open the door. By covering the photo resistor, the motor should reverse and close the door.
**Troubleshooting** If the motor is closing the door when the photo resistor is not covered (only the red LED is lit) reverse the wires on the motor leads.
Step 9. Confirm operation of the limit switches.
A. Turn on power and with the door opening, press the “open” limit switch. This should shut off the motor. If it doesn’t, press one of the “closed” switches which should shut off the motor.
B. Now, if you cover the photo resistor, the motor should close the door and either of the “closed” limit switches should shut off the motor. Again, if they don’t, press the “open” limit switch and it should shut off the motor.
C. If the switches operated correctly, you’re done with this step. If they were opposite of what they should have been, remove the wires from pins 2&3 on the relay and reverse them. This should fix the problem. Go back to Step 9A and check that they work correctly.
Step 8: Placing the "open" Limit Switch
Step 10. I made a small wood block that would hang over onto the frame of the door and attached it with hot glue. Now let the door open to the maximum opening for your space and kill the power. Set the switch into place on the door frame so it is pressed closed against the block of wood and glue in place with hot glue. If you cover the photo resistor to make the door close and then uncover it, the door should stop when the block of wood contacts the switch. If not, kill power immediately and check placement of the switch. Once you are happy with the operation of the switch to shut off the motor when the door is fully open, use some brad nails to secure the switch through small holes in the switch body and add screws to the block of wood to secure it to the door.
Step 9: Installing a "pressure Bar" and the "closed" Limit Switches
Step 11. You could use a single switch when closing the door similarly to the “open” switch, but if anything interferes with the door so it doesn’t hit the closed switch, something will break. To try to prevent this, I used two pieces of wood approximately 3/4” wide that were about 1/4” shorter than the width of my door. I drilled two 1/4” holes in one [A] and smaller holes into the other piece [B] so that the holes lined up. I had some 2” bolts and threaded the bolts into the small holes in [B] through [A]. This allows [A] to slide on the bolts. Use a little hot glue to keep the bolts secured in [B]. Using hot glue, I attached [A] to the bottom of the door so that [B] hangs slightly below the door. I glued on a spacer by each bolt and glued a limit switch to the spacer so when either end of [B] is raised, one of the switches will shut off the motor. Once you are happy with the operation of the bottom rail to shut off the motor if anything interferes with the closing of the door, secure the switches with brad nails and rail [A] to the door with screws. I used some hot glue to secure the wires to the door so they wouldn’t tangle with the motor shaft.
Step 12. Adding extra photo resistors – carefully unplug the photo resistor from the daylight sensor. Using a small jeweler’s screwdriver or other pointy object, press out the tabs that hold the wires in the plastic plug and gently pry open the crimped ends of the connector. Solder a 6” piece of door bell wire to the connector. Be careful to not use too much solder since that will prevent the connector from going back into the plug. Do this for both wires. On the other end of the 6” leads, attach 2 extra photo resistors using wire nuts. Add more photo resistors as needed.
There will be a little trial and error to get the correct number of resistors for your location and to adjust the sensitivity control on the daylight sensor.
Final steps – You should be ready to install the coop door. I will be installing the controls in a plastic box on the outside of my coop so I can see the LEDs at night to know if the door is open or closed and for easy adjustment of sensitivity if needed. Route the wires as needed to get from the door assembly to the location where you want to mount the controls. At the very least, the photo resistors need to be installed outside or at a window facing out. Even if you don't put the controls outside your coop, I recommend putting them inside a box of some sort to keep them clean and free of moisture from the chickens.
Participated in the