This unit that I designed and built uses a PIC16F684 micro, 3 AAA batteries, a solar cell array and a motor to automatically open the chicken house door every morning. “Morning” is detected when at least 30 minutes of dark is followed by at least 30 minutes of light, this is important to avoid false triggering due to torches, headlights, shadows etc.
The software also gives the motor a little 100mS “jiggle” every 30 minutes to reduce the possibility of ice causing a major jam.
Micro stays asleep for most of the time, and only wakes up every 2 seconds (due to a watchdog) and counts the number of wakeups to ensure that a light sample is taken every 4 minutes. Only a continuous sequence of 8 light or 8 dark readings will set or clear a day/night flag. Current consumption is around 10uA most of the time, and then around 500mA for 4 seconds during the motor operation. The door is opened until the limit switch is reached.
2 buttons (on the right hand side of the enclosure) allow for manual opening and closing. Any press of the buttons causes the PIC to come out of sleep immediately, ensuring instant reaction to button presses.
The door is opened by the motor and a simple pulley wheel with fishing line attached to the door. The door can’t be closed automatically, so it must be done manually while pressing the “close” button to unwind the pulley while the door is slid across by hand. The motor has a built in 300:1 gearbox to ensure high torque and low speed.
If the automatic opening function fails to reach the limit switch within 8 seconds, the motor is switched off anyway and the LED gives a “blink-blink-blink…….blink-blink-blink…..” to warn the owner of a jam. Any button press resets that condition.
The solar cells provide enough energy for several openings per day, so should be fine for the expected 1 op per day!
Enclosure is an IP67 rated box with a transparent lid. The only “breach” of the enclosure is a 0.5mm hole for the 0.4mm fishing line to exit.
All electronics and solar cells are sprayed with conformal coating, so a little damp shouldn’t be a problem.
Duration : 0:0:11
(more…)