Instructables

How do I make an automatic door opener/closer for a chicken coop that opens in daylight, and closes at night?

My chickens are really good to me, they are keen to expore my garden when the sun comes up, then put themselves away at night.
The trouble is, one night I forgot to close the door into the coop and they all got eaten by a fox.
I've seen automatic opening/closing devices for sale, but they're really expensive.
An example of these devices can be found on http://www.axt-electronic.de/index1.htm
Any help greatly appreciated.

seandogue5 years ago
A solution could be as easy as a swinging chicken wire gate run by a small motor, pulleys, and rope, using a CDs cell for sensing the day/night condition as a switch. spring loaded Limit switches at either end of travel would shut the motor off and switch it's operation for the "next" direction using a latching relay circuit.
Nemesis201077 (author)  seandogue5 years ago
Thanks for the input, I think I'm goint to need to spend some time with a friend who knows something about electronics.

I'd like to have a go at making ths device, but don't know how I would construct the circuits you mention.

If you, or anyone is able to design a simple circuit diagram for this project that'd be great. I'd probably get the components from Maplin.co.uk, who have some pre-made circuits too, which may be useable.
I've done the electronics with a light sensor and 2 direction dc motor. It runs using a picaxe 8 pin chip.

I'm really struggling with the opening mechanism. Pulleys should be easy - right. Mine keep jamming or slipping. Any ideas on the mechanics of opening the door?
Nemesis201077 (author)  headingwest1 year ago
maybe have a look here
http://www.instructables.com/id/Arduino-Chicken-Coop-Controller/

You may need to consider a counterweight for the door so it's not pulling on the motor.
I'd also considered using the door horizontally on draw runners and having the motor turn a threaded rod pushing and pulling the door.

I've still not built one of these yet, I just haven't had time to set everything up. Would be interested in seing your circuit diagram for the picaxe and how it works.
Thanks for the lead. That lock mechanism is cool.

I did a quick schematic for the picaxe - attached. It uses a L293D so your motor can be a range of voltages. I believe cross connecting each pin on the L293D as shown doubles the current to 1.2A.

The L7805 drops your input to 5V for the chip.
chicken-bom.jpgChicken-gate_schem.jpg
Nemesis201077 (author)  seandogue4 years ago

I've recently started to compile a few circuit diagrams, but nothing concrete yet. I was thinking of a light sensor connected to a relay opening the door on light, then closing on dark. This would need to be adjustable, so I guess a potentiometer?

Then we need a 12V dc motor that can operate in forward and reverse, some mechanics for the system and microswitches to stop the motor when the door reaches the open or closed position.

I'm also thinking a visual indicator (Green & Red LED's) could be useful so I can see if the coop door is closed at night, Red for open, green for closed.

Finally a solar charging system to ensure the battery is kept topped up might be a good addition.

See, the plan is gettig there, now all I've gotta do is figure out how the heck I do it. Lol

Generally speaking CD cells are used with a threshold detector circuit, (search term hint) where sensitivity is, yes, controlled by a potentiometer.

RE: color. might be of value to do a few quick searches about color and chickens. Never know if maybe one of those colors at night might freak them out and reduce egg laying or something. I could be way off base, but I have no idea about raising chickens, but I have heard thing along the way about flight/fright responses of various lifeforms (I was going to say wildlife, but humans also respond to certain cues...) If you don't find something  (what frightens chickens? search hint), then ignore what I said and go for it.

The first thing you might want to do is rig up breadboarded versions of the various parts...build the light detection circuit (tons of plans on the net), choose a motor and design (by doing) the motive mechanism, etc. Try not to box yourself into a corner by relying on your ignorance as an underlying "excuse"...That is, many people fail to do things because they're not already expert and are afraid of failing, or worse being seen to have failed...bad mojo for creativity. Failure isn't a bad thing, and you learn from it.

Anyway, sounds like you're on the right track. best of luck.


