Arduino Forum

Community => Exhibition / Gallery => Topic started by: tylernt on Nov 13, 2013, 12:55 am

Title: Yet another chicken door
Post by: tylernt on Nov 13, 2013, 12:55 am
This is not yet ready for prime time, but someone in another thread wanted to see it so here it is half-baked. It probably contains bugs. Also, this is my first major Arduino sketch that I started writing over a year ago. Since then, I've learned a few things and if I had to do it over, would probably do things a little differently. But it works and I don't want to do it over. ;)

I chose to use a RTC and calculate sunrise/sunset times every day. This avoids any false activations as may happen with a photocell (cloudy day etc).

One thing I want to point out is that the state of the door is never stored in a variable. This is important for safety -- any time I want to check if the door is open/closed, I read the limit switches directly.

A hacked up cordless drill is activated via a twin-relay module wired as a H-bridge. The whole thing is powered with a motorcycle lead acid wet cell battery charged by a small solar panel. It's charged more than it's discharged, so I chose a wet cell to be able to water the cells from time to time.

The heartbeat LEDs are aimed at the (human) house so I can see the status just by looking out a window.

Extra Libraries:
JeeLabs RTCLib:

Alternate DS3231 required for setting the time on my cheap import RTC: (use the Example sketch provided with this library)