12 ms·
DIY ESP32 based chicken coop door. Control based on time, light or via app
- leejoramo 3y agoThis is a project I have long thought to try. Relatively simple task, but requires Designing a reliable system and sourcing quality components
- blitzar 3y agoand chickens ...
- fullstop 3y agoand land Technically I could keep chickens as long as I keep five or less. Realistically my neighbors would hate me. Also, there's a lot of foxes in my area and I don't think that my five chickens would be around all that long.
- traviswt 3y agoAs for neighbors, just don't get a rooster. Hens do make some noise but they're not bad at all. As for foxes, you can use a mobile coop+run. Move it once per day to provide fresh grass and distribute the fertilizer byproduct.
- fullstop 3y agoYeah, if I did it I'd want the area to be fenced in because one of my neighbors is nosy. It's a 1/4 acre plot, so not exactly a huge amount of land. I know that my neighbors down the street have chickens because I occasionally hear them, but their yard is completely fenced in. I only know them well enough for casual greetings when we see them in passing, and there's a language barrier preventing more in depth conversation.
- lostlogin 3y agoDo you think there is a reason they are getting away with ignoring the rules? Maybe you could too - just ask the neighbours first?
- fullstop 3y agoThey might not know that the rules exist at all -- you have to go looking to find them. I'm sure that they're getting away with it because nobody cares and the yard is fenced in and nobody sees the chickens and because none of their next door neighbors care. I don't talk to them much besides "hello", as communication is difficult since they don't speak much English and I don't speak much (any) Swahili. The coop is somewhere in here: https://i.imgur.com/t6FqF6G.png https://i.imgur.com/t6FqF6G.png
- uxp100 3y agoMy neighbors across the street (3 miles from downtown of a medium size american city) have chickens and most days I forget they are there. I grew up with chickens as well, and they really aren’t a nuisance. We also have foxes and uh, the time I did’t forget they were there was when I heard a strange yowling at dawn, clearly a chicken and yet so different from their normal noises. I assume that was due to a fox.
- GravitasFailure 3y agoYeah, hens aren't loud or smelly, so as long as you take measures to curb issues with pests they attract, they're fine. Just don't get a rooster.
- blitzar 3y ago> I could keep chickens as long as I keep five or less Is that a specific chicken clause in a contract somewhere or a general head of livestock / pets clause. 5 chickens != 5 dogs != 5 horses
- fullstop 3y agoI looked up the ordinance, and I was wrong about a few things. Livestock or poultry may be kept provided that there are no more than 4. So I was wrong about the limit -- it's less than five and not five or less. Also: * I need to have a 1 acre parcel, and I have only a bit over 0.25 * It needs to be 25 feet from all property boundaries and fenced in, which limits placement options So my options, for this plot, are nil. I don't recall the 1 acre limit when I looked before, so I'm wondering if this has been updated.
- kortex 3y agoI have 12 on a 1/2 acre plot, about 2/3rds of which is backyard they can access (so call it 1/3 acre of roaming). That amount seems more than ample, though these are pretty bougie chickens. Four in even 1/8 acre should be fine.
- fullstop 3y agoI shall forward your message to my township officials. :-) Seriously, though, I have to abide by the local ordinances.
- hedora 3y agoThe minimum square footage per “cage free” chicken is only 1.5 sq ft, (in California, which passed a ballot initiative to increase it to that number) https://ballotpedia.org/California_Proposition_12,_Farm_Animal_Confinement_Initiative_(2018) https://ballotpedia.org/California_Proposition_12,_Farm_Anim... So, 1/8 acre could hold 3,630 “cage free” chickens, in theory (I am not condoning this). In you don’t need much space to keep chickens happy. However, they produce a lot of dust, and can’t be kept in a house.
- leejoramo 3y agoI actually live downtown in a small city. We have a small backyard but enough room for hens. They make minimal noise, much less then dogs. And they not make cause any unpleasant odors. In the 9 years we have had the hens, no one has complained. However many people bring their kids by to watch them through the fence.
- traviswt 3y agoI have a door from Run-Chicken, mechanically it's still good but the electronics went out in it. I'd love to have something like this running it, going to give it a shot.
- hedora 3y agoIf you can rip out the old motor and tie a string to the door (drill a hole in the piece that moves?), you can get a standalone motor from chicken guard. (You’d want the pro model or cheaper; their new all-in-one would have you replace the old door)
- traviswt 3y agoI might do this, but the servo still works. So long as I can still drive the servo, I think I'm good. It's open loop, so I'll need to watch something to determine when the door is fully shut.
- dewey 3y agoWe bought something similar to that as a kit you have to assemble yourself. I additionally hooked up a Unifi camera pointed at it so my parents can check if everything is alright.
- Symbioquine 3y agoA design with limit switches instead of counting turns seems like it would be much more reliable. e.g. https://www.floweringelbow.org/automated-door-from-an-old-windscreen-wiper-motor/ https://www.floweringelbow.org/automated-door-from-an-old-wi... That way the software can be nearly stateless: 1. Check time and determine desired state (open or closed) 2. Compare desired state against limit switches and run motor until the limit switch is hit (or it times out which is an error) On the other hand, a turn-counting strategy can lose power in the middle of opening or closing and "forget" where it is in the process.
- hedora 3y agoChickens are incredibly dirty animals. The limit switches would probably be fouled (fowled?) pretty quickly. Commercial versions of this can measure motor load (via current), but still require manual calibration. I wonder if they thought they could get away with manual calibration, but couldn’t make it reliable. I think these people are the market leaders: https://www.chickenguard.com/ https://www.chickenguard.com/ Note that the commercial version latches the door shut, so raccoons can’t open it from the bottom (they would have to learn to pull the string, and then also stick a hind leg or something in the bottom to wedge it open after the string was released). The new 2023 model replaces the string with what appears to be a high tolerance gear system. That auto-calibrates once, then remembers the set points.
- mtreis86 3y agoLimit switches for all sorts of terrible environments exist. These would probably work https://www.mcmaster.com/products/switches/environmental-rating~ip68/sealed-limit-switches/ https://www.mcmaster.com/products/switches/environmental-rat...
- wiredfool 3y agoI used something like this: https://www.mcmaster.com/products/lever-switches/subminiature-snap-acting-switches-9/actuator-style~roller-lever/ https://www.mcmaster.com/products/lever-switches/subminiatur...
- jack_riminton 3y ago"Certainly, here's your code snippet presented in a more readable manner:" Using ChatGPT to do your README is a good idea, just need to proof read it ;)
- b112 3y ago[flagged]
- xavxav 3y agoA project I've always toyed with in my head is a fancier version that would count / verify the checks have all entered the coop at closing time and warn you if not. With my parents coop occasionally a chicken will decide to brave the night outside, often to disastrous consequences. Figuring out how to build a low-energy version is challenging, but necessary since the whole system runs off small solar panels and a 12v battery.
- lhoff 3y agoI haven't played with rfid tags or bluetooth beacons myself but I could imagine a solution build around one of the two technologies. I think it should consist of an entry tunnel with two sensors, one at each end. The tunnel and the two sensors could be used to determine the direction the chicken goes. It the chick first triggers the inner and then the outer sensor it is checked out and when it goes the other way its checked in.
- sudobash1 3y agoI would suggest that you don't need to count the chickens. You could also just verify that none are left out. There are presence sensors (such as the ones that turn lights on when someone comes into a room, or off when everyone is gone). If you had one that worked on chickens pointed into their run, you could close the door when there are none left (plus a time cutoff if Henrietta really wants to keep her trist with the raccoon).
- zwieback 3y agoI had that problem with the camper chickens (that end up getting eaten by raccoons) and also sometimes additional guests like possums or skunks would enter the coop. In the end I always closed the coop at night manually and let the auto coop door open in the morning, that way I could sleep in in the summer. Next level of coolness would be a full coop monitor with non-chicken intruder detection. Alas, all my chickens have passed on by now so it'll remain a fantasy.
- wiredfool 3y agoI did this in the Raspberry Pi 1 era. * Pi for timing/wifi/status/webserver. * Opened at 8am, closed at civil twilight. Or whenever I hit the button on the webserver, or the switch board. * Limit switches. * Mechanical swing lock for raccoon protection * Electric drill + rope for the vertical sliding door * Relay for direction, power mosfet for the drive controller. * Intermediate board between the 3.3v controller and the 12V power board. * Lead acid battery + charger for the power. The door was pretty hefty, and was _solid_. 1/2 or 3/4 ply IIRC. The drill wound up being a mistake, because the power was too high, managed to fry some relays before I got everything worked out. The limit switches were generally pretty good, but they were also pretty well protected by the door design. The best bug was that the wifi worked really well during the day, but not at night. Turns out that the LOS between the wifi dongle and the AP went through the roost, and chickens absorb enough wifi signal to drop it off the net. So one 3m usb cable later, and the dongle was on the other side of the roost. Solid networking from then on. Sadly I left it in the coop when moving out.
- daveevad 3y ago> Turns out that the LOS between the wifi dongle and the AP went through the roost, and chickens absorb enough wifi signal to drop it off the net. That sounds like a chicken motion detection system to me.
- wiredfool 3y agoChicken presence anyway. I tell you the bugs you see when deploying something in the real world...
- djbusby 3y agoField work always finds the "what the heck" bugs that lab work never could.
- thelastparadise 3y agoAnd the chickens will eat the bugs when you deploy them to the real world..
- petee 3y agoOne problem I see with this is not stranding chickens outside if they didn't return fast enough; I guess you could count by breaking a light beam, or stepping on a plate. Second would be adding a good lock to the door -- raccoons are very crafty, and love stealing eggs
- Petersipoi 3y ago> and love stealing eggs and chickens.. in my experience
- TurkishPoptart 3y agoOne thing I see at the very bottom, where it says "Tutorial, here is a video:" There isn't a video, just an image.
- yardshop 3y agoAt at end of that sentence there is a "//todo".
- tengbretson 3y agoI have an automatic chicken coop door from the company Run-Chicken. It is one of the most brilliantly designed products I've ever owned. It has an app for setting up the opening and closing rules, which can be rather sophisticated, based on both time and light conditions. The device itself has no WIFI, bluetooth, or a radio of any kind. To program the device, you push a button to put it into a programming mode, then hold your phone up to its photo sensor, and it will flash the screen in a sequence of black and white to relay the encoded settings.
- nullwarp 3y agoHave the same door, has worked flawlessly for the two or so years i've had it I don't even think about it. Really clever piece of engineering on the programming mode for sure.
- ukd4ve 3y agoI have a similar setup, but used an actuator for the door, so it can't be pried open by a racoon. I use Home Assistant rules to open and close the door according to readings from a light sensor in the coop.
- enachb 3y agoThis. I have had a gravity based door mechanism for 2 years and eventually your door gets jammed. I started with one limit switch and calibrated number of turns, but even that over time started to get into weird conditions. Cheap linear actuators from Amazon with built in limit switches are the way to go IMHO: https://www.amazon.com/ECO-LLC-Actuator-Mounting-Brackets/dp/B07L7XCSDW?th=1 https://www.amazon.com/ECO-LLC-Actuator-Mounting-Brackets/dp...
- btbuildem 3y agoHow do you not have photos (or a video!) of the finished project in operation??
- finnjohnsen2 3y agoThe esp32 devboards are magnificent, as it is so easy to replace the need for official Arduino boards - Arduino compatible - platformIO supported - very cheap - they are usually tiny - great wifi and Bluetooth - gpio pins for the different protocols (i2c etc) - easy to power (tolerance and options in usb and pins) - lots of exciting new models and active development like the esp32c3, the D1 minis and different models with integrated oleds are cool - community resources. there are massive amount of blogpost and YouTube videos for esp32 (and Arduino in general) cons are few; - 3.3v signal is a hassle quite often in practise - the amount of different esp32 devboards models can get confusing - the pins are sometimes shared-purpose and it's not always clear which you can use - China. Both practical for delivery time, and politically
- dekhn 3y agoyou can also drop the Arduino bit and use FreeRTOS. Also many of my ESP32 projects end up on a solderable breadboard with a level shifter to deal with 3.3v. But most of what I work with today is 3.3v.
- deleted 3y ago[deleted]
- ofrzeta 3y agoNice. However the bigger problem for me is the mechanics. What motor do you use? Actually I think you also need some gear. We and many other people we know are using the Kerbl (not related to KSP) chicken coop door which is quite expensive (around 120 Euro). https://d3w207ykk8w4lq.cloudfront.net/public/thumbnail/33/a3/95/1678397711/kerbl-huehnerklappe-automatische-huehnertuer-5_1920x1920.jpg__C3.webp https://d3w207ykk8w4lq.cloudfront.net/public/thumbnail/33/a3... You can see in the image it uses quite intricate mechanics with a lever and a spring. It's also supposed to detect a stuck chicken, however that has never happened to us (or we wouldn't have noticed because the Kerbl has silently resolved the problem).
- petsfed 3y agoI love projects like these, since its typically a neophyte to embedded hardware design and programming a microcontroller. But just once, I'd love to see a hobby project from somebody who already knows what they're doing, but is using this to try out some ridiculously inappropriate software technique. Forget Arduino on an ESP32, I want to see somebody do this with FreeRTOS. It's been on my todo list for a long time. Unfortunately, we have too many predators in our area to let the chickens roam free unsupervised (I lost 5 last year to the same coyote, and I can hear the bald eagles squeaking most clear days), so its a solution in search of a problem.
- alphanumeric0 3y agoThis is really cool. I wonder how easy it would be to add 'chicken detection' so that the door doesn't accidentally close on one.
- teeray 3y agoI hope the door has a little klaxon and red bubble light while it operates
- thedougd 3y agoIf you're thinking about doing projects like this, but are in a hurry and willing to skip lots of the fun, I recommend espHome. https://esphome.io/ https://esphome.io/ You should be able to accomplish similar with a yaml configuration file.