Introduction: Auto Door for Chicken Feeder

Anyone who has chickens has probably experienced rats or mice at some stage. They love to get into the chickens food at night and make a mess. Most of the rats I have caught in traps and have cleared but I know it won’t be long before they are back. I got sick of seeing their food scattered each morning so I decided to make a feeder which automatically closes at night.

The lid to the feeder is lowered once the sun goes down and rises each morning. This is done by a photocell or light sensor detecting whether it’s light or not through an Arduino. I'm very much a novice when it comes to Arduino, but after discovering the Control Servo With Light 'ible by quaddel and testing the idea, I knew it wouldn't be too hard.

The project box which has all of the electronics inside is connected to a 4” exhaust clamp that is used on trucks. This way I could easily remove it or change its position if necessary. The actual feeder is made from 90mm PVC pipe and is very easy to put together. You can find a 'ible here on how to do this.

The trickiest part of the project was to work out the best way to attach the lid to the servo. The solution I came up with works ok for the moment but I might have to revisit at some stage. The power source comes from a 12v battery that I'm using for my Automatic chicken coop door. I'm going to have to revise this though as it's drawing too much power, especially in Winter.

Overall I'm happy with the way that it turned out. It opens when the sun rises and closes when dark - exactly what it's supposed to do, and I haven't seen any rats around...

Step 1: Parts to Gather

Parts

1. Large project box

2. Arduino uno – eBay

3. Light sensor – eBay

4. Step down voltage converter – eBay

5. 4” Exhaust U Clamp – eBay ( you could probably get away with using a smaller on like 3.5”.

6. Wire connector – eBay

7. Servo – eBay

8. Servo arm – eBay

9. Blank circuit board – eBay

10. 10R resister

11. 5.5 x 2.1mm barrel jack – eBay

12. Coat hanger

13. 100mm PVC cap

14. 90mm PVC pipe

15. 90mm 45 degree coupling

16. 2 x 90mm screw caps

17. Various nuts and screws and bolts


Tools

1. Drill

2. Soldering iron

3. Dremel

4. Pliers

5. Drop saw

6. PVC pipe glue

Step 2: Getting the Servo to Do Your Bidding

The first thing you’ll need to do is to test the servo and light sensor set-up. If you look on the net for Arduino controlled servo and light sensor you will be able to find a few examples. I tested most of them and the one that worked best for me was on this website. The only thing I changed was the resister to a 10R one as the one they recommended was no good for this project.

Steps:

1. Watch the video that is loaded on the website. It’s only short but it will give you an idea of how it’s put together

2. Next check out the image they have of how everything is bread boarded and copy. I have also included the image below.

3. Test to make sure that the servo moves when the light sensor is covered. If everything works then it’s time to add the circuit to a circuit board

4. You can also play around with some of the values in the script to either make the servo move less or more.

5. You could also just use the simple code provided in the 'ible by quaddel This will do the job but will mean you can't play around with the variables (or not that I could work out any how!)

Step 3: Creating the Circuit Board

Once you have found (or created) the script that you are happy with, the next thing to is to make a circuit.

Steps:

1. With a small piece of blank circuit board, start to copy what is on the breadboard.

2. I used the jumper wires to make the connections to the arduino.

3. Carefully solder the wires into place and add the resister. I added some extra long wires for the light sensor.

4. Test and make sure everything works

Step 4: Making the Power Plug

I know that the arduino comes with a voltage regulator, but I wanted to make sure that I didn't blow anything. I decided to use a step-down board so I could ensure that 5V was being delivered to the arduino.

Steps:

1. To power the arduino I used a 5.5 x 2.1mm barrel jack.

2. Next get a spare USB cable and cut off one of the ends. Find the positive and negative wires and attach these to the barrel jack. You will have to test to ensure that you have the wires around the right way. Just plug the jack in and if it doesn't work, then reverse.

3. I tested everything by adding a 9v battery to the voltage regulator, plug in the USB and make sure that everything lights up on the arduino

Step 5: Adding the Servo to the Project Box

Steps:

1. In order to have the servo stick out of the project box, you'll need to cut a hole in it.

2. Use a dremel and cut through the plastic. make sure though you mark on the project box exactly how much to cut out.

3. I ran into a problem once I cut through the plastic as there was a plastic section in the way - check out the images below.

4. To fix this I just cut half way through the plastic pillar. This actually worked in my favour as the servo mounting points now locked into place behind the cut plastic and ii didn't even have to hot glue into place!

Step 6: Adding the Mounting Bracket (Exhaust Clamp)

I work in the transport industry and have access to truck parts. I decided to grab a 4" exhaust clamp and use this to mount to the chicken feeder.

Steps:

1. Mark out on the project box where to mount it too the clamp

2. Drill the holes and then mark and drill the clamp.

Now it's ready to mount. Don't do this yet though as you will need to do a few things to the box first.

Step 7: Adding the Arduino and Mounting

Steps:

1. Drill a small hole in the top of the box big enough for the light sensor.

2. Add some velcro to the bottom of the arduino and attach to the bottom of the box.

3. Hot glue into place the light sensor.

4. Find good homes for the circuit board, voltage regulator and tuck away the wires.

5. To be able to connect the arduino to a power source add a couple of wires to the regulator and drill a hole in the side of the box for these to come out of. Attach a connector to the wires. You will need to attach the other end of the connector to a length of wire which will be connected to the battery.

you shouldn't have any issues fitting everything into the project box.

Step 8: Adding the Arms (First Try)

First try didn't go so well...

1. Obviously on the servo side you can just add a servo arm. You can see from the first picture how I first tried to add the wire for the lid to the servo. This didn't work in the end so I just zip tied and hot glued into place.

2, For the other side I was going to do something similar as you can see but this didn't really work either. It probably could have though if I used larger terminal sections (those gold bits)

Step 9: Adding the Arm (The Version That Worked)

Steps:

1. Attach the metal servo arm to the servo.

2. Next I pulled apart an old servo and used the gear and attached a plastic servo arm to the end.

3. Once this is done, drill a hole in the side of the project box and push through a bolt. Add a bolt to the end and do this up so it is flush with the box. This creates the axle for the gear to be attached to.

4. Lastly, with some pressure, carefully turn the bolt with a screwdriver and force it into the of the gear.

5. Add some hot glue to the bolt and gear to keep everything in place.

6. Next, attach the project box to the actual chicken feeder. This way you can work out how long the wire arm needs to be for the lid.

Step 10: Adding the Lid

Steps:

1. Cut and straighten out a coat-hanger

2. Bend into place so the wire is touching the top of the lid as shown below.

3. Attach the wire to the servo arms. This was a little tricky and I would have liked to have come up with a better solution. In the end I just zip tied and hot glued the wire arm into place. It did the job but I will take a bit to replace if necessary

3. Mark out on the lid where you have to drill and go for it.

4. Attach the lid with some zip ties.

Done...nearly.

Step 11: Getting It Going

So you've finished and it's time to add some juice and get the ting to work

Steps:

1. Attach the wire that you added the connector to the battery

2, Next connect the connector from the feeder to the battery connector.

3. Test by putting your hand over the light sensor and make sure that the lid closes over the food section. remove your hand and the lid should lift up. If you need to adjust then you can move the project box up or down the feeder. If the lid doesn't go down far enough, then you will need to do some adjustments to the script. It's not a big issue, just means you will have to plug the arduino in to the computer and play around.

Things I'd do differently next time

- As mentioned previously, I attached the feeder to a battery that I'm using for the auto chicken coop door. This drained the power faster than the solar panel could charge so I had to come up with a new solution.

- I would have liked to have figured out a better way to attach the arm to the servo. my way worked but it was a little messy.

- The script worked ok but I just don't know enough about scripts to make it work really well. I will probably update the script once I have better knowledge on how they work.

Comments

author
redkcir (author)2016-05-02

Cool design. I am thinking of using it with a slight mod. My ducks won't go in a coop so I need a feeder that stays outside. I am thinking of adding a water sensor to close it if it rains as well. I have power for my heat lamps in the coop so I can power an Arduino from there (no battery issue). I should have enough I/Os to add an automatic door for the chicken as well (they have a separate run). I am pretty new at codeing but I think I can get it to work!

author
lonesoulsurfer (author)redkcir2016-05-03

Cheers,
I recently made a more simpler one which can be found below.
https://www.instructables.com/id/Super-Simple-Chicken-Feeder/

It's worked really well so far and the girls don't mind sticking their heads into the holes.
Also, I've done an auto chicken coop door as well! you can find that 'ible below
https://www.instructables.com/id/Simple-Automatic-Chicken-Coop-Door/
It's a simple design but works really well.

author
Sanderv2 (author)2015-09-04

If you used the exact code you linked it is not weird that the battery drains quickly. The code insures that every 15 milliseconds the value of the LDR is measured and processed, this requires electricity. The best way to tackle this is using a timed-out sleep mode, but that can be a little tricky if you're not used to programming. Another solution is to increase the delay dramatically to about 60 minutes instead of 15 milliseconds. It doesn't matter if the lid closes 30 minutes later anyway! The seconds option doesn't work as well as the first but should still increase the battery life!

About Arduino sleep mode: http://playground.arduino.cc/Learning/ArduinoSleepCode

author
dpatterson13 (author)Sanderv22016-03-07

Thanks for that link!

author
lonesoulsurfer (author)Sanderv22015-09-05

Thanks man - Appreciate any help I can get with the script! Think I'll try the delay idea first and see how that goes

author
darrenhall (author)2016-02-28

Great Instructable - have looked at all of your builds and they are very cool - you have a real nice mix of low tech meets high tech.
This is probably a terrible thing to say but do you have another feeder that has a chopper instead of a door - for when ya fancy chicken for tea - - peck, peck, shhhhwwiiinnngggg!!, plop!.

Nice build.

author

haha - there's a mini guillotine that I'm putting together for that purpose.

author

Ha! - not sure I want to see that build till the drumsticks are on the table - - lol.

author
SwiperF (author)2015-10-15

Maybe we could replace all those electronic parts with:

*Servo/motor and servo arm

*Lid

*Solar Cells

With the Sun shining on the Solar Cells, it will activate the servo swinging up the servo arm with the attached Lid to a certain degree.

You can put a limiter to a certain height or degree so the servo arm will not rotate fully. Just like an electric fan will not rotate continuously if you put your hand/fingers before you start it, and you can hold it in place as long as your hand is in its path blocking its rotation.

When there's no sun (night/eclipse/rain/dark clouds) there is no power to the servo, the Servo arm will swing down because of its weight and close it with the Lid.

author
Daedalus62 (author)2015-09-03

Good thinking and nice work, lonesoulsurfer. Congrats.

Seeing the trouble you had with the servo/lid attachment, just wondering if a different configuration would be better... Instead of lowering/lifting the lid, maybe a sliding door configuration... Just a thought...

I also have chickens and I had the same problem... Not with rats (luckily!), but with a flock of wild turtledoves that ate all the chicken feed... I´ve made my version (simple to make) of the "trigger-feeder"... Best thing ever!... No more rats/birds feeding or wasted feed, problem solved!

No affiliation to this brand (I've made my own!), but see it here in action:

https://youtu.be/f6Bd33Zka1I

author

Wow - I've never seen one of those before - great idea! Might have to look at making one myself.

I've still got issues with birds as well but it is cockatoos coming in and stealing the food!

author

I tried a different number of things before I settled on this... Simple to make and works great... No critters feeding and no waste!

I did mine with a plastic bucket, hanging from a tree... Some shots:

DSC015951_zpsg9pxoved.jpgDSC015931_zpsz5u4ok86.jpgDSC016001_zpsg8aukyuw.jpgDSC016011_zpsjttro99a.jpg
author

so simple! I'm assuming the chickens work out how to use it easily?

author

At first I had to show them a few times, wiggle the trigger so feed would fall at they're feet... Once a couple of them get it all the others just follow!

Yes, really simple... The only bit that requires some fiddeling at start is getting the size of the hole in the bucket right... Some feed should fall when the trigger is pecked, not so much as to make waste... Start with a small hole and experiment... Mine (I have medium size corn in there) is around 2 cm diameter.

Cheers!

author
Joe Juarez (author)2015-09-05

I solved the feed scattering problems by securing a piece of 1-1/2" x 1-1/2" weld wire by installing just enough of a short nipple into the feed delivery 'Y' to allow a I/2 " lip in which to drill the 4 holes necessary to fit the wire through at the corners.

One might consider installing pop rivets in the drilled holes as preventive re-enforcements.

My feeder works well, now that I have installed the weld wire.

author
mmckercher (author)Joe Juarez2015-09-08

Chickens scratch thru horse poop too, and they taste yummy! Those are called free range chickens, in case your wondering!

author
mcraghead (author)2015-09-08

Awesome!

author
DDW_OR (author)2015-09-03

another way to prevent rats and mice from eating the chicken feed is by adding chilly powder with high levels of capsaicin. it will not effect the chickens.

author
Treasure Tabby (author)DDW_OR2015-09-06

I found that this does not work. With squirrels anyways. Probably doesn't work with rats either. Just scares away birds. :( The rodenst around here apperiently like spicy food.

author
mlaiuppa. (author)DDW_OR2015-09-05

Will it effect the flavor of the eggs?

author
lonesoulsurfer (author)mlaiuppa.2015-09-05

Chilli eggs! Might also add some curry powder...

author
DDW_OR (author)lonesoulsurfer2015-09-05

I assume you're being facetious?

the main ingreediant in chicken feed is corn. Eggs do not taste like corn

author
Joe Juarez (author)2015-09-03

to keep the chickens from scattering the feed by shoving their heads into the feed and catch it with their head and neck hackles , I use 1" by 1" weld wire. I drill 4 holes 90degrees apart around the bottom of the toilet "Y" slip collar and install the pre-cut weld wire. I have left the corners with tags to bend out and run out through each drilled holes then I twist them down onto a washer that I placed overreach hole (you can get go with what you have, any toggle will do). This way the chickens can only get their heads just deep enough into the feed to get a good mouth full.

author

Love it - do you have any photos? Still have issues with food being scattered by the girls when they eat

author
juicer62 (author)2015-09-03

I have a similar problem with my cat's food at night.....except another cat comes by and eats the food. I solved the problem in a much more simpler...and analogue way. I used the switch circuit from a nightlight that has the auto light sensor circuit. I opened it up, checked the power requirement to the circuit then matched it with a 5 volt dc supply. The out put for the bulb power is used to switch on a small dc motor that places and removes the food cover over the cat's dish. I made a slight adjustment to the light sensor with a 50 ohm resistor.

author
lonesoulsurfer (author)juicer622015-09-05

Cool idea. So the food is covered once it turns dark?

author
bengodwin (author)2015-09-03

This is fantastic. Would save a lot of work too. I'm an electronic, panel board, solar light 'IDIOT' though. You should consider making these (less the feeder portion...I can do that) and selling them!

author
lonesoulsurfer (author)bengodwin2015-09-05

Cheers. This is really a first try and it's still needs a little finesse. Once I have the process down I'd more than happy to sell aa few.

author
Treasure Tabby (author)2015-09-02

Love this. Brilliant! I use to have chickens when I was little. I also and still currently have doves. (Not the chickens sadly.) Some even from my childhood. That's how old a few are.

Anyways I would love this for my doves but the problem is they have this thing for pooping on every thing. They also don't eat in an orderly fashion. Its easy to contain water in bottles on the sides of the cage indoor or out but not really the food. Still looking for a solution for my doves food not being pounced upon by mice.

author

Thanks! Still have a few problems with grain being spilled by the chickens but I haven't seen any mice or rats around since I installed it so I think its working ok.

author
DarrinP (author)2015-09-03

But you will still have food on the ground that the chickens spill

author
namora (author)DarrinP2015-09-03

The lid will not prevent that, however a suitable piece of plywood with raised edges placed on the litter underneath will let the chickens find the spilled seed . Good practice no matter what type of feeder is used.

About This Instructable

39,980views

335favorites

License:

Bio: I've always liked pulling things apart - it's the putting back together again that I have some issues with.
More by lonesoulsurfer:Simple Metal LatheElectric Drift Trike Uber Lighter 2.0
Add instructable to: