Arduino and L293D controlled chicken coop door opener
|
02-01-2010, 04:17 PM
Post: #1
|
|||
|
|||
|
Arduino and L293D controlled chicken coop door opener
I'm almost done with the brain of my chicken coop door opener. All I need is my H-bridge and to build the pulley system. I'll attach photos of what I have now.
The idea is a light sensor on the roof reaches a certain measurement, checks again in 6 minutes, then lowers the draw-bridge style door. Waits 12 hours and pulls the door back up. What I have used: BBB Freeduino TI SN754410 12v motor from a car window photoresistor caps, resistors, etc |
|||
|
02-01-2010, 04:28 PM
Post: #2
|
|||
|
|||
|
RE: Arduino and L293D controlled chicken coop door opener
Cool project!
I see a couple potential problems. (That you may have already addressed) - Light sensors can be easily covered by snow / etc. You may want an alternate method (after a certain time if the light sensor hasn't reached its trigger level, it will open anyway) - You may need a RTC (real time clock) module to do any kind of real timing. The onboard timing is a little buggy at best. Eric could explain much better then I can. Maybe him or someone else can jump in on this. Project looks great though! Keep us updated. EDIT: SparkFun RTC You may be able to build something for cheaper, or hack something together. ($5 wal-mart alarm clock maybe?) OOoooOo ...sparks! |
|||
|
02-03-2010, 10:03 AM
Post: #3
|
|||
|
|||
RE: Arduino and L293D controlled chicken coop door opener
(02-01-2010 04:28 PM)Deven Wrote: Cool project! Thanks! Good points. I'm thinking a walmart alarm clock I've already hacked one of those into a daylight alarm clock so it would be a "cake walk" haha
|
|||
|
02-03-2010, 10:43 AM
Post: #4
|
|||
|
|||
|
RE: Arduino and L293D controlled chicken coop door opener
http://www.allaboutjake.com/projects/watch-winder/
This recent project on make, while not a chicken coup, could have some insight for you on using an RTC chip for task scheduling, iff'n the hacked Wally World clock doesn't pan out. "I set up my white picket fence in the now, with a commanding view of the soon-to-be." -The Tick |
|||
|
02-03-2010, 03:40 PM
Post: #5
|
|||
|
|||
|
RE: Arduino and L293D controlled chicken coop door opener
Do you think calling
delay(43200000); //12 hours Would work for it to just "sit around" for 12 hours? Currently my code looks like this: # void loop() # { # if (sensVal > darkVal){ // duh # delay(360000); // waits 6 minutes # if (sensVal > darkVal){ // checks the sensor again to make sure its really the sun not just some retard in the neighbors driveway # doorDown(); // lets door fall open gracefully # delay(43200000); // waits 12 hours. # doorUp(); // pulls door back up # } # } # } |
|||
|
02-03-2010, 06:35 PM
Post: #6
|
|||
|
|||
|
RE: Arduino and L293D controlled chicken coop door opener
Looking into it a bit online, I found this thread which may be helpful to you as well.
http://www.arduino.cc/cgi-bin/yabb2/YaBB...1215338347 It seems that the arduino clock is only 2-4 seconds off per day, which isn't good enough for a clock, but it will likely do for 'about 12 hours later, close the door.' The real problem you run into here will be the overflow reset for millis() which occurs every ~9 hours or so. You would need to write some code that takes into account that millis() will jump from a giant number back to 0. Otherwise you can probably get away with just using the arduino 16MHz clock to keep time 'well enough.' "I set up my white picket fence in the now, with a commanding view of the soon-to-be." -The Tick |
|||
|
02-06-2010, 08:50 PM
Post: #7
|
|||
|
|||
|
RE: Arduino and L293D controlled chicken coop door opener
Ahh cool. I'll just set it up to delay 6 hours twice. kludgey but it w ill work I guess.
|
|||
|
02-08-2010, 09:10 AM
Post: #8
|
|||
|
|||
|
RE: Arduino and L293D controlled chicken coop door opener
I think I am going to go with the arduino DateTime library http://www.arduino.cc/playground/Code/DateTime and shave the few seconds it will be off every day.
|
|||
|
02-08-2010, 10:59 AM
Post: #9
|
|||
|
|||
|
RE: Arduino and L293D controlled chicken coop door opener
That looks like it'll be close enough for the kind of accuracy you'll need. Good luck to you in getting it all put together.
"I set up my white picket fence in the now, with a commanding view of the soon-to-be." -The Tick |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread:
1 Guest(s)
1 Guest(s)
Return to TopReturn to Content






I've already hacked one of those into a daylight alarm clock so it would be a "cake walk" haha