Do-it-yourself "smart home": scheme and equipment. How to install the Smart Home system yourself? Smart home - what modern automation systems can do

Films often show a living space that seems to take on a life of its own. Light bulbs light up at the wave of a hand, curtains open, after a certain word music plays. All this equipment is an intelligent home system, and we propose to consider how to make a smart home with your own hands, what is needed for this, and also what is the scheme of such a system.

Smart home - what is it

Smart House is home automation, which is a residential extension of building automation. Home automation can include centralized control of lighting, HVAC (heating, ventilation and air conditioning), home appliances, unlock gates, doors, GSM and other systems to provide improved convenience, comfort, energy efficiency and security. It should be noted that for some categories of the population (the elderly, the disabled) this event may become necessary.

Photo - Smart home distribution ideas
Photo - Simple smart home

With latest implementation into our lives SMART technologies, many can no longer imagine their lives without automatic installations, software, we need wireless Internet, Appliances.

Home automation refers to the use of computer and information technologies For driving household appliances and their functions. It can vary from simple remote control lighting to complex computer/micro-controller based networks with varying degrees of intelligence and automation. Home automation should preferably be as simple as possible.


Photo - Smart door lock

Benefits of using " smart home» in an apartment based on PIC or WAVE:

  1. Economical time spent on daily setting up various mechanisms, receiving calls, sending mail;
  2. The use of gaseous or liquid fuels, and later the use of electricity, allowed increased automation in heating systems, reducing the labor required to manually refuel the heater and stove.
  3. The development of thermostats has made it possible to adjust more automated control heating and later cooling;
  4. So often the protection of industrial facilities, residential premises is carried out;
  5. As the number of managed devices in a home increases, their relationship rises. For example, an oven can send notifications when it needs cleaning, or a refrigerator when it needs maintenance.
  6. AT simple installations, smart can turn on the light when a person enters the room. Also, depending on the time of day, the TV can tune in to the desired channels, set the air temperature, lighting.

Smart home can provide interface-access to home appliances or automation, to provide control and monitoring on your smart phone, through the server, Mini Smart for iPhone, iPod touch, as well as using a portable computer (requires special software: AVR Studio).


Photo - Home control via tablet

Video: Schneider Electric smart home system

Smart home elements

Home automation elements include sensors (such as temperature, daylight or motion detection), controllers, and actuators such as motorized valves, switches, motors, and others.


Photo - House control scheme

These are heating, ventilation and air conditioning, HVAC can control temperature and humidity, for example, the Internet control thermostat allows the homeowner to remotely control the heating and air conditioning systems of the building, the system can automatically open and close windows, turn on radiators and boilers, and underfloor heating.

Lighting

These lighting control mechanisms can be used to control household light appliances. Also here can be attributed the system of natural lighting, the work of blinds or curtains.

Photo - Scheme of a smart home

Audio visual

  • Remote control presence effect (This is the most modern technology, which is used to increase security). It consists in lighting the light, musical accompaniment.
  • Imitation of presence
  • Temperature control
  • Brightness control (electric lamps, street lighting)
  • Security (alarm, blinds).

How to make a smart home

You can make an intelligent system with your own hands, the most a budget option- This is a setting to control the lighting in the house or turn on the computer.


Photo - Smart home control option

To make a lamp that will “light up” by itself, you will need to connect to it special equipment. There are several options for solving this problem:

  1. Install an acoustic relay (1 or x10-wire);
  2. Connect dimmer;
  3. Connect motion sensor.

The easiest way to work with the sensor. Its sale is carried out in any online store, you can buy a channel device, you can develop your own according to your own parameters. The only remark is that you cannot install an incandescent lamp with such a device, it may not withstand the load and explode, it is better to work with LED.


Photo - Smart home concept

Another "smart" silent option is a dimmer. Here you will need to touch the lamp, depending on the number of touches, the talking device will change the brightness. It is very convenient to use on the lamp in the bedroom, nursery.

To set up temperature control and regulation, we need a multi-channel system. central scheme temperature and humidity control consists of:

  • Sensors (ds1820) that measure the physical state of the liquid, air.
  • Controllers (rfm12) which can be simple physical components and complex devices special purpose or embedded computers.
  • Lunex drives that respond to controller signals.

Most modern way is to buy all the components of a smart home, wires, thermostats. After installing the appliances in each room, one thermostat per radiator and one per boiler. You will also need a controlled unit, or the "brain" of the entire system. It is recommended to mount it on the heating inlet pipe.


Photo - Smart home system

The easiest way to install a video surveillance and alarm system. Fundamental provisions for the installation of security systems:

  1. You need to connect sensors on the windows, doorways, there the electrician will be the most productive;
  2. The board is the most difficult to select, the smart home controller, the operation of mediocre parts, the level of signals depend on it;
  3. Many experts believe that indicators should be mounted at floor level. About 20 cm from the baseboard, this increases efficiency;
  4. It is desirable to establish permanent monitoring, to establish a digital system of contact with the security service. Often, responsible owners install a special program on their personal computer that allows you to control the operation of the system from anywhere where there is an Internet connection (this is what Elena Teslya and her book: “Smart Home: How to Do it Yourself”, also have other solutions ). You can enable SMS alerts.

A smart home is a very convenient way to make your life easier, often the whole system is bought completely (Arduino, KNX, Linux).

The cost of each system is individual. The most popular brands are: beckhoff, gira, lpt, redeye, Smart Switch IOT screen, teleco. We recommend that before you build such housing, consult with experts, they will help you calculate the load level, calculate the power consumption.


Photo - Light control via phone

To get ideas, you can scroll through V.N. video instructions, read the advice of famous masters.

Automation is increasingly being introduced into everyday life modern people. And if earlier automated production could be considered the pinnacle of progress, now even life, an apartment or a private house, can be radically improved quite simply by introducing the concept of “smart home”. After all, today "smart home" systems are designed not only to optimize energy costs, but first of all - to make a person's life more comfortable. The possibilities of modern "smart home" systems will be discussed in our article.

Combine into one system home theater, lighting control, water supply, video surveillance system, climate control, power supply and access control, gas supply and multi-room - this is the task that the smart home system solves today. Let's go through each of the points sequentially, consider what they can do modern systems automation in relation to our everyday life.

Climate control

The microclimate of public and residential premises greatly affects our performance, and health in general. Indoor air conditions vary depending on operating modes climate technology. Heating and ventilation equipment, lighting equipment, other devices - all this together has a certain total effect on human body, for well-being, for health in the end. And technology is getting more and more complex.

Automated systems allow not only to quickly control and manage all this equipment, but ultimately take care of our health. Tracked by sensors Current state air in the room, and through the control panels, the operating modes of air conditioners and supply ventilation, and heating. That is, the climate is adjusted automatically to the requirements of a person, which are set by preliminary settings.

So climate control allows the following. Air quality control depending on the weather outside the window and on the time of day. Timely ventilation of the premises by controlling the heating and opening windows.

Underfloor heating control. Maintenance optimal temperatures and humidity individually in each room. For example, a food storage room requires its own special climate, which is different from the climate in the living room or in the kitchen, etc.

Temperature, humidity, air flow control fresh air, air purification system and ozonation. In each room, the conditions should be different, most suitable for each family member, taking into account the place in the house where this room is located: some to the north, some to the south, and control in each case will be individual.

Drafts are unacceptable in the nursery, the bedroom should be warmer, the bathroom floor should be warmed up in time, and you don’t need to keep it warm all the time. That is, the control turns out to be optimal so that the energy saving effect would also take place.

The setting varies according to the lifestyle of the family or the collective. On weekends, the heat supply to the working premises is reduced or switched off.

Autonomous heating system country house- on the contrary, it is included on the weekend. The boiler is remotely turned on or switched to an economy mode, etc. Everything is rationalized to combine efficiency and comfort of life. This is especially true for water supply, electricity and heat supply.

Entertainment

For a long time you will not surprise anyone with a home theater. But manage out different places sound and video, as well as stereo systems located throughout the apartment - these functions are just implemented using the "smart home" system.

The home cinema is connected to an automated system, and the whole complex of multimedia equipment, together with auxiliary devices, is harmoniously integrated into the apartment. There can be several sources of sound and video, and they can be multi-channel: Acustic systems, receivers, plasma panels, projectors - everything is controlled directly or remotely from anywhere in the room.

You can watch movies and shows, listen to music in all rooms or just a few, program a scenario and activate it with one button from the touch panel or from the remote control. The script program can be written in individual conditions: blinds close, lights dim or dim, plasma panel turns on, projector pops up, player starts.

Scenario programs can be edited, set in time for automatic start, set related settings for watching movies, for example, turn on the air conditioner near the place where the home theater is installed, if the weather is hot.

The "multi-room" function is exactly the function that allows you to hear sound or watch video in several independent areas of the apartment. It becomes possible to control the volume from any room, each of which has push-button or touch, wall or desktop control panels, as well as remote controls.

What could be a more expressive sign of the intelligence of the "smart home" system than smart control lighting? Smart home lighting is truly intelligent and therefore economical. Electricity resources in an apartment, house or office are used as economically as possible, without unnecessary extravagance.

The advantage of an automated lighting control system is that, based on data from external and outdoor lighting sensors, as well as timer data, it allows you to turn on and off the light of the desired brightness and only where it is really needed. In addition, they open up a wide scope for creativity. In addition, the option to simulate the presence of the owners is available.

The modern "smart home" system is a complex of technologies for comfort, safety and efficiency. Stability is ensured by integration in the event of a centralized power outage, so that the electronics remain operational at all times.

Batteries and inverters, chargers and liquid fuel generators are installed in the system and software integrated. In the event of a power outage, the system will automatically switch to backup source, in extreme cases, the batteries will remain powered by security systems and the most important equipment.

Automated security system

The smart home system includes, as part, security and fire alarm and video surveillance, so that both the stay of the owners in the house and their absence would be safe both for the house and for the owners themselves. A video intercom and a perimeter security system can be installed here to protect against uninvited guests.

As for security in general, the smart home system is able to provide: short circuits in electrical wiring, protection against water leaks, protection against gas leaks, by triggering a smoke detector and turning on an autonomous fire extinguishing system, autonomous power supply, alarm system, automatic rescue call.

Thus, a “smart home” will protect itself and its owners from any dangerous situations, because the system can include: automated gates and doors, automatic security shutters, a video surveillance system, a burglar alarm, presence sensors, smoke sensors, gas leaks, etc.

Access control to the premises, video surveillance of adjacent territories, the inclusion of searchlights when penetrating through the perimeter are three more pluses in the treasury of advantages. Through the Internet, the owner will be able to remotely receive a picture from any of the cameras of the video surveillance system, and the baby monitor function can also be attributed here.

