Pages: [1] 2   Go Down
Author Topic: Chicken Coop Automatic Door  (Read 3523 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I'm looking into automating my chicken coop.
I was going to use a basic timer and motor to open\close the door but this looks like a great opportunity to visit the Arduino platform smiley

To begin with I was hoping to start with the basic door opening\closing. What hardware should I get?
I think I need:

Arduino Uno - R3
Light Sensor (LDR)
A motor control board? I guess it needs to take 12V? Is there such a thing?
Some kind of 12V motor & gearbox.

The door is attached to a long vertical bolt that needs to be turned 180 degrees to open\close (It’s an Eglu Classic). I will make an arm to attach to the handle on top of the coop to do this.
It’s going to need to reverse the voltage to close the door, is that possible with a motor control board?

With the timing, would it be better to use a clock with an offset to work out sunset\sunrise or rely on the LDR? (Or maybe both?) I guess it could be programmed to check the amount of light of a set period to stop false closure from shadows\clouds etc?

I have some .net programming experience so C might be a learning curve - my main weakness is the electronics side.
Thanks for your advice!

Logged

South Africa
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, any reason you are wanting to use a geared motor and not a servo? 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was hoping for a slow gradual movement, to stop any heads from being removed! Will a servo have this  ability when controlled from the board?
I have a 12V solar panel and battery so hoping to use a 12V motor.

Here’s an example of a fellow owners setup.
I don't have anything above the coop, the only mounting points are the coop itself or a fence post nearby.
I was thinking of a long threaded bolt connected to a 12V motor and some kind of mechanism that rotates as the thread turns (connected to the handle)




Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 48
Posts: 3417
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It’s going to need to reverse the voltage to close the door, is that possible with a motor control board?
Yes, that's one of the things they do - search here for H bridge to find out more

Quote
With the timing, would it be better to use a clock with an offset to work out sunset\sunrise or rely on the LDR? (Or maybe both?) I guess it could be programmed to check the amount of light of a set period to stop false closure from shadows\clouds etc?
Likely easier to use a clock. There was a thread on this topic by SouthernAtHeart a while back, where the system was going to be programmed to calculate sunrise & sunset based on latitude. The code for it is in that thread if you can find it.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great, I'm about to order some stuff, could I pass this by you?

Ardunio Uno:
http://www.ebay.co.uk/itm/Arduino-Uno-Made-Italy-Official-Board-Control-LEDs-Robots-Electronics-/360397414055?pt=LH_DefaultDomain_3&hash=item53e95c1ea7

2S Motor Controller Shield L298N:
http://www.ebay.co.uk/itm/2S-Motor-Controller-Shield-L298N-Drive-2-Motors-Arduino-Duemilanove-UNO-Mega-/170719941412?pt=LH_DefaultDomain_3&hash=item27bfb39324

DS1302 Real Time Clock Module RTC:
http://www.ebay.co.uk/itm/DS1302-Real-Time-Clock-Module-RTC-Arduino-PIC-AVR-/140656013274?pt=UK_ToysGames_RadioControlled_JN&hash=item20bfc06fda

Or would it be better to use a radio time receiver?:
http://proto-pic.co.uk/wwvb-nist-radio-time-receiver-kit/

I found the topic:
http://arduino.cc/forum/index.php/topic,66426.0.html

Slightly above my understanding but I'm sure I'll get there  smiley-razz
Logged

0
Offline Offline
Tesla Member
***
Karma: 115
Posts: 8932
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Previous chicken coop post.

http://www.google.com/search?q=coop+site%3Ahttp%3A%2F%2Farduino.cc%2Fforum%2Findex.php&hl=en&num=100&lr=&ft=i&cr=&safe=images
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

New Jersey
Offline Offline
Faraday Member
**
Karma: 48
Posts: 3417
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For chicken coop purposes, I wouldn't think you need the accuracy of the radio time signal.

That motor controller is apparently rated for 2 Amps - you could certainly use it for testing, but you might want to hold off on that purchase until you have selected (and tested) the motor you'll use in the project - it may need more juice than that.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure if I should use an RTC with a calculation or an LDR?
How accurate is the below over a period of time? (i.e will it require weekly adjustments?)
Could someone double check my calculations?

      Sunrise Sunset   Daylight
23 June:    04:41    21:25    16 h, 44 min
23 Dec:      08:07    15:53    7 h, 46 min



Sunrise @23 june = 4:41 = 60 * 4 + 41 = 281
Sunrise @23 dec =  8:07 = 60 * 8 +  7 = 487
delta = 487 - 281 = 206 => divide by 2 makes 103
average = (487 + 281)/2 = 384



Sunset @23 jun = 21:25 = 60 * 21 + 25 = 1285
Sunset @23 dec = 15:53 = 60 * 15 + 53 = 953
delta = 1285 - 953 = 332 => divide by 2 makes 166
average = (1285 + 953)/2 = 1119



---------------


void getRiseSet()
{
  float common = cos(((month-1)*30.5+dayOfMonth + 8 ) / 58.091554) ; 
  sunrise = 384 + 74 * common;
  sunset =  1119 - 82 * common;   
}
Logged

Maidenhead, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 46
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure if I should use an RTC with a calculation or an LDR?
........
Sunrise @23 june = 4:41 = 60 * 4 + 41 = 281
........

I suppose it depends on your chicken's bedtime routine  smiley  but if it were me I'd ditch the RTC and just go with a simple (and cheap) LDR.  As the other thread says, you could detect 15 minutes of light and call that sunrise and open the door.  Then detect 15 minutes of darkness and close the door.  This would allow the system to ignore quick dark storms, solar eclipses(!) etc. and the electronics and programming would be simpler.  The other thread shows some pics of the final installation (using RTC chip) - you would need half the components going the LDR route (no need for keypad or LCD).  And I don't think the chickens would care.   smiley-wink
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 509
Posts: 31458
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My chikens were always very early to go to bed, the slightest darkening of the sky sent them. I would use an LDR, as the time of sunset changes daly.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have cheated and bought an automatic coop opener that is a commercial product. It relies solely on an LDR and it has worked faultlessly for over a year now. Basically, it waits for dark for maybe 30-45 minutes after sunset before the door is closed, likewise, it waits for daylight approx 30-45 mins after sunrise before opening. The motor is a simple dc 3v model with a low ratio gearbox such that it turns a shaft probably no more than 2mm in diameter. This gives it a tremendous torque and powers the door with ease. I guess it senses motor current and turns off when a preset level is reached and the door is snug against the stop. To release, motor is powered down for a set period of time, gravity bringing the door down. When the door reaches the floor the motor continues to turn and does leave some string loose in the motor compartment but this doesn't matter as it is soon taken up on the close stroke. Additional buttons to open/close manually, a led or two to confirm what's going on and a beeper to signal it's in manual mode. It runs on 3 x AA re-chargeables with a small solar panel to keep them topped up. I relocated the solar panel to a position that is more suitable and have had no problems to date. Without the solar panel, the AA's lasted over 3 months without any top up at all. I use Eneloops.

I don't think you need to worry about an RTC as the chicken's routine is governed by light levels, not time. Egg production is proportional to daylight hours so this beauty earns it's keep and I get to have a lie in too!

Hope this helps your decision making.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An LDR is quite a bit cheaper than an RTC so I will try that first  smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just re-read your post and realise that your door opener is different. The same principal could apply. Tension the door handle shaft with a spring to power it closed and use the motor to pull against it. When the door is fully open, sense the extra current and stop the motor. The friction of your low gearing is your "brake" and will hold open indefinitely. 3v motor with a low ratio gearbox powered by AA cells is all you really need. Mine takes about 10 - 15  seconds to fully open. The chickens don't mind.

 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your reply. The mechanics are actually the biggest headache for me – I don’t want to damage the coop.
What type of motor should I use? (I’m a programmer, the hardware is a mystery to me!)

Here's the door\handle:





If the motor assembly is behind the coop, I could attach a sprint to on end of the handle and some string to the other. Is that what you mean?
Logged

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 30
Posts: 2246
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your reply. The mechanics are actually the biggest headache for me – I don’t want to damage the coop.
What type of motor should I use? (I’m a programmer, the hardware is a mystery to me!)

I believe this is your coop? Their pictures make it pretty clear what's going on (not to make fun of your skills with MS Paint smiley-wink

If you were to attach a weight scale to the handle about 1" from the center of rotation, how many pounds of force would be required to open the door? That's the question you need to answer in order to get the inch-pounds of torque that you require.

If your result is only a few inch-lbs of torque then your mechanism and electronics would be a lot simpler if you used a large RC servo for it. You can find servos that will give 10 inch-lbs for less than $20. You would no longer need the motor driver board but would need a 5V source for the servo which will cost less than $10.

Logged

Pages: [1] 2   Go Up
Jump to: