# Lifestyles & Discussion > Freedom Living >  Automatic Chicken Door (Arduino)

## TruckinMike

Hi y'all,

I just thought I would post my latest project. Yep, its an automatic chicken door. 

I have been having problems with my chickens laying eggs all over the place as a result of their PTSD. Yes, they have been at war, and with many casualties. From raccoons to Opossums to coyotes. After being attacked in their coop they are reluctant to go back. Thus, they end up laying eggs everywhere. However, for the past couple of months I have been re-acclimating them with their coop. I locked them up. 

Since then I have been learning to program Arduino micro-controllers. My first project was a voltage regulator for my 1973 military 3 phase diesel generator(have pics if you would like to see), and the chicken door was my second. An automatic ball thrower for Captain Parker will be number three. 

The arduino boards are really nifty, they have very handy 10 bit analog input pins. Max voltage in is 5 volts DC. By simply using a voltage divider(and transformer/rectifier for a/c voltage) in your circuit you can easily monitor any voltage. From sensors to whole house voltage to generators to photo-resistors etc..

I don't know how to explain the usefulness of learning to program arduinos, but from this post it should be self evident. You can do damn near anything that you can conceive... well almost. LoL.

Anyway, about the chicken door:

The top left pic is of an actual Arduino Uno, the mainstay of the arduino fleet of boards. The next pic over is a close up of the finished control board for the chicken door. You will notice that the arduino on the controller board is not the same as the Arduino in the first pic. This arduino is much smaller, and cheaper, $10 as opposed to the $25 arduino uno. It is a "Trinket Pro" arduino board, by adafruit. For the most part, the same code will work for the trinket pro as the uno. With the exception of a few input/output and serial pins. 

This project cost me around $75 not including the battery. The worm gear motor (for an electric seat) $15, automotive trunk/hood hydraulic ram $20, (3)  SPDT 12v automotive relays $15, the arduino $10, the pulleys $9, spring $1, 1/2 size proto-board $3, Mason jars $4..?, plus the lumber and a battery.

If anyone would like the code or schematic (hand drawn pic) I can post it as well.

Enjoy,

TMike

CHicken door collage by Truckin&#x27;Mike, on Flickr

----------


## Sola_Fide

Wow.  That's amazing man.

----------


## ClydeCoulter

Is the door timed or are you using a photo-resistor to determine when to open and close it?

----------


## fisharmor

The mason jar is genius.

I've been meaning to look into these to make my own pwm controllers, but I need another project like a hole in the head.

----------


## TruckinMike

> Is the door timed or are you using a photo-resistor to determine when to open and close it?


I am using a magnetic door sensor that makes contact upon closing and a tilt sensor for door open. Both sensors go to ground (or "LOW") when they make contact. Arduinos have a built in "pull-up resistor" on the input pins that pulls voltage "HIGH" through a 20k resistor. When the sensor goes to ground the input pin then goes "LOW". "LOW" is my test for open or closed.

EDIT: I'm using a photo-resistor value for sun-up and sun-down triggering.  




> The mason jar is genius.
> 
> I've been meaning to look into these to make my own pwm controllers, but I need another project like a hole in the head.


Arduinos use  500 hz 8 bit (0-253) PWM (16 MHz). Thats what I used for my generator voltage regulator. If you have any programming experience at all you'll find that arduinos are very simple ...with a short learning curve. At least for simple projects like mine. Controlling addressable LEDS, serial communication, etc can be a bit more challenging.

I'm still on low side of the curve. ha ha.

----------


## TruckinMike

> Wow.  That's amazing man.


  Thanks.


 a little history:

Arduino was conceptualized by folks that saw a need for a simpler way of exploiting the power of micro-controllers for the student, hobbiest, artist, inventor, DIYer non-engineer. Like parrallax's "BASIC Stamp" high level language programmable micro-controller, Arduino too saw a need. The difference is that Arduino is all open source! Both the hardware as well as its programming software(IDE). As a result it has exploded in popularity (Since 2005). Parallax was primarily used by students and tech folks that need a quick way of piecing together a prototype widget. I have used the BASIC Stamp in the past. The company is great, they have lots of great tutorials etc,  its just too expensive to use for non-essential projects. In fact Now that Arduino has taken off Parallax offers Arduino based boards/kits and learning tutorials.

Not only has parallax gotten involved but electronics manufacturers from all over the world now produce Arduino boards. The cheapest that I have seen for one version of Arduino was $2 on ebay. Wow! Now thats amazing!

TMike

----------


## jbauer

Thats cool.  I have chickens and we have problems with our damn dog stealing the eggs.  I like to point out to my wife that its expensive to feed chickens.  (ours free-range all day but still wolf down egg layer crumbs).  

I'd point out the same to you.  Whats your return on investment on that bad boy?  

But, if you have the money, the time and the knowledge go for it!!

----------


## TruckinMike

> Thats cool.  I have chickens and we have problems with our damn dog stealing the eggs.  I like to point out to my wife that its expensive to feed chickens.  (ours free-range all day but still wolf down egg layer crumbs).  
> 
> I'd point out the same to you.  Whats your return on investment on that bad boy?  
> 
> But, if you have the money, the time and the knowledge go for it!!


Many people buy sailboats, Harleys, or sport cars... I raise chickens. So far the return is around -3800%. But that's just an estimate. However, I could be  wrong, it is highly probable that its worse. 

Hope that helps.
TMike

----------


## osan

A very useful tool is an IR CCD gunsight and a suppressor on a 17HMR long gun.

Another handy tool is D-con.  Varmints eat and die once they drink.  Every few months I bomb the barn rats.

----------


## TruckinMike

> A very useful tool is an IR CCD gunsight and a suppressor on a 17HMR long gun.
> 
> Another handy tool is D-con.  Varmints eat and die once they drink.  Every few months I bomb the barn rats.


HA HA! Funny you say that. Not five minutes ago a coyote came up from behind the barn and tried to nab another chicken. But My dogs heard the chicken's coyote alarm (yes, they have one) and I let them out just in the nick of time. Captain Parker commanded the pursuit and chased 'ol Wile E. back to the bushes. Of course I was barefoot without a rifle in sight.  I really need to keep a rifle handy...

----------


## osan

> HA HA! Funny you say that. Not five minutes ago a coyote came up from behind the barn and tried to nab another chicken. But My dogs heard the chicken's coyote alarm (yes, they have one) and I let them out just in the nick of time. Captain Parker commanded the pursuit and chased 'ol Wile E. back to the bushes. Of course I was barefoot without a rifle in sight.  I really need to keep a rifle handy...


I have had the same experience more times than I care to admit.

About 4 years ago we lost 80 chickens in as many days.  The culprit?  Golden eagle.  I'd have shot it stone dead but had no gun on hand.

My wife beat a red tail to death the same year.  The dogs managed to corner it by a fence.  Wifey showed up in her South American fury and beat that poor devil to death.  I buried it with dignity and respect and gained yet another anecdotal datum as to why I never want to REALLY piss my wife off.  Seriously, she'll kill your ass, put you in a pot with some carrots and cook you for dinner.

----------


## TruckinMike

Look who is having the last laugh now mister Wile E. Coyote!   (About one hour ago)

----------

