All materials about smart home
It has long been observed that human biorhythms are strongly tied to the light and the solar cycle. And the light itself can both help in life and work, and it can be very tiring if it is wrong to choose light sources: brightness, color temperature, flickering are important here ...
But today I want to talk not about this, but about how my smart home helped to build a comfortable mode of work and sleep. And we will work with the light in all possible ways.
This material is a logical continuation of my first article about the smart house "
How a smart house did not let the cat freeze, " so the same technologies will be involved, and you can control the house using a predetermined algorithm from a computer or smartphone - these were my requirements for this technique.
')
After talking with the readers of the previous article on the smart home (
How the smart home did not let the cat freeze ), where I used the Fibaro Home Center Lite controller, I was recommended to pay attention to the
Mi Casa Verde Vera 3 controller, because “Fibaro is an iPhone among the controllers, and Vera is an android. You don't want your lips curled up? ” Of course, for me it was not an argument, but I wanted to try something new. In addition, I was interested in a huge number of plug-ins for this controller, which, as a result, were useful to me. But I will not get ahead.
Task
The windows of my room are facing south-east. So, rather quickly after dawn, the first rays already penetrate the room. And the last rays of the sun disappear after 18 hours. Sometimes a busy work schedule and dedication to one’s own business make it impossible to break away from the computer and turn on the light after sunset - one has to go to the light switch only by the light of the monitor. There is also the opposite situation, when the amount of light in the room is such that it is necessary to partially draw the curtain in order not to blind and maintain comfort for the eyes. And the task was born:
The room should be maintained at a given comfortable level of brightness automatically .
Solutions
Any task should be divided into subtasks until the most simple and effective solution appears.
Therefore, I began to look for solutions. The first and easiest was the step-by-step opening and closing of the curtains, depending on the time of day. And even such plugins already exist. But there is no feedback and the curtain will be covered, even when there is a storm and lead clouds outside the window, and when the location is halfway across the globe, my curtains will start to open at night. It did not suit me, so I went my own way.
The task is divided into the following stages.
If the time is daily, that is, from 9 to 19:
1. We monitor the brightness level in the room with the help of a multi-sensor
2. If the brightness level exceeds the comfort level, partially delay the curtain.
3. If the brightness level is lower than comfortable, partially open the curtain
4. Go back to step 1.
If the time is night:
1. Pull the curtain completely
2. Change the brightness of artificial lighting discretely.
3. We track the brightness level in the room with a multi-sensor
4.1. If the brightness level is below the comfort level, increase by 20%.
4.2. If the brightness level is higher than the comfort level, decrease by 20%.
In order for the curtain not to jerk back and forth with the running clouds or a bright flash, we set the delta of time and brightness at which no action will be taken.
In my experiments, I used 5 smart home devices based on Z-wave technology. I warn you that this material is not an advertisement, but an instruction for launching the system, so I give references to the devices I use.
Devices
1.
Z-Wave Mi Casa Verde Vera 3 Controller
2.
Multisensor AEOTEC 4 IN 1
3. Built-in dimmer
Z-Wave.Me Dimmer
4.
Z-Wave Fibaro Double Relay Switch 2x1.5kW built in switch
5.
Micromotor with gearbox
6.
4 channel relay for Arduino
Stage 1
As I already wrote, I divided the work into 2 stages. The first is the automatic lighting operation in the evening. If there is not enough light, then based on the data obtained from the light sensor, the controller increases the brightness of the light using a dimmer. Since my main light is realized by LED strips, the dimmer works only with auxiliary halogen lamps. It works like this: the light sensor sends data every 10 seconds to the controller, and the light test happens every 20 seconds. This is done so that the random flash does not turn off all the lights. The dimmer itself is mounted elementary. When the wiring is properly laid, your phase should break, and zero should be applied to the lamps. The dimmer is inserted into the wire break and is easily recorded in the controller. I have installed two lines of fixtures, but since the dimmer allows you to smoothly adjust the illumination, they were both involved. All work has been reduced to determining the phase wire and working with a screwdriver for two minutes: the first went to remove the old switch, and the second to connect the dimmer.
Stage 2
The second stage is working with daylight. When the light is too bright, glare appears and it interferes a lot. Therefore, it was also decided to automate the curtain drawing. The biggest problems started with the mechanics, because at first I took a high-speed but low-powered engine that the roller could not turn. Then I changed the engine to a compact one, but with more effort due to the use of a gearbox. Its power and speed suited me perfectly. The finishing touches were reduced to the fact that a thread was fixed to the first ring of the curtains, and the engine turned this thread back and forth. It was originally planned to put the end sensors to track the extreme positions of the curtains, but experience has shown that the tension of the thread is such that at the extreme points the engine roller slips and does not tear anything. And during normal operation, the roller has a good grip with the thread, which is provided with an additional tension roller. It looks like this:
Having learned the total time of the engine when moving from one extreme position to another, I simply divided the time by 4 and set in the settings the change in the position of the curtain by the time the engine was running in one direction or another. The DC motor has a reverse when changing polarity and then I was faced with the task of changing the polarity. A simple solution would be to use a three-position relay, but finding it was not easy. Old experience and some tricks came to the rescue.
I took the standard two-position relay in the amount of 4 pieces, pairwise connected them for synchronous switching on and off. And he controlled them with the help of Z-Wave relay. The scheme is as follows:
It can be seen from the diagram that if contacts 1 and 3 are simultaneously closed, the motor will begin to rotate in one direction, and if 2 and 4, the motor will receive a different polarity and begin to rotate in the opposite direction. To avoid confusion and close the relay in pairs, and even with the help of a controller, I activated the two-channel Fibaro Z-Wave relay. For correct operation, it is enough to apply to the in1 and in3 +5 V contacts, or the same voltage on the water of the in2 and in4 relays. The Z-Wave device itself is endowed with two relays, but they work with a single input bus. This should be considered if you want to use such a relay as two different, for example, working with alternating and direct current. As a result, we got the following control scheme from the controller of the smart home 4 relays in pairs.
To power this circuit, it took 5V DC and 220V AC. The alternating current is powered by the Z-Wave relay, and the direct current is powered by a re-arduine and an electric motor. For the operation of the entire system, I had the old adapter from some electrical device for 5V and 1A.
Now let's see how it works in reality.
Putting it all together, we get an algorithm that works on time. A virtual switch has also been added to the menu that allows you to start or stop the light tracking mode. Measurements of illumination were carried out using both a multi-sensor and a control
light meter . I must say that their testimony diverged with increasing light. I believe that this was due to the fact that the cap of the multi-sensor was made in such a way as to collect light from the entire sphere, and the sensor of the luxmeter reads from the plane of its sensor.
Conclusion
In the process of creating automatic lighting, people approached me and asked: “Is it worth it?”. But after the first draft with an alert about which I wrote at the beginning of the article, I realized that there is no limit to perfection. The point is not even that there is an opportunity to feel new technologies or to control the light without getting up from the chair. A smart home is a completely different state of HOME. How to explain the fact that I looked into the boiler room during the whole winter 4 times, simply adjusting the boiler temperature depending on the “season”? At the same time, the boiler itself worked during the hours of the lowest cost of electricity (a two-tariff counter). Or how to evaluate the comfort of living in a house where it is always fresh, and the ventilation system works quietly and autonomously, it turns itself on and off?
The whole life of a smart home consists of trifles, which, in principle, you can do yourself, but the realization that you will come into the house and you will be sure that all systems are functioning properly - here you really understand that "It is worth it!" .