An order was received to equip the chicken coop.
Technical task:
1. Lighting. Turn on and off in time, smooth.
2. Heating.
3. Ventilation.
4. Automatic feeder, drinking bowl.
The easiest option (budget) is based on Arduino. I ordered consumables from China, and while they walk on foot to Mother Russia, I decided to prepare for the main action. Today I’ll take care of the lighting. Sketched an approximate shemka:
Arduino at a given time turns on the relay, then to the dimmer. The same principle of shutdown.
Backup power supply (if the customer agrees):
There is voltage: The charger charges the battery, which in turn supplies voltage to the converter 12 volts -220 volts. When a power outage occurs, the battery provides voltage to the entire chicken coop.
Arduina's backup power supply (agrees here without options):
As long as there is voltage, the power comes from the power supply, when disconnected, 18650 comes into operation. Enough for 3-4 hours.
Just turn on and off the electricity in time does not work. The chickens will have stress from a sharp turn on and inconvenience after turning off, they will not have time to pop on a perch. Therefore, switching on and off should occur within 30 minutes. After searching in the net for an answer, I found a trimmer circuit under the control of Arduino.
This is a modified version of the popular circuit:
Diode Rectifier: GBU-406
Field Effect Transistor IRF730
Optical pair: 4n35, but also 817 work without problems
Capacitor 68Mkfkh400 volts
Zener diode 15 volts (not available, assembled from three 5 volts)
It turned out something:
[center]
Noticed which resistor is worth it? Yes, 2 watts, if less, it gets very hot. When testing for 30 minutes, a 100 K resistor was warming up, replaced it with 2 watt, warm, but not scary, and the rest of the details are normal. The transistor is a little warm, but I'll put it on the radiator. Yes, testing on a 100-watt bulb Ilyich.
Video 2.5 second testing: https://yadi.sk/i/bUl-Uc3u3aZBMS
At the famous Chinese store there is a ready-made dimmer running PMW cost 400 rubles.Mine cost me the purchase of a transistor - 60 rubles, the rest is from the trash.
That's all for today! Tomorrow I will do the heating. Good luck!