Video surveillance as such

Intelligent video surveillance is one of the main constituent parts modern " smart homes". Video cameras are connected to the Internet, and allow you to access yourself from anywhere in the world.

The owner can be abroad, while quickly monitoring any of the zones, and the video cameras here can be controlled. For example, controlled cameras are usually equipped with gates, courtyards, nearby buildings, and platforms near the doors of apartments. The operation of the video camera can be paired with a motion sensor, and signals can be sent to the control center.

The Internet and satellite television networks, as the main sources of information, are conveniently integrated into smart home systems today. Being inside the house, the owner can receive information and send it to various premises, on TVs and monitors. This also applies to the transmission of information received from video surveillance systems. Thanks to the "multi-room" function, all these possibilities open up. Of course, via the Internet it is possible to configure, if desired, remote control.

Control with mobile phone through direct voice commands and via SMS is available today for owners of "smart home" systems. You can also set up call forwarding to your mobile phone if you are away from home, even if you are in another country.

If necessary, you can let guests into the house by simply sending the appropriate command from your mobile phone to your automated system. Similar opportunities are conveniently implemented via the Internet, it will be enough to find Wi-Fi for a smartphone or laptop.

Andrey Povny

Today, the dear reader and I will have to figure out how automatic water supply for the home is arranged. We will get acquainted with the main elements of the water supply system, their functions and find out how their operating parameters are configured.

Purposes of application

What functions does automation perform?

There are actually only two of them:

  • Maintaining stable water pressure in the water supply.

Please note: water, like most liquids, is practically incompressible, so even at its minimum flow rate, the pressure drop will be very significant. To stabilize the pressure, a hydraulic accumulator is used - a tank divided by an elastic membrane into air and water compartments.

Pressure switch

How is the automated water supply of a house from a well or a deep well arranged?

  • Responsible for water supply submersible pump(membrane, vortex or multistage). Its task is not only to raise water from a depth, but also to compensate for hydraulic losses at the water supply inlet, shut-off and control valves and in the water supply system, and also to create the excess pressure necessary for the normal operation of sanitary equipment;

Reference: according to SP 30.13330.2012, in the absence of other information from plumbing manufacturers, the value of 2 kgf / cm2 (2 atmospheres) is taken as the minimum pressure in the internal water supply. In practice, the vast majority household appliances(dishwashers and washing machines, water heaters, etc.), faucets and fittings drain cisterns normally performs its functions at a pressure of 0.3 kgf / cm2.

  • The hydraulic accumulator allows you to make the pump starts more rare, compensating for the drop in pressure with a small flow of water. In addition, it smooths out pressure surges during pump starts;

  • At the outlet of the pump is check valve(as a rule, spring - with a brass or plastic shutter and a stainless return spring). It locks water in the water supply and accumulator when the pump is turned off, preventing it from draining back into the well or well under its own gravity;

  • Automation serving the water supply at home (pressure switch) starts the pump at a critical pressure drop and turns it off at the moment when the water pressure reaches the upper set point.

How it works

The most common type of relay is electromechanical.

They are extremely simple: the microswitches of the circuit supplying the pump are closed and opened by the movement of a spring-loaded piston during fluctuations in water pressure.

When the pressure drops, the circuit closes, when the upper bar set by the manufacturer or owner is reached, it opens. Adjustment of the upper and lower actuation limits is carried out by nuts that change the spring compression force.

A special case

Electronic relays are found on sale somewhat less often than electromechanical ones. The reason is obvious: with the same functionality, their price is much higher. If an inexpensive electromechanical relay costs the buyer 250-500 rubles, then the cost electronic appliances starts from 2500 r.

The basis of the electronic relay is a piezoresistive pressure sensor. When the piezoelectric element is mechanically deformed, a weak current on its contacts is processed by the control electronics, after which it turns the pump power on or off.

Does it automatic system home water supply with an electronic relay any convincing advantages?

We will allow ourselves to give a list of the advantages of the Aquacontrol RDE device from the website of one of the sellers:

  • Adjustment of the relay parameters (pump start and stop pressure) without opening the case, through the control panel;
  • Protection against frequent switching on of the pump (for example, in case of a check valve failure);
  • Electronic relay allows you to protect the water supply from breaking overpressure(if it does not fall to the lower specified threshold);
  • In addition, it will prevent flooding of the house in case of leaks: the pump will turn off if the pressure in the water supply does not reach the upper threshold for a long time;
  • Finally, the relay provides for operation in irrigation mode, without monitoring for possible pipe breaks or leaks.

Pumping station

The automation responsible for the water supply of a private house is often mounted by the manufacturer on the same frame with a surface pump and a hydraulic accumulator. The resulting structure is called .

The principle of operation of automation is no different from that described above: the pump turns on and off when the lower and upper threshold pressures are reached. As a rule, pumping stations are equipped with inexpensive electromechanical relays.

The modern market offers two types of pumping stations:

  1. No ejector. The rise of water is provided by the vacuum created in the suction pipe. The suction depth in this case is limited by atmospheric pressure at the level of 8-9 meters;
  2. With external ejector. Two pipes are lowered into the well or well - suction and pressure, supplying water with excess pressure to the ejector. Due to the Bernoulli effect (falling hydrostatic pressure as the flow rate of the gas or liquid increases), the jet entrains the masses of water surrounding the ejector.

