This is an old revision of the document!
Automated Chicken Door
Motivation
Automating the opening and closing of the chickens door reduces the mental payload and gives more freedom. It also makes the chickens more safe as humans might forget to close the door in the evening.
This is the very definition of progress: making life easier.
Comparable systems
- http://www.chickencoopdoor.com/Products/products.html, ~200$, sash based
- https://www.chickendoors.com/, ~200$, hinge based
- And many others which can be found with your favorite search engine
Possible designs
Controllers
Solution | Price | Plus | Minus |
---|---|---|---|
12V timer | ~10€ | Easy to set up, reliable | Setup has to be changed over the year ; 12V powering needed ; Power consumption ? |
Arduino mini + electronics | ~8€ | If battery/solar powered, the board has to be modified to reduce the power consumption ; Electronic circuit has to be built and programmed | |
Analog electronics | ~5€ | Low power | Electronic circuit has to be built |
Actuator
Solution | Price | Plus | Minus |
---|---|---|---|
Electric car antenna | ~20€ | Easy to integrate | |
Winch actuating a sash | ~10€ | Can be built with broken electronics | Has to be built |
Servo-actuated self-locking door | ~10€ | Complex to build |
Powering
Solution | Price | Plus | Minus |
---|---|---|---|
Solar panels | ~5€ | Energy self-sufficient ; Coop easy to displace | Requires low power electronics |
Power adapter | ~5€ | Stability | Requires a power line |
Rechargeable Battery | ~15€ | Coop easy to displace | Inconvenient ; Requires low power electronics |
Selected design
As we try to reuse the tings we have and to buy as less as possible, the solution depends a lot on the material already available.
Function | Selected solution | Why |
---|---|---|
Controller | Analog electronics | low power, low cost |
Actuator | Winch actuating a sash | no cost because reused materials |
Power | Solar panels | we can reuse solar lightings for garden, can be moved, energy self-sufficient |
The total cost will only be around 5€ for the electronics. The drawback to this is the time demanding construction work.
Electrical Analysis
Photo-resistor
The photo-resistor is a component which resistance depends on the quantity of light illuminating its sensitive area. During the day, its resistance drop to below 100ohms, while during the night, it is higher than 100Kohms.
The photo-resistor is placed in series with a fix-value resistor. The tension between both components (V1 on the schema) is higher during the day, and lower during the night.
Comparator
The tension V1 is compared to two fix tensions V2 and V3. If V1 > V2, we consider the state to be “day”. If V1 < V3, the state is “night”. This is done by two comparators. Below is the output of both comparators depending on the voltages.
V2 < V1 | V3 < V1 < V2 | V1 < V3 | |
day | undefined | night | |
V4 | 6V | 0V | 0V |
V5 | 0V | 0V | 6V |
Limit switches
When the state becomes “day”, we want the door to open. This means, that the motor turns in one direction, but only until the door is open. This is why the limit switch S1 opens the circuit when it detects that the door is open. Similarly, the limit switch S2 stops the motor when the door is closed.
H-bridge
The H-bridge is composed of 4 BC547 transistors. It allows the rotations of the motor in both directions. When V4 = 6V, and S1 = closed, the upper left and the lower right transistors are activated, a current is flowing through the motor from the left to the right, thus making the motor turning in one direction. The two other transistors activate the other direction.
Energy Analysis
If the system is powered by a battery or a solar panel, an energy analysis can be done to be sure of the feasibility, or to be able to improve the design.
Energy used by the motor
Parameters we need to know:
Current measured through motor while door is lifted | I_motor = 100mA |
Voltage powering the motor | V_motor = 6V |
Time measured to open | T_open_door = 10s |
First we calculate the power drawn from the motor:
P_motor = V_motor * I_motor = 6V * 100mA = 600mW = 0.6W |
Then we can calculate the energy used by the motor to open the door:
E_open_door = P_motor * T_open_door = 0.6W * 10s = 6W.s |
This energy can be converted in W.h:
E_open_door = 6W.s = 6/3600 W.h = 1.6mW.h |
As the door needs to be closed as well, we just double this value to get an approximation of the total energy used by the motor per day.
E_motor_per_day = 2 * E_open_door = 3.2mW.h |
Energy used by the electronics
We try to use resistors having high values to reduce the power they use (0.07mW in total). As a result, the component consuming most of the energy is the comparator. This is why we use the an ultra low power comparator draining as little as 0.05mA. More information can be found in the datasheet.
P_comparator = U_comparator * I_comparator = 6V * 0.05mA = 0.3mW |
P_electronics = P_comparator + P_resistors = 0.3mW + 0.07mW = 0.37mW |
Energy used by the comparator per day:
E_electronics = P_electronics * 24h = 0.37mW * 24h = 8.9mW.h |
We can see that it is the same order than the energy used by the motor. While the motor consumes 2000 times more power than the comparator, it is used only 20s a day, while the comparator is always on.
Energy available per day
The solar garden lighting give approximately 4h of light every night. From this information, we can estimate the energy available per day.
The LED is powered with 1.2V and consumes 30mA. We can measure this with a multimeter.
P_led = V_led * I_led = 1.2V * 30mA = 36mW |
E_led_per_day = P_led * 4h = 36mW. 4h = 144mW.h |
The batteries of the garden lighting have a voltage of 1.2V (can be read on the package). As we want to power our system with about 6V, we have to use 5 garden lightings, and to connect their batteries in series.
E_available_per_day = 5 * E_led_per_day = 144mW.h * 5 = 720mW.h |
Conclusion
Summary:
E_motor_per_day | 3.2mW.h |
E_electronics_per_day | 8.9mW.h |
E_used_per_day | 12.1mW.h |
E_available_per_day | 720mW.h |
We are happy to see that more energy is available than used. The security margin tells us that after one normal sunny day, the system can work without additional energy for 59 more days, which is very good.
Security_margin = E_available_per_day / E_used_per_day = 720mW.h / 12.1mW.h = 60 |