How hard could it be to make a chicken coop door that can be configured to open and close automatically using a straightforward interface? That’s the question that [Jeff Sandberg] set out with, after three years of using a more basic off-the-shelf unit that offered no remote access nor a convenient user interface. The use case for [Jeff] was rather straightforward: the door would be open during the day and closed at night to keep the hens safely inside the coop.
The commercial solution offered an RTC-backed programmable interface as well as a light sensor, but the latter wasn’t always reliable in inclement weather and making simple changes to the programming when e.g. the hens had to stay inside a day due to work on the yard, was much more complicated than needed, plus had to be done on the spot. The new system would solve all these ills.
That said, the existing door mechanism was doing a fine job and could be kept. This just left making a new box with electronics to control it, starting with an ESP32C3 with the ESPHome firmware that is hooked into the local Home Assistant system, along with a motor to lift and lower the door and with magnetic contact sensors.
So far so easy. The hard part came with the installation, which involved trenching to the hen house for mains power, repairing the damage from this, and troubleshooting a power issue that turned out to be due to a dodgy power adapter. The payoff is that now the chicken coop is also part of the smart home and their owner never has to trudge through a soggy garden again to adjust the programming on a dim LC display with far too few buttons.
LC -> LCD
Ackchyually… the D in LCD stands for display, so it is correct to leave it out to avoid repetition.
LC + Display = LCD. Duh.
LCD -> LCD display. Checkmate!
You can deposit my reward using your PIN number into the ATM machine at the Department of Redundant Acronyms.
The correct name is the Department of Redundant Acronyms Department.
You mean the DoRA Department (or short, DD), right? Right? RIGHT???
That’s smart hey? It would also make it hard for foxes to get to your chooks and if the hen house had snake proof fencing this device could make things safer for the chooks win win!!
Waiting for the smart chicken coop where the hens can turn on the lights and water/feed.
Mine used threaded rod to open the door so raccoons couldn’t push it open.
I used a metal gear track for mine for the same reason.
For a manual override, my ESP8266 (NodeMCU) just keeps track of the door state via a boolean (isClosed == true or false) written to internal flash (so it persists between power cycles), and I added a simple button inside the coop that I can press to toggle the state. It opens/closes at sunrise and sunset (the hens have their own enclosed run they have access to whenever the door is open, and we manually open a door to let them free range in the rest of the yard when we’re home), but I can override open and close times via a simple HTTP interface. I even have it email me when the door opens or closes.
The whole thing runs off a 7.2v NiCad RC car battery, which lasts for months.
Sunpower?
And LoRa
I actually looked into solar and a battery system for all of this, and probably would have gone with it, were it not for the need to power a bucket heater in the winter for the birds water. I’ve been using a long extension cord for the past few years, and while it works, its a pain.
I have a very similar setup, but two main differences:
it uses Tasmota, so the opening logic (like sunset/sunrise + offset) is done directly on the device -> it’s more robust, it doesn’t need a server to operate. HA is used as a remote control + alerting about anomalies (e.g. not opened even it should have been).
not sure, how author used the reed switches. I initially wanted them as well to be used as (soft)end stops. But then realized, that a simple circuit with two diodes and two switches will solve the problem in a very robust way https://www.bobek.cz/dc-motors-limit-switches-and-diodes/ (aka, don’t use software where it is not adding a value).
The sunset/sunrise logic is actually done on the ESP32, provided it gets a time signal from HomeAssistant. If HomeAssistant goes down for an extended period of time, the time would get inaccurate, but it would still continue to function.
The reed switches are just used as end stops, nothing too fancy, except the bottom end stop has a slight delay in “closing,” which allows some slack for the bottom of the door to latch into the slides. Were it not for that, a diode system like you described would have been simpler.
I used a power window “regulator” from a Toyota on my henhouse, alas I haven’t had chickens in close to 10 years now. This was before Home Assistant really took off, and I agree that the RTC system can be pretty onerous, especially with pesky things like seasons and sunset times.
Oh they’re so pesky. I see during spring to summer expensive mast mounted LED’s under a black hood cooking in the late afternoon right now at Lowe’s hardware chain because of a timer manually set weeks late and nobody knows how to set it. Seems like some don’t know what planet they are on. It would take a supercomputer to figure this out and have to wait a whole year to see if it would work.