Nemesis201077 (author)  seandogue4 years ago
Hey Sean, I've got a circuit which I think may work for this project. It's based on a reversing switch timer circuit I found, but I'm not very go dwith this stuff and could use help from someone who could sugest a layout on stripboard. The motor is switched by two single pole change-over relays in an 'H arrangement. Normally, the two ends of the motor are connected to 0V. When one or other of the relays is energised, the motor will turn one way or the other. IC1 is a 555 timer wired in a bistable mode circuit. When IC1 is triggered, it switches on REL1. It is triggered 'on' by taking TR to 0V, and reset to 'off' by taking RES to 0V. When TR and RES are both at 12V, the IC stays in its last commanded state. IC2 is wired in an identical circuit. This is how it operates. Assume the door is at the top. The limit switch S4 was closed when the arm hit the top stop. The time switch has just put 12V on to the supply rails and the 555s are powered up. The capacitors C1 will hold the TR pins low for a split second and IC1 will be triggered on. The same would apply to IC2, but it cannot be triggered on because S4 is closed, keeping it in its reset mode. REL 1 energises and S1 changes over and puts 12V on the LH side of the motor while S2 stays unchanged, so the RH side of the motor remains connected to 0V. The motor starts to run, taking the door down. The limit switch S4 opens up but IC2 can't trigger on because C1 has charged up via R1 to 12V, so TR is no longer at 0V. The motor will continue to run until the arm is at the bottom. Then S3 will close and reset IC1. REL1 will de-energise, S1 will change over, and the motor will stop. There it will remain until the timer ends and the 12V supply to the 555s is disconnected. Next time the timer comes on it will be IC2 that is triggered (IC1 cannot trigger because S3 is closed). REL2 energises and S2 changes over, turning the motor in the opposite direction. The arm will rise until the top limit switch, S4, closes and resets IC2. Then it will stop, ready for the next timed period. So now we are back at square one. I've included a diagram. I did try to use Lochmaster to plan the layout, but am judt not sure of the connections etc. Do you know a simple way to show how to lay out the components and what connects to where so I can follow it easier?
555_motor_reverse_2_revised.gif
BTW, when I say "breadboard" I want to make something clear that might help you get moving on the project.

Breadboarding doesn't mean soldering. It means (fr electronics), using literal "breadboards" for building temporary circuits. Same can be said for developing the electromechanical items (motor circuit and drive elements.

In these cases, rough build is fine, in fact, often encouraged. One does not want to cause safety issues, so safety must be kept in mind, but otherwise it's just a matter of hooking things up "well enough" to make them go. That way, they can be disassembled and reconfigured during the design/debug process with a minimum of effort. it also makes it more likely that something gets done, since the components do not become commited like they would if you were doing a final build, so you don't have to worry so much about taking that <insert item> you paid several dollars for and don't want to end up in a trash heap or the bin or "i'll get to those laters" that have a way of growing for inventive types.
My wife and I recently moved to a 12-acre homestead in the western Minnesota countryside. We looked forward to the freedom of country living after chaffing a bit at the restrictions and regulations of owning lakeshore property. Having heard friends praise the virtues of free-range chickens we were inspired to try our own hands at raising chickens. So, we remodeled a 8’ X 16’ shed into a hen house. Poking around the few acres of windbreak on our new property, we found 3 abandoned galvanized steel nesting boxes. With a little work using a few boards to replace the rusted out bottoms, we had 20 nesting boxes for our future flock. A friend donated what amounted to a starter flock of mixed heritage. He probably has over 100 chickens clucking and pecking around his yard. He never eats them, preferring the eggs. He never can find all the places the chickens hide the eggs so, quite often, he has a new brood of chicks following around the mother hen. They are getting rather plentiful. Giving us 2 gunnysacks of chickens, we thanked him profusely. Arriving home we released the gunnysack’s stuffings. To our surprise there were 23 chickens in those 2 gunnysacks. The next day, checking the progress of the chickens we found 4 eggs in the nesting boxes! Due to this gift, quite quickly, we had a small flock of various and colorful chickens but didn’t have chickens of the larger breeds preferred for meat production. So, we purchased 50 Cornish Rock Cross chicks for meat and 6 Leghorns for future laying hens. These pure white chicks were certainly plain compared to the colorful birds we were given but boy do they grow! Many evenings we hear coyotes howling in the nearby river bottom and had some concerns that we might lose quite a few chickens to predators. One of my daily chores was letting the chickens out each morning and night. It’s important that the chickens have a safe place to come home to roost. Because of our precautions we haven’t lost a single bird to predators. Well, it’s not really a chore. Our adventure with our chickens has been a pleasure. It’s sort of nice listening to their cock a doodle doo as I open the door in the morning. They entertain us as they hunt and peck all day working for the morsels of squirming food that they so enjoy. Free-range chickens and eggs do taste better than factory chickens and eggs. The difference is obvious when you compare factory eggs to our chicken eggs. Knowing that our chickens enjoyed a life in the outdoors chasing bugs rather than a sterile confined life like most of their cousins live seems to make our relationship with our food source a bit less one sided and fair. Besides, the only way I know to turn ticks into something useful is through a chicken. But opening the door to the hen house each morning and evening does restrict our freedom. We enjoy the freedom we’ve found since our own children have flown the coop. Our empty nest allows us not only an evening out but also the ability to travel for a week or more to see other areas of this beautiful country in which we were so fortunately born. There just aren’t too many people willing to show up at our place each morning at dawn and each evening at dusk to open and close the door for our chickens. I hatched a plan. I needed a mechanical servant to open and close the door. Still unpacking boxes from our recent move, I saw the photoelectric switch we used to turn on and off our Christmas lights each morning and night. Controlled power just at the times we need it! I was pretty confident that using that photoelectric switch along with a pneumatic cylinder, an electric solenoid valve and a few other parts that I could build the mechanical servant I needed. Measuring the distance between the studs of the chicken coop, I made a frame to match and about chicken high. Added a hinged door that opened like a drawbridge. Mounted a 6” X ¾” double acting pneumatic cylinder between the door and the frame (using a trial and error method to position it so that it closed and opened fully) with a bolt being used as a shaft for the clevis at the end of the cylinder rod. Having decided to use a double acting cylinder I needed a 2-position 4-way solenoid valve to properly operate it. This type of valve has 2 pressurized air outlets. One outlet allows pressurized air to flow into it when the solenoid is activated and the other outlet is pressurized when the valve is deactivated. There are 2 exhaust ports that allow the previously pressurized side of the pneumatic cylinder to release the air that pressurized it. I sort of realized that I needed to slow down the flow of air to the pneumatic cylinder or else I might have a chicken guillotine rather than a door. So, I put a needle valve air supply to the solenoid valve. (Note the final design with two needle valves on the outlet.) Soldering the solenoid to an electrical plug I chopped off of an old extension cord, allowed me to bench test the action of my contraption. First tries often don’t work. Apparently, solenoid valves use air pressure along with an electric coil to open and close the valve. Restricting the air source into the solenoid valve doesn’t work. Understanding the initial design problem and feeling a bit cocky, I opened the needle valve quite a bit and then plugged in my mechanical servant. With my wife holding the frame, my initial concern just about became a reality. The door slammed open wrenching the trim boards that it was mounted on. Surprised at the violence, I quickly unplugged it! The door slammed closed further wrenching the trim boards and narrowly missing my wife’s fingers. We both had visions of chickens being crushed or catapulted by the 2 X 6’s I had joined together for a chicken door and I was made acutely aware of how I almost had the opportunity to enjoy holding my wife’s hand while she gently squeezed mine with the nubs she had instead of her fingers. I certainly didn’t feel like the king of the roost at that moment. In fact, I was feeling just a little bit hen pecked. I think I even heard my wife say something about a dumb cluck. Taking a break from the arduous tasks of inventing, I did a little deep thinking about chicken door designs and safety. Our little problem with the operation of the chicken door was solved by putting 2 needle valves on the outlets of the solenoid valve and some rather profuse apologies to my wife. Making sure that the needle valves were just about closed and feeling a bit less than cock sure, I carefully positioned my fingers as I held the frame while my wife plugged in activated the solenoid. With no further mishaps and a few adjustments the door opened smoothly and slowly. Success! Well, it didn’t take too long to cut a whole in the wall of our hen house, install the door, the photo switch (on the outside of the west wall so the door was open as late as possible), install the solenoid and connect everything up to electric and the air compressor. The task would have been quite a bit easier if we had had electricity in the garage attached to the chicken coop. Some things aren’t easy, or cheap. The project actually took more than a little scratch. But buying a little freedom from one of the daily chores of raising our chickens seemed worthwhile. Freedom isn’t free. Parts for this project were primarily from Grainger that sells online at www.grainger.com so they are available to all readers. Parts list: Air Cylinder 6” X ¾ 6W129 Pivot Bracket 6W163 For attaching one end of the cylinder Clevis Rod Kit ¾” 6W164 For attaching the other end of the cylinder to the bolt shaft. Coil Connector 2G505 The plug attaching the cord to the solenoid coil. Needle Valves (2) 6MM63 Attached to the solenoid outputs to control air flow Connector pack 4HN10 Push to connect fittings for attaching the ¼” tubing to the solenoid and cylinder Solenoid Valve 2F969 Sleeve 2P211 Extra compression fitting ring for ¼” tubing. These are a one-use item. The extras allow for bench testing. Tubing Insert 2P207 Support for tubing connected by compression fittings Nylon 11 ¼” Tubing 4HM08 Christmas light photo switch Available at many stores this time of year. In addition to these specialized items, I used a ¼” bolt as a shaft through the Clevis fitting, some hinges for the door and various nails and screws to make the frame. In my situation I also needed to use a ¼” X 1/8” bushing to allow the tubing connectors to connect to my air compressor. Chickens and people have lived together for thousands of years. Raising chickens we discovered some of the history of this long relationship buried in our language. Chickens have contributed to the quality of our lives and our culture.
Bench Test.JPGSolenoid Valve.JPGTimer.JPGInstalled.JPGPhoto Switch.JPGClevis Anchor.JPG
Sweet! I'd suggest that you repost the content to a reply to the original author though. I was just giving him ideas. Perhaps he could benefit from your experience, although he may not ever see it unless there's a reply from you to his query. best wishes
jakedixon4 years ago
hey I have a simple scat. PM  your e-mail and I'll send it you,