The overall project is Chicken Coop (where my chickens live). It started when my kids got to lazy to open the coop door in the morning and i did not want to do it either. The chickens spend their days in my yard doing whatever, and at the end of the day they instinctively go straight to their coop. It includes a Raspberry Pi, wifi, a 50W solar panel, solar charge controller, 2 each 12 ah AGM batteries, a handful of temperature sensors, a humidity sensor, a luminosity sensor, a couple motion sensors, a couple industrial panel leds, an led strip light, a linear actuator, and a linear actuator controller. The wifi allows it to keep proper time, serve web pages. and send emails. I am datalogging the sensors to keep an eye on the environment (like make sure their water never freezes. it got to -16 degrees F in the coop this last winter). It also lets me keep an eye on their behavior (when an egg has likely been laid or when a bird is broody). The coop opens in the morning just before the sun comes up and then closes shortly after the sun goes down. Code is written in Python, with sunrise and sunset calculated using PyEphem.It sends me an email when the door successfully opens and another when the door successfully closes.
What matters here is the linear actuator and controller. From Pololu I am using these items:
Concentric LACT12P-12V-20 Linear Actuator with Feedback: 12" Stroke, 12V, 0.5"/s (and the brackets).
Pololu Jrk 21v3 USB Motor Controller with Feedback
I thought that these would be overkill. I was correct, but am very happy I went overboard. Here are some specific features of the actuator and JRK that I am using:
- I use feedback to set the door at a specific location for both open and closed.
- I use the acceleration setting in the JRK to keep the peak current draw at a minimum, to be respectful of the batteries.
- I read the current (amps) from the JRK to determine when the door has stopped moving, and as a safety to see if something may be caught in the door.
- The JRK is connected to the Raspberry Pi via USB (USB commands were easy enough to do in Python, read/write).
Originally I had planned on a sliding door that went up and down in tracks. After extensive construction I realized that the actuator was too long (more than the 12" stroke) and I would only have about 4" of door opening when I wanted 8-12. So I redesigned as a flap door. It works kind of like a blast door. The actuator pushes a couple millimeters into the closed position and with that compression, the door is rock solid when closed.
It is a work in progress, of course, still have wiring to clean up, and will never be fully complete. I have attached a couple pictures.