📜 ⬆️ ⬇️

First steps to smart bath

In our first articles on Habré, we promised to talk about specific projects in which our system is used. There are a lot of ideas, but we decided to start with a story about one of our internal DIY projects:

I'll tell you about my attempt to automate a little bath. During the overhaul of the bath, an idea appeared at the same time to heat it. So that in winter it does not freeze, as a result, it is quickly heated. As a result of this heating, we do not let the dew point inside the bath, get rid of unnecessary condensate on the logs, the log house serves longer, well, in general, some advantages. If it were not for one minus: you will have to pay for additional heating. Then I will try to tell you how to minimize the costs of this heating and automate the process.



So. There is a private house with a heating circuit (circuit 1) from the gas boiler. Nearby, no further than 6 meters, there is a bath. It was decided to connect the bath to the home heating circuit. At the same time, to the heating pipe of the bath circuit (circuit 2), after a few meters, in the places of probable frost penetration, put temperature sensors. Circuit 2 will not always have to work with us, and not at full capacity. To control this process, a device, tentatively called “Thermostat”, was designed and assembled on the knees. Temperature sensors are connected to the Thermostat, data from the sensors are analyzed by the device, checked for specified threshold values, and a decision is made to turn on / off the relay, which in turn turns on / off the circulation pump of circuit 2. The thermostat will be controlled according to the protocol Modbus (via Ethernet). Monitoring system - AggreGate . More on this later. And now in order:
')

Pipe laying


Under the ground, at a depth of about 1 m, a 4-pipe trunk was laid. 2 pipes - heating, 2 pipes - hot / cold water.



I put it there right away so that they would not dangle in the air: a power electric wire, a twisted pair UTP-5 for LAN. To the pipe "reverse", under the heater, laid a wire with temperature sensors, attached them to the pipe. Temperature sensors selected DS18b20 series. Why them? Just because they work according to the 1-Wire protocol, and they can be hung in parallel on 1 line. What was done.





Temperature sensor on the pipe:



The sensor itself sits firmly in a sealed heat shrink:



So, we have the following sensors: in the boiler room, at the exit from the boiler room, a couple of sensors under the ground (more out of curiosity than technical necessity, because the temperature is more or less stable below the ground), in the ground, right next to the bath, then several sensors along the wall inside the bath, 3 sensors will be in the steam room (below, above, in the middle) + 1 sensor outside. The total number of sensors can be up to 20.

A little about the device "Thermostat"


Collected on his knees, in his spare time, for a couple of months. Scheme / wiring done in Proteus. The firmware was written in AVR Studio. The board was made by the method of laser printer and iron. What happened:











Main elements: ATmega128 processor, Ethernet-> SPI converter (from Arduino), screen, keyboard, 20 DS18B20 sensors, 2 AM201 temperature / humidity sensors.

The device constantly polls the DS18B20 and AM201 sensors connected to it. All values ​​are added to registers. Also in the registers are stored thresholds on / off relay for each of the sensors. Access to registers - via ModBus, via Ethernet. All settings can be changed both using the keyboard and through the ModBus registers.

To the question why to fence one’s own one, I probably already have one ready, I’ll answer: I just wanted to do it myself, for general development, so to speak. Yes, and a ready-made solution, I think, would be much more expensive.

Monitored


The monitoring system is AggreGate SCADA / HMI .

Install, run, understand.

We connect our device to the system:



We look that the data was loaded:



Everything is working.

Now we will build temperature graphs. If you do not know where to press, then you will not understand right away. I will show in order what to do.

1. In the list of registers, we right-click on the “Temperature in the street” register field, in the context menu, select “Create diagram”:

Variable / Register Context Menu



2. Next, select the “Graph on the history and / or change in real time:

Select data source



3. OK again:

Select the type and parameters of the schedule



4. In the expression field, type {tOut} / 16 , since all temperature values ​​in the registers of our device are already multiplied by 16:



5. Everything, the schedule is ready. By analogy, do the rest.

Monthly outdoor temperature:



The temperature around the circuit in summer mode, with the boiler off:



Temperature around the circuit in winter mode:





Small amplitude sinusoidal bursts are a smooth change in the temperature of the circuit with periodic switching on / off of the boiler itself. Big dips are switching the boiler to heat the internal boiler, at this time the heating cools. Theoretically, it may happen that someone turns on the hot water for a long time, and the boiler will constantly heat the boiler, and the temperature of the heating circuit can drop dramatically. This may be critical for our bath. When the frost is -30 ° C, idle for 20-30 minutes, in some places the pipe may freeze.

This problem can be diagnosed by AggreGate. Add an alarm to the minimum temperature value:





and, in the event of an alarm, send SMS:



SMS is sent using SMPP protocol. If there is no connection to the Internet, you can connect an ordinary GSM modem to AggreGate and send alarm messages through it.

It so happened that the Thermostat device does not fulfill its main purpose. The power of the internal circulation pump of the boiler is more than enough for circuit 2, and there is no need to install a second pump. Rather, you need to put the n / a valve, which, when energized, will close, and open when the temperature reaches a minimum. I did not have such a valve, so I just covered the pressure on circuit 2 a little, and left it temporarily (for 2 winters already).

At the moment the device is in operation for more than 2 years, this time everything works without breakdowns. Plans to assemble a control unit exhaust hood in the bath at the given values ​​of humidity.

Special offer from Tibbo on scheduling and monitoring of private houses


In these difficult times, we want to offer those who are engaged in building a "smart home" system in private (not multi-unit) homes free licenses for the AggreGate SCADA / HMI system:

- License AggreGate SCADA / HMI Basic for 10 devices (Modbus, etc.) without restrictions on the time and number of tags
- License AggreGate SCADA / HMI Building Automation for 1 device (OPC, BACnet, etc.) without restrictions on the time and number of tags

Version differences are described here: http://aggregate.tibbo.com/en/solutions/scada_hmi/compare.html

To obtain a license, send us a brief description of the project and the activation key of the server by July 1, 2015.

Source: https://habr.com/ru/post/258259/


All Articles