Automation of country heating "do it yourself"

Dacha is good, but a warm dacha is much better, but at my dacha there is just not enough heat, so I decided to take up the issue of organizing country heating. So there is a small cottage, consisting of 2 rooms and a small common corridor, there is also 220V electricity.



I started with an idea, I had to come up with a heating system that would keep a comfortable temperature, here we need temperature sensors, one at a time, 2 each per room (in case one goes down). I read a lot of information about how you can arrange heating like Electric boiler vs Convectors, decided that in my case convectors would be better for me (as it turned out later it doesn’t matter, you could use any of them). Principle of operation: I measure the temperature, if it is below the required one - I turn on the converter (heater), if I turn off the required one. The idea itself is not new, again, room thermostats can solve this issue, they look beautiful - but the price for them bites. Therefore, I decided to make the device myself.



In principle, there are a lot of ready-made heating automation schemes on the Internet - you take a temperature sensor, connect a simple controller to each other and write a program in several lines, and you're done.



But it did not suit me, and it’s somehow banal). I needed so that I could see what the current temperature is, whether the heater is on now, I still need 2 main modes of operation - this is when I'm in the country and I need to keep the temperature around 19-24 degrees, and on duty - when I'm not in the country and it is necessary that the temperature does not fall below zero, was about 3-5 degrees, well, and how now without modern conveniences - accepting commands for switching to modes via SMS (gathered to the cottage threw a SMS - the cottage starts to go into warm mode), again saving electricity is very much the way. Well, I will determine the requirements, and now you can take care of the device.



Based on my experience and the partial availability of electronic components, I took the Arduino Nano controller as a basis - I’m very sympathetic to the small size, I’m sitting on them lately (I heard a lot of opinions that not everyone likes Arduino, but I’m very pleased with the modular approach , besides, the libraries are ready in every way), the output decided to do 2 lines of 24 characters on the LCD indicator - it should be enough, the sensors decided to use the classic ones - DS18B20 on IWare, and the GSM SIM800L module, thought over the case - took the installer th box 100x80 from DIY stores, a rather interesting form.







To connect this whole set of components, it would be necessary to make a base board on which everything will be (I didn’t really want to solder everything on the breadboard), since I had the appropriate machine, drew a diagram, spread the board, engraved, it turned out not quite perfect (then I had to finish), but it turned out definitely better than on breadboard. I started to install everything on it and realized that the case was just the size, and it would be possible to take more.









4 triple connectors for connecting temperature sensors, laid into the circuit that you can connect up to 4 sensors separately, but then I realized that it was in vain that I thought that, on the 1st 1Wire, you can connect a heap and a small sensor truck to 1 connector, in principle 2-3-4 sensors could be connected from each room to the connector for this room and you will know exactly in the program that they come from that room (and then go there, compile, average, prepare the stew from these readings), but if you suddenly need to connect 4 rooms, you don’t need to redo anything!



The 5th connector (made it double from the standard IDC and under the screw terminal) for output to the relay, the unit with the relay did not specifically do with the controller, I will place it in a separate hidden box to which the power wires, wires from the convectors and control , and the control unit will hang on the wall, in a place accessible for review and control.



Green board - a board for working with the LCD module, initializes it, converts the Russian language, in short takes over the job of displaying text on the screen (arduin only throws off text on I2C (and does not know what the LCD is there), and this board she keeps track of the place, the encoding, the allowable number of characters, everything shoves in the right places, etc.)







By control: the unit is turned on, polls and adjusts the available equipment, sensors, LCD, SIM module (in principle, made the device perform its functions, if the LCD is not available, the SIM module, it can work without sensors - it will simply write sensors not available), then enters the standby mode - to work on the temperature of 5-8 degrees, a long press on the button translates into the main mode, in the main mode, you can adjust the temperature range from 16-19 for those who like cooler)) up to 22-25 (only 7 pace varieties). A long press of a button in the main mode transfers to the standby (in the standby mode, the temperature is not adjustable). LEDs show the status of converters.



A separate story with the module SIM, I had a long time to tinker with its settings, but still managed to adjust it in harmony. Made 4 commands with which the module works: Turn on the main mode, turn on the standby mode, tell about the status of the device, tell about the available balance. Upon arrival of the SMS about changing the mode, the LCD displays information that the operation mode has changed (the same is displayed if you change the mode with the button) in other cases nothing is displayed on the LCD (the balance did not display balance). Commands are executed only from trusted numbers up to 2 pieces, recorded in non-volatile memory (EEPROM). You can change them if you connect via USB to your computer, setting commands via the COM port (without flash firmware). I also added a parameter of the set operating mode to the memory, such as if the electricity is turned off, and after a while it turns on again so that the device goes to the mode that was set before the shutdown. I thought I should make an additional message from the SIM for all active numbers, for a high temperature indicator, such as "fire", I decided to test for as long as possible, and then you will see - (if suddenly what's wrong with the setting or sensors, then I’ll put some money on the SIM card ) - in general, an open question!



Lastly, a small video on the operation of the device



Link to video



I beg you not to throw tomatoes at all, I did it for myself, and then suddenly to whom this knowledge will come in handy!



PS If someone needs help in a similar project, write to the post office (vasilii_ru@mail.ru), I will help as much as I can))



All Articles