In this article I would like to share the results of the 2-year development work (the end of 2014 - the beginning of 2015 production) - one of the first is the bath management system. Development was done “on the knee”, in a single copy, using LUT technology (therefore not so beautiful).
I haven’t written about new developments for a long time and in two years the development vector has changed - now there is something to boast about as piecework as well as serial ones for the same esp - more than 300 pieces (at the moment). But more about that later.
Description of the complex
To more clearly imagine why the bath management system, I will describe its design and technical characteristics (they are unique, I have permission to publish from the customer. As for commercial copying, I can give you contacts).
Bath - is a frame building of 2 rooms - steam rooms and lounges.
The frame is insulated with 200 mm of wool (which I don’t remember exactly), the roof also. Sheathed with metal siding. Independent ventilation in both rooms.
')
The floor in both rooms - concrete slabs, on a thick layer of extruded polystyrene foam, do not have a rigid connection with the foundation - that is, the plates are not connected with the building - floor tiles are laid.
The rest room is 2.7 x 2.6 meters clapboard, the room has:
- 2 tanks of 200 liters of water, in each heater 2 kW, total 4 kW
- Shield with RCDs, automatons, power switching, bath control system, power supply - 3 phases
- Shower cabin
- Pump to increase the water pressure in the shower
- Electric heater 0.7 kW
Furniture does not describe, because has nothing to do with the article.
The steam room has dimensions of 2.4 x 2.4 x 2.4 meters, brick walls of 88 mm, tiles on the walls and on the floor, the ceiling is a rabbeted board of 35 mm in 2 layers at 90 degrees. The room has:
- Oven 12 kW (used for heating stones, parasitic heat is spent on additional heating of the steam room) Fully located indoors, has its own foundation
- On the 3rd wall 3 electric heaters in the amount of 3.7 kW
- Under the canopy on the 4th wall 2 heaters in the amount of 1.4 kW
- Drainage pump, 12v
Work algorithm
When the bath is not in use, it maintains the established temperature of the standby (around 13 degrees or how much they will expose). For this involved: the only heater in the rest room and 1 of the heaters in the steam room.
At the time when visiting the bath is planned, a command is sent to activate the operating mode (you can specify the activation time). The heating of the sauna is turned on (5.1 kW heaters). Inside the steam room on the surface of the wall and on the other side of the wall there are 2 temperature sensors that monitor the indoor temperature and the warming of the wall masonry.
The heating takes place until the set temperature of the wall masonry is heated (about 65 degrees), the temperature limit on the inner wall surface is around 90 degrees - all settings, of course, change in the browser interface.
Upon reaching the specified values, the system maintains the set temperature until the start of operation of the steam room.
At the moment when the thermostat of the steam room switched to the temperature maintenance mode, the inclusion of the heaters of the steam room is extremely rare due to the large heat capacity of the walls (the room as a whole). When the heaters are turned off, the water in the tanks is heated to the set temperatures.
The simultaneous activation of the heating of water tanks and steam rooms is excluded by software and at the circuit level. Those. heating in tanks is possible only when heaters are not used in the steam room.
If you intend to use the steam room in the traditional Russian bath mode, then an hour before the steam room starts operating or when it is already set to work, 1 stove is used to heat the stones (this is enough for 2-3 trips with good superheated steam - transparent, then 2 -3 visits - for girls =)).
For safety reasons, when turning on the light in the steam room, all the heaters in the steam room are de-energized. It remains only 12v, on the lighting and pump.
The complex can be enabled either via SMS, manually - from the buttons in the bath itself, or via the web interface.
Electronic filling
Actually the main part of the article will be even less than the description above. The hero of the whole design
esp8266 in the form of esp-01 =)

He had to pull out the GPIO4 and GPIO5 legs with the wires - at that time I did not have another esp.
[image will come later]
And so, what services this device:
- 5 temperature sensors (ds18b20) are connected in parallel to each other (one leg ESP):
- Masonry exterior sensor
- Sensor inside the steam room
- Cold water sensor
- Hot water sensor
- Room temperature sensor
- The button of inclusion / permission of heating of water (one leg of ESP)
- Button for activating the steam heating program (one leg ESP)
- Switching control switch 7 relay through shift register (2 legs ESP)
The result of the work without outside intervention
The current time of continuous operating time is 2 years. Operation - 3..6 times a month, year-round, even more often use a thermostat on the water. The main launch method is sms, less often web interface, even less often with buttons. The main method of monitoring the state is a web interface. For the masonry to fully warm up to 65 degrees in the winter, it takes about 10 hours; in summer, about the same figure.
The customer is delighted throughout the operation time - he can do different modes of operation (traditional bath, sauna, hammam).
The main mode that is currently in use is to activate the warming up of the masonry up to 50 degrees (the switch is set approximately 6 hours before arriving at the cottage), in the steam room it is 90 degrees. As they arrived they stoked the stove to heat the stones - 1 hour and you can use it.
At the same time, to raise the required level of humidity in the “Russian bath” mode, the walls are moistened with a broom 10 minutes before use. The initial moisture level is 20%.
Here is a miracle. Unfortunately, the photo of the final device did not, although I was there in September 2016, I decided to write an article spontaneously (although it didn’t turn out to be beautiful - but I’ll definitely do it, and I will update the article)
UPD. I pulled out a web-interface from the code, I substituted figures for an example
UPD2. Answers to questions from comments:
- I program in eclipse
- web-interface is formed on esp
- http server borrowed from the project esp-httpd
- In this device, the firmware is written in SDK 1.0.0 from the manufacturer esp
- ds18b20 - power is supplied directly from the unit (i.e., to the MC only the “data” pin). All are connected in parallel to each other - between the "data" and "+" one for all 4.7 kOhm resistor.
- The sms is handled by a netbook in the house - it checks the white list of numbers, parses the sms and gives the command to turn the bath on or off, notifies the return sms about the execution
- The house has a router through which the netbook and bath interact. The house and the bath are located at a distance of 15 meters from each other. Taking into account the fact that esp is closed in an iron box, and the finishing of the bath is metal siding - the connection with the house is stable.
- Problems in work since 2015 - not seen