by 3chelon · 8y ago · 0 comments
I used a normal (non-stepper) motor with some gearbox I found in an old cassette player. The door limits are detected using reed switches.
It is solar powered, with a 12V lead-acid battery. I've had to replace that twice over the 5 years because winter tends to kill it. Since then I've added a winter trickle charge wire from the nearest outbuilding.
The solar panel voltage into an ADC provides the daylight reading. An Arduino Nano provides the main control functions. It spends a lot of time in sleep mode, waking every 5 minutes to check light levels, and at night sleeps until a preset time when it makes sense to start checking for daylight again.
It also has an XBee radio link to a Raspberry Pi which sends me email updates, keeps the Arduino's clock accurate (obviating the need for an RTC), and alerts me of any mechanical problems with the door mechanism. A common one is straw and other mess getting jammed in the door runners, and once a broken door mechanism.
Over the years I've tweaked the opening/closing times to account for the hens' habits, and for predators. I've learned that the dawn/dusk opening technique is not enough on its own, it needs to know the time of day also.
It opens at 6:30am or first light, whichever is latest. Too early in the summer and you're asking for fox trouble, and also the neighbours used to complain the cockerel would crow when it opened too early (sunrise can be before 4am in midsummer).
My hens go to bed very early, so it closes before dark, and again at least by 7:30pm in the summer because foxes can be active by then.
We live in the country and almost everyone near me has hens, but they rely on manual opening. They have all lost their entire flocks to foxes at least once in the time my automated door has been operational, but thankfully we have not. I have seen scratch marks on the sliding door indicating interested predators, but I think my timing is right to keep the coop closed when foxes are about.
We live on a very small island of private property inside a huge expanse of open space / wilderness and thus have very heavy predation on any animals we raise.
In the case of our chickens, I just kept adding hot wires to the fence until nothing could get into the run. There are four hot wires now, two of which form a negative (back bending) slope. It is impossible for a thing to climb the fence now without touching (and holding) at least two hot wires. We've had our current flock for over a year with no losses, vs. losing every previous flock to raccoons and weasels every 2-3 months.
I wonder if you would comment on this (seemingly successful) strategy - you seem to know what you're doing...
They say you need as much fence under the ground as you have above it.
Your problem with being really isolated is that the predators will not be afraid to come out in daylight. If I were going for a tech solution I might start thinking about detection systems...
Or maybe just dogs?
I guess it comes down to how much hassle it will be for you if you need to replace the ESP8266.
It's bidirectional where you need a proper level shifter. But you can get really small cheap ones. I've used them a lot on I2C interfaces. If you're careful you can design the entire system around I2C and then you only need a single level shifter.
But I've not built many things around ESP8266 just yet. Still learning about it. It's an incredibly cheap and powerful platform though.
NiCad batteries handle 'trickle charging' much better than NiMH ones, which usually degrade significantly with overcharging. So NiCads are still used in places like alarm backups, power tools, or off-grid applications where they might be connected to a charging circuit for long periods of time between discharges.
And 18650 cells are great, but I would think carefully about using li-ion or li-po chemistries in areas where they will be exposed to the elements and unsupervised.
Nice. Slack is great for this sort of things and adds additional mute channel functionality for normal events. There is the odd service (eg Freshping) that will check it can ping your Pi, even when on your on a dynamic IP, and alert you to outages. Results also sent to Slack but not muted. I hope you have all the bad puns configured for your notification. “Chick in”, “chicken out”.