Curious: the use of an external ejector allows surface pump lift water from a depth of up to 35 meters. The suction depth is determined by the power of the electric motor and the pressure pipe pressure.

Do-it-yourself connection of the pumping station to the internal water supply has one feature: a check valve must be installed at the end of the suction pipe (preferably with a mechanical filter). What the instruction is connected with has already been mentioned above: without a valve, water from the accumulator and water supply will pour into the well immediately after the pump is turned off.

Reducer

Another element of the system for automatic water supply at home is, or a reducer.

It limits the pressure in the internal water supply to a predetermined value.

This is necessary in two cases:

  1. If there are different pressure requirements in different areas water supply circuit;
  2. When connecting the house to the main water supply with a pressure exceeding the standard (according to SP 30.13330.2012, 4.5 atmospheres). Deviations from normative values may be caused by the specifics of development (neighborhood of private and multi-storey buildings) or terrain (if your house is at the bottom of a high built-up slope).

The most common piston gearboxes work due to the difference in the area of ​​​​the piston and valve and, accordingly, the force acting on them at a constant pressure. With an increase in pressure, the piston moves, overcoming the resistance of the spring, and closes the valve.

Adjustment

How is the automated water supply of a private house set up, and in what cases is it necessary to set up the equipment?

Let's start with the second question.

Adjustment allows:

  • Increase the shutdown pressure of the pump and, thereby, the maximum pressure in the water supply;
  • Raise the cut-in pressure by decreasing the head delta. Constant changes in pressure over a wide range are inconvenient if you, for example, wash dishes under a thin stream of water;
  • Reduce the cut-off pressure and, after it, the frequency of switching on the pump. It is the number of starts that determines the resource of the device: starting currents and significant mechanical loads at the time of switching on significantly reduce the service life of any equipment;
  • Change the pumping pressure of the accumulator (pressure in the air compartment with an empty water supply), thereby reducing or increasing its capacity;

  • Adjust the constant pressure in the water supply or on its separate area(say, before washing and dishwashers) using a reducer.


Let's move on to the settings.

Relay

If electronic relays are configured through the control panel, then in the case of an electromechanical device, we will need to open its case.

Captain Evidence suggests: for safety reasons, the relay or pumping station must first be disconnected from the power supply.

Under the cover you will see two springs with nuts of different sizes.

The large one is responsible for the shutdown pressure (clockwise rotation increases it, counter-clockwise decreases it). A small nut, when tightened, increases the pressure delta between the off and on points.

Hint: as a rule, the factory settings of the relay are 3/1.5 kgf/cm2. They are safe for any pipes (including polymer pipes) and provide normal work household and sanitary equipment.

Hydraulic accumulator

To adjust the pumping pressure, we need to find a nipple on the body of the membrane tank. Usually it is hidden under a metal or plastic cap. The device and size of the nipple are no different from an automobile or bicycle valve.

To bleed air from membrane tank, it is enough to press with a screwdriver or any other suitable object on the short rod in the center of the nipple. You can pump it up with a pump or compressor (preferably with a built-in pressure gauge).

Attention: the tank pumping pressure must be lower than the pump shutdown pressure. Usually these values ​​differ by 0.2-0.3 kgf/cm2. Otherwise, you will get a short interruption in the water supply at the moment the accumulator water compartment is empty.

Reducer

The adjusting screw is usually hidden under plastic lid on one of the ends. Adjustment is carried out with a wide flat screwdriver: turning clockwise increases the water pressure in the internal water supply.

Conclusion

We hope that we have succeeded in satisfying the curiosity of the reader. The video in this article will help you learn more about how automated system water supply of a private house. Good luck!

chouck December 4, 2012 at 06:16 pm

From home automation and smart homes in general to specific example

  • DIY or DIY

The main reason that home automation systems have not yet become as popular is the emphasis on lighting that is usually put in their promotion. After all, blinking light (like LEDs on Arduino) without getting up from the sofa is pampering that has no practical value and repels people from serious thoughts about the implementation and use of home automation systems in their homes and apartments. No one needs to flash the light (which is usually used for 90% of the functionality), but for example, controlling the heating individually in each room is convenient and saves energy = money. The exorbitant prices for the (penny at cost) components of ready-made home automation systems for sale, together with the prices for integrating them, only add fuel to the fire. I hasten to assure you that the most expensive component we will have is the $20 Arduino Mega. If we consider the issue as a whole, then I see only the following list of tasks that it makes practical sense to centrally automate:
> climate control of temperature (heating/air conditioning) and humidity (humidifier/dehumidifier),
> control natural light(blinds, shutters, awnings)
> and management of watering lawns, flower beds and lawns around the house (if any and they still need to be watered).
From decentralized systems it is convenient to have a local (without central control 1-2 sensors that control the backlight directly) triggered by motion (presence) sensors, low-power LED backlight stairs (sometimes floors) and parts of tables in the kitchen that are shaded from normal ceiling lighting wall cabinets and shelves. The same lighting, in combination with those listed above, is indispensable at night when it is necessary, without waking anyone, and first of all yourself, to get into the kitchen (and cut something from something there and eat without sharing with anyone) or to another institution without stumbling about prudently scattered children's toys. It also makes sense to turn on the main lighting with motion sensors ONLY in technical rooms: closets, pantries, garage, laundries, etc. motion sensors and centralized systems not practical to use for basic residential lighting. External and decorative festive illumination at home, it is most convenient to switch on from cheap ready-made blocks with light sensors and / or timers. Real security systems connected to response services (not just sensors and webcams scattered around the house) usually does not make sense to mix with smart home systems for many reasons.

So let's start with the most relevant. The ideal object is heating that can be controlled, for example: electric (batteries on wheels in the socket and wall batteries) and centralized or not very heating of a private house. In my example, we will consider working with a Thermo Pump system (Heat Pump in North America) with oil heating by means of direct connection to an existing Control Unit (thermostat) and additional devices. In the first version of the system, I used X10 protocol devices and sockets. But unfortunately they did not perform well, due to the slow interface and very loud switches when switching, which woke up everyone at home. Subsequently, I switched the system to a radio socket, which turned out to be much easier and quieter than x10. These sockets are available in a huge range of RF frequencies and voltages. All this is applicable to a huge variety of other systems. It all started with the fact that my friend, along with a neighbor, unobtrusively dripped on my head about the huge role of a wonderful miracle - Arduino in modern society and that I, as a person who knows how and loves to hold a soldering iron, is simply obliged to catch this Arduino mania as soon as possible. I shrugged it off in every possible way and said that the area of ​​\u200b\u200bpractical (not a robotic toy) application of her house is very doubtful and based on a powerful microcontroller, sequentially lighting up LED rulers to illuminate the steps of the stairs (instead of one shift register and a generator) is just from a sparrow gun and the rest is prank . But still, they managed to plant the grain of Arduino in my head, and like all the grains, with the advent of spring and on the outskirts of summer, the sprout began to break through. I don't like hobby projects for projects' sake. Some practical side should be present, and even more so since resource ($ and time) capacious projects for a family person should also have a high WAF (Wife acceptance factor) or, as my Dad says, it is easy to legalize it.

And as always, laziness was the engine of progress. We sat a little after noon on the veranda, the sun was pleasantly hot, and at the same time in the bedroom on top floor my son was sleeping and, judging by the Chinese thermometer for $ 2 (which you still had to walk to and see without waking your son) the temperature was over 26. So now we need to go to the living room and turn on the central air conditioner, and then we also need to turn it off so that it does not turn on every time the temperature rises a little. It is especially unpleasant to do this in the summer at night, freezing under a light blanket, you have to jump up and, again, without disturbing all the household members, run into the living room to the remote control and cut down this achievement of the last century. Then I realized that it was time to stop such a disgrace and call a friend with the words "Where is your vaunted Ardunya, Let her here right now, we'll see what she's capable of!". I must say right away that I didn’t choose it at all and didn’t think that it would turn out to be so worthless (for example, in working with strings) and even out of anger and impotence to fight it further I almost moved in the middle of the project to STM32. In the end, he still stayed with her, but first things first.

To make it easier to understand why everything is done this way and how you can spread my experience and achievements on bread, let's start with a description of what I have / had at hand:
1) Private house in Canada (I would like to say that it is mine, but of course it belongs to the bank and no matter how absurd it may sound, it is not even profitable to have it fully paid at current rates) built in 1959, as they are called here Split Level, those two-story house but half it is shifted vertically relative to the other half to the floor of the floor.
2) Arduino Uno(subsequently, due to the small number of I / O for X10 and radio, Mega was required)
3) expensive and native Ethernet Shield. I didn’t manage to launch something and find an adequate library for ENC28J60
4) Desire, time and some money.
As is customary here, the bedrooms are on the top floor, and for me it turns out to be half a floor above the living room, where the ominous control panel for the heating and cooling system is screwed to the wall. Here such systems are called HVAC (heating, ventilation, and air conditioning) but in fact it is a usual huge (tens of thousands of BTUs or they measure them here in tons of something) split air conditioner whose external heat exchanger and compressor are located outside and inside the heat exchanger is built into the central ventilation system, which takes air from the floor level of the living room with a one and a half kilowatt fan, drives it through two heat exchangers (one to the air conditioner, the other from the oil or gas burner) and drives into each room according to the system of boxes. The convenience and the very name of the heat pump is due to the fact that this device can drive freon in both directions and, accordingly, not only cool but also heat the air in the house. It should be noted that he can heat it more or less effectively only if it is warm enough outside 0 or -5 (depending on the model and design). If it is cold, then the heat pump will not work, and for this, a tank with fuel oil or gas is needed.

I started my project and ambitions small, so let's take a look at how this HVAC is made and how to manage it. In fact, it turns out that the devil is not so terrible. One of the conveniences is the liquid standardization of everything homemade and not very in America, this allows you to cross hedgehogs with snakes according to an open, simple (sometimes too much) and well-known (usually ancient, condo) protocol / standard. In our case, the system itself (a fan, a burner, heat exchangers, you can buy an air conditioner from a second manufacturer, a humidifier from a third, and a Control Unit for all this from a fourth. To be honest, I don’t know if similar devices are also called / controlled in Europe, but I think that everything is either licked or very similar As far as I understand, such systems already exist in Russia and they are transported from anywhere / cheaper, so you have a good chance of encountering just such a system.Let's look at a diagram of a typical system connection before we start crashing into the system.

As we can see, almost everything is clear at a glance. The only thing that needs to be clarified is that the control unit is powered and the heat pump itself is controlled by alternating 24 volts. which are supplied from the input transformer R and C. Line C is common and is always connected. Accordingly, when applying R (short circuit) to Y, O, W or G, it turns on respectively. block. This is what we will deviate from. So if they include, then the worse we are? Let's make it ours new system will complement the existing one. Those controls can be carried out from the old console and controller as before, but only when necessary, the Arduino can disconnect the old system from control and take the furrows into its own hands and then give them back. Put the relays.


Moreover, we set them so that without power and generally disconnected, they retain their previous design. R-0 disables the standard control module and transfers control to our Arduino. R-1-4 apply the desired voltage to the corresponding line. This control voltage R is applied to each relay green wire. Of course, it’s good to manage, but the system is serious and if we accidentally or not really turn on something wrong or in the wrong combination. For example, the heat exchanger will heat up and the fan will not drive air and remove heat from it, it can overheat and lead to a fire, but we don’t need it at all. To avoid such situations, let's make a triple protection. And so the first bastion will be the voltage sensors on each line S1-4 (there should be 4 of them).


They are a diode, two resistors (divider) and a small electrolyte. It can be a hinged assembly as in the photo. As a result, we can know in Arduino whether there is actually voltage on each of the control lines or not. Accordingly, if the current state of the control lines (Y, O, W, G) does not correspond to what it should be, we display an error code and turn off the system. The next bastion is ours additional sensor temperature in the heat exchanger chamber (plenum sensor). If it is too hot or cold there (close to 0C), then we again display the code and turn off the system. Obviously, it is impossible to power the relay directly from the outputs of the arduino, so you either need to pile up a transistor for each relay or buy finished module with several relays and transistors on one board. I buy 99% of my components from eBay. For example, Ibee is full of such 8 channel modules (8 Channel Electronic Relay Module) for about $ 9. or you can buy 4+2 (because we really only need 5 and one spare)

I used Chinese digital DHT22 as temperature and humidity sensors which have performed well. They need only three wires +5, GNd and Data. The wires can be quite long without loss of accuracy and signal. One sensor is thrown outside into the shade and under a canopy from direct moisture. One sensor in the house.
In a house already built many years ago, usually the most a big problem it is to run new wires, so I tried to use the current wiring as much as possible. There are several libraries for DHT22. I've had problems with all but this one. I placed an internal DHT22 next to the wall control. If your house, like mine, once had an HVAC control system, then you should already have a 6-wire cable going from the control unit to the place where the remote control itself hangs with an indicator and buttons. Modern remotes (like mine) require only 2 wires. Thus, we have at our disposal 4 already laid wires. In them we run +5V, GND, Data for the internal DHT22 and on the last Serial (UART) Tx from Arduino to display information on the display.

As a display, I used a small (2.5 cm) OLED screen with a serial interface.
YES, it is a bit expensive, but there are several unique differences from similar ones available: The presence of a Serial (UART) interface, which allows you to use only one wire to connect it, the presence of five digital pins on the screen controller (where we will connect an RGB LED to additionally display the system status) and finally, compactness combined with contrast and excellent readability both in bright light and at night, and it does not illuminate the entire corridor at night like any LCD with a permanently on backlight.

Then the problem arose of how to place temperature sensors in each room, without additional wires, power and radio modules. As a sensor, I chose a digital DS18B20, (having a good accuracy of + - 0.5C) which needs only two wires (ground and signal). You can hang a lot of them on these 2 wires in parallel (each has its own unique MAC address). But even stretching two wires all over the rooms is a hell of a job. Here it dawned on me. After all, a telephone cable is laid in all rooms and it is 4-core and at best 2 wires are used for the telephone (usually red and green), and the rest (yellow and black) pass through all the places I need and remain free. Thus, without cutting the wires, but only exposing the necessary two, I soldered DS18B20 to them in each room.
The total length of the wires turned out to be quite large, and if the signal wire was supported (at + 5V) by the recommended 4.7 kOhm, then in my case the sensors were practically unreadable and I reduced the supporting resistance by half to 2.3 kOhm and everything worked fine.

Then I got confused by the pressure sensor and settled on an expensive BMP085 but it has an I2C interface, which again saves legs and the number of wires. Since he can still read the temperature, I put him in the basement, where it was closest and easiest to pull new wires (already 4). I tried to use the standard telephone cables and connectors (RJ11) so that the design is disassembled and repairable - replacement suitable.
When connecting this barometer to the same I2C bus as the RTC (non-volatile clock module), not very clear problems arose. They interfered with each other, and until I set a small delay before reading the barometer, everything was not stable. Since short temporary power outages are not uncommon and the RTC module worth a penny I added it for non-volatile time. basically needed when using x10. Using it, there was a desire to automatically synchronize it with NTP via the Internet (since we already have it), but somehow I couldn’t cross the webduino server and NTP. As a result, the NTP time (Unix epoch) is sent to the Arduino (and updated by the RTC) every time any settings or modes are changed in the web interface. Which has its drawbacks since it is taken by JavaScript from the time on the current computer, or mobile device and not always accurate and in the correct time zone.

I send commands to my radio sockets Arduins on the air using a penny ($ 2) transmitter module. They are a dime a dozen on eBay (search for "RF transmitter 315 Mhz ..") and in any store. The only thing you need to do is choose the correct radio frequency for your sockets. Unfortunately my sockets were not correctly supported by the standard RCswitch library. in the description of the library there is a list of supported chips, but do not be upset if yours is not on the list, it worked for me after analyzing the ether manually and without the library. A lot has been written about similar sockets, working with the library. In particular, here: http://habrahabr.ru/post/213425 http://habrahabr.ru/post/212215 I used 110V sockets
. Despite the fact that radio control requires a non-standard solution, it is the simplest and most budget decision standing task. Namely, turn on and off electric batteries or any other device (not necessarily resistive) in time or manually, and sometimes turn on / off the outside light. Insteon, Zwave and others have a lot of sometimes unnecessary additional features but an order of magnitude more expensive and have problems with the openness of the interface so that Arduino can send simple commands to devices. The only problem with x10 sockets, Insteon and others is that they click very loudly during switching. This is especially annoying on a quiet night. One more nuance: x10 was sharpened and popular in North America and, accordingly, under 110 Volts. Here everyone chooses for himself. Or pay a lot for:
Z-Wave - there are no ready-made sockets, there are relay modules of a strange shape that also click quietly, and they have to be hidden somewhere, somehow in the walls, then immured, it is not clear how to service them - change / repair. But there were USB modules for sending commands. But for this you still need a microcomputer (perhaps a router is suitable) with the correct OS drivers, etc.;
Insteon - there are sockets, but they also click nasty like x10 and as far as I understand there is no open module for sending commands and the system is again sharpened for 110V;
You decide to bother with integration and sending commands to this network or pay 5-10 times less for each radio device and, if necessary, undermine the code for it. Like any other thing, everything for 110V is cheaper. Of course, there are still extreme ways, such as, for example, the idea described by several authors here, to entangle the entire apartment (house) with a pair (and in fact a bunch) of hammer wires and manually assemble each control and controlled device from scratch using the 1-Wire protocol. Some have gone even further and are developing their own protocols…

Also, as a kiter, I screwed an anemometer (wind speed sensor). To measure it, I used a cup sensor at hand with a reed switch closing 1 kOhm between two contacts when the cups rotated. The program uses an interrupt and measures the number of times + 5V is applied (transition from 0 to 1) to a digital input (powered by 5 kOhm to the same + 5V). Given value multiplied by a factor suitable for your sensor and from the number of short circuits in one second the wind speed in knots is obtained. Also, for each hour, the maximum and minimum value speed (gusts) and displays the maximum per hour. In the web, the current and maximum are given. Each sensor must be calibrated individually and the correct coefficient must be selected. To control the garage door, I used a spare radio remote control from it and, using an additional relay (sixth), emulated pressing a button on the remote control (by opening the remote control and soldering it into the button contacts).

The communication protocol of a standard thermopump control unit with its remote control (usually 2 wires) is usually closed and our arduina cannot know what mode and settings are set in the standard control unit, but with the help of our sensors we can know what mode HVAC is in now and although they also there is a temperature sensor in the heat exchanger additional protection With the help of an Arduino, it won't hurt. I am often asked: Isn't it scary for me to trust Arduino to manage such a responsible system from my own house? My code is open and transparent. I understand what is happening and I can always catch and correct the inaccuracy (if there are any left after six months of using the system). And most importantly, I can add any features that I need. In the same box, most likely a less powerful controller and of course there is nothing to change or add. Without an arduino, adding again limited functions like access from the Internet to a standard CU costs a new box of hundreds of dollars. It all started not from the fact that I wanted to save money, and I needed functions that were convenient for me that could not be bought from equipment manufacturers for any money. But of course, if we take into account the price of man-hours spent by me, and even by you, if you just decide to do something similar based on my and other developments, it’s certainly cheaper for this project to buy a ready-made one, but say goodbye to flexibility and desired functions. It's about how to install FreeBSD and painstakingly long and for every reason to delve into the flea market of Internet knowledge and manually tweak it from the command line for yourself in comparison with Mac OS, beautiful ready-made but limited based on the same BSD. The main one is the inclusion of heating / cooling to the desired temperature not forever or on schedule, but only for an hour or 2-4. It sounds simple and convenient but is not present in standard BU.

If you want to control only a thermal pump without RF, RTC, barometer and other memory and leg problems, Uno will also have enough (I did this in the first phase of my project). In the full version, Mega is indispensable. Let's take a look at the resulting functions and interface.

The interface itself is made within just one html page using Ajax technology to exchange data with the Arduino web server (webduino) and is based on the JQuery Mobile libraries. Therefore, several image files and libraries themselves are needed to work, which can be replaced by links.

In the upper left corner, we see the moon, which means that according to the day and night settings (in the first line of the blue block), the night mode is now. If the day mode there will be sun. Next we see our house. In the house there are a lot of temperatures in each room and in the center the temperature is with tenths, this is the temperature in the living room at the main level. In green at the bottom of the house we see the relative humidity inside the house. To the right of it is a snowflake, this is an indicator that the air conditioner is working now. In this place, other operating modes are displayed with different icons (heating with a thermopump or AUX or x10). If the icon is muted (translucent), then the system is in this mode but not active. Those. for example, in air conditioning mode, up to a temperature of 21 degrees, but since it is now 20 degrees, the air conditioner is not active. If two modes are working at the same time, for example heating x10 and heating with a thermopump, then two icons will flash in sequence. To the left and right of the house, we see the rays, when you click on which they become bright and when you press them again, they are muted. This is the inclusion of external lighting near the house. I have outside lights in my backyard and front of the house. Control is transferred by x10 and the numbers of the corresponding devices are written in the html (JS) code, Arduina only sends commands to the device numbers transferred to it from HTML. To the right of the house we see an automatic garage door. which opens and closes when you click on it. On the top right of the house, we see the current (averaged over 1-2 minutes) or the maximum per hour wind speed in knots. Wind speed value is highlighted different colors from blue to red depending on the speed and in accordance with the internationally accepted colors of the Beaufort scale. On the top right, we see the temperature outside and below the current atmospheric pressure. The pink background for the pressure value is a graph of its relative change over the past 24 hours (x-time, y- relative value pressure). Pressurized green relative humidity outside.

Now consider a group of white selects and a SET button. The desired temperature/mode is selected with the left selector. Right for how long to enable this mode. If the mode is active, then the inscriptions will change a little, as in this example
If the heating mode is active, then the button will additionally be tinted red and if the cooling mode is blue. To turn off, leave the temperature and the selected mode on the left and the remaining minutes on the right, and then the SET button will change to OFF and pressing it will turn off the mode. The cooling or heating mode is selected automatically depending on the outside temperature. If the street is less than the value of the heat_temp constant described in the html(JS) file, then only heating will be offered, otherwise only cooling.

Now let's look at the blue x10 block. Clicking on the first line opens the general settings: ON - All sockets are always on (for example, in summer), OFF - all sockets are always off (for example, if you are on vacation), Split - individual settings for groups and rooms come into effect. Then you can choose from what hour the day begins and from what night. To save the settings, do not forget to click the Apply button below. then each line represents a group of rooms which can consist of one or more rooms. I made a grouping by floors in my house. Some floors have only one room and some have more. For each group, we can set the ON mode - all sockets in this group are always on, OFF all sockets in this group are always turned off (for example, you need to turn on the vacuum cleaner and if the battery works at the same time, it will blow the fuse), Split (only available for groups with more than one room) - individual room settings within the group take effect, Day - maintain the specified temperature only during the day (always off at night), Day&Night - maintain the specified temperature for the day and another temperature at night. Each room has all of the above, with the exception of Split. For the changes to take effect, do not forget to click Apply at the bottom.

The very last line is the Override mode setting. This mode was made to force the sockets in the selected room or lamp to turn on for a while. For example, you need to heat the room as much as possible for a certain period in order for the child to massage there and after an hour continue to maintain the normal temperature in it. Or turn on the lights outside for half an hour. On the left, you select the room on the right for how long to enable the mode and press the Overrride button. If you need to prematurely disable the mode on the right, select OFF and click Override. All information is updated every upd_interval (constant from html file) seconds. Default = 60 seconds. When all information is updated top part the pages with the house are blinking.

I would also like to talk about the concept of combining sockets (pool). Let's say you have one a large room one battery is not able to heat which at -5 overboard or it will heat up for a very long time. You can supply a second RF socket with the same code/address and plug a second battery into it and they will both always turn on. What about relatively warm temperature will cause the two or more batteries to click and turn on and off frequently. There is another option, you combine these batteries into a pool in the arduino code x10pools=(0,0,0,0,0,12,0,0,13,0,0,0,0,0,0,0,0) . Zero means that the socket address does not have a pool. Number means the address of the pool's child socket. The child is turned on if it is colder outside than poolt (constant from the html file) or the gap between the desired temperature in the room and the current one is greater than delta_temp * poolf (constant from the html file). I would like to say more about delta_temp (constant from the html file) is Delta temperature. It is needed so that the modes do not often turn on or turn off, since the sensor readings can jump a little + -. Heating is switched on if the current temperature is less than (desired - delta_temp) and switched off if it is higher than (desired + delta_temp). The default is 0.5 deg C.

Now consider the issue of security. Of course, you cannot leave the management of your home available to everyone. Since our system consists of a client (JS Ajax html page) and a server (Arduino) you can arrange different levels of security. For example, you can put an HTML page on your computer, phone, tablet, etc. (without exposing it to a public hosting) and then only you (from devices that have this file) will be able to open this control panel for your home systems. Arduino web server weighs on the internal IP and therefore if you do not forward it on the router during external world, then the arduino itself can only be reached from your internal network. Access to the HTML page itself can be password-protected on the Web server where you want to post it. It is also fashionable to raise an HTTPS server in relation to it. The simplest and, in my opinion, quite reliable is the public hosting of the page, but the page itself is not connected anywhere at startup unless the address of the Arduino server is passed to it as a parameter (pre-configured Dinamic DNS and Port Foewarding). It looks like this in the browser, such a link http://myhosting.com/index.html?http://myhome.slyip.net:8081/hvac is entered. If an attacker accidentally stumbles upon your client page, then he will not be able to do anything with it without knowing the address of the Arduino server. This is the simplest and most convenient compromise option that I currently use. Yes, I also don’t like this whole construction with a poor (slow, not supporting HTTPS, etc.) Arduino Web Shield server, in addition to which I still need to separately host the client page from the icon somewhere. And as soon as I get the famous TP-LINK TL-WR703N from China
a router that in the blink of an eye turns into a wifi bridged web server with a Serial (UART) interface to Arduine, I will immediately screw it to the arduino (or it to it) and throw out this shield and wire it. Thus, it will turn out even more than what I wanted so unsuccessfully to achieve from the STM32 controller, namely that everything be in one device (not a separately hosted client page and a separate executive server) and a normal web server on which you can implement a decent degree of speed and security convenience.






B for last

What else to read