Thermostat for greenhouses - Designs of medium complexity - Schemes for beginners. Greenhouse controller using Arduino

Growing crops in protected soil conditions involves organizing a certain microclimate indoors. Otherwise, the greenhouse not only becomes of little use, but can also cause irreparable harm to the seedlings. Provide plants the necessary conditions You can do it yourself. But, automation of processes that affect the climate inside the greenhouse will be more convenient and effective. How can you automate a greenhouse using ready-made and homemade devices– read the article.

Modern automation devices for greenhouses and greenhouses allow irrigation, heating and ventilation systems to operate autonomously. Today, there are several ways to automate the processes on which it depends. Each of them has its own advantages and disadvantages.

Automation in greenhouses differs according to the principle of operation (the method of putting the mechanisms into action) into:

  1. Electrical. This type of automation is easy to install and allows for precise adjustment. To the disadvantages electrical systems This can be attributed to their high cost, compared to other types of automated systems, and dependence on a source of electricity.
  2. Hydraulic. Such technologies are reliable and absolutely safe: they are based on the principle of expansion of liquids when overheated. The disadvantages of the designs are their slow response to lower temperatures.
  3. Bimetallic. Bimetallic devices are based on the ability of different metals to expand. Such systems are ideal for automating the ventilation system. The disadvantage of bimetallic automation is that it is not capable of operating heavy equipment.

The above automatic systems can be installed on any equipment that needs autonomous operation. The choice of automated structures depends on the gardener’s budget, the presence of a power transmission network near the site, and the dimensions of the greenhouse.

More about automation for greenhouses in our material:

Automation for greenhouses on a microcontroller

Greenhouse automation is possible thanks to precise sensors that read temperature, humidity and lighting levels inside and outside the greenhouse, and timers that transmit information to a special controller. After which the control system, based on the algorithms built into the program, evaluates the readings from the sensors and makes decisions to turn on or off the greenhouse actuators.

It is the program controller that operates the irrigation system pump, fan and window closer, lighting and heating devices. Today, there are many controllers whose main task is to regulate the microclimate in the greenhouse. The price of the controller depends on the number of analog inputs and device memory. The most affordable is the Atmega controller on the Arduino platform.

More information about the smart greenhouse based on the Arduino chip can be read at the link:

The automation program for a greenhouse on a microcontroller is focused primarily on such processes as:

  1. Setting the desired temperature and humidity.
  2. Turn on, turn off lighting fixtures depending on the time of day and year.
  3. Control of the aeration system (opening and closing vents, starting fans when the air in the greenhouse overheats).
  4. Control of the irrigation system depending on the stages of plant development.

Such automation allows you to achieve maximum results when growing even the most demanding crops, but it differs high cost, therefore it can only be profitable on large and industrial agricultural facilities.

Greenhouse curtain system

In large industrial greenhouses, greenhouse curtain systems are also used to normalize the microclimate. In households, such systems show no less high performance.

The curtain system provides shading of the greenhouse, reducing the likelihood of overheating of the greenhouse due to solar radiation in the summer.

There are side and top screens of curtain systems. At the same time, there are several types of canvases that perform different functions: complete or partial darkening, saving thermal energy, holding artificial light inside the greenhouse.

Often, to control the curtain system, centralized control from a single system is used automatic regulation microclimate in the greenhouse.

If necessary, the Screen operates a switch on the automation cabinet. In addition, the system can be included in the program of a general controller for climate control inside the greenhouse.

Homemade automatic greenhouse

To avoid financial costs, automated systems You can do it entirely or partially with your own hands. Of course, in order to create automation on the controller you will need thermostats, cyclic and daily timers, a schematic of the finished board, and communication channels with the equipment. It will be much easier to organize automation for each individual process.

Most often, the irrigation system in the greenhouse is separately automated. The organization of the system depends on the dimensions of the panic. So, for small household greenhouses, homemade drip system glaze.

Organization drip irrigation has the following stages:

  1. Development of an irrigation scheme taking into account custom sizes greenhouses.
  2. Preparation of materials (drip hoses, water tank, filters, taps, connecting fittings, main pipe).
  3. Installation of the tank at a height of 0.1-0.2 cm, installation of filters for water purification.
  4. Laying out the main water supply and branch lines.
  5. Installation of shut-off taps on each branch.
  6. Connecting all components of the water supply system using connecting fittings.
  7. Installation of droppers.
  8. Filling the tank with water.

The semi-automatic irrigation system includes irrigation using the solar distillation method, in which water, evaporating from the reservoir, condenses on the cap and flows down to the plants through special gutters.

Installing the machine in a greenhouse: thermovent for ventilation

The easiest way to control the temperature in a polycarbonate greenhouse is to install automatic ventilation windows. Most often, an automatic window is equipped with a thermal actuator, which activates the device when the temperature inside the greenhouse changes.

The operating principle of a thermal fan is based on the ability of oils to expand when heated. In addition, the thermal drive can be used to set the desired temperature for automatic ventilation greenhouses. Expert advice will help you choose an automatic window opener:

The automatic mechanism is mounted on windows or transoms that do not have much windage. The opener is installed inside the greenhouse, in the upper part of the structure to be opened. To install it, you only need a screwdriver and self-tapping screws. The thermal actuator can also be mounted on greenhouse doors.

Equipment: automation for greenhouses (video)

Greenhouse automation is a modern, convenient way to increase productivity in a greenhouse. All processes in automated greenhouses occur without human intervention, which is an undeniable advantage for gardeners whose garden plot is located far from his permanent place of residence. Having equipped the greenhouse with automation, you will stop worrying about remembering to open the window, turn on the lighting and heating devices in the greenhouse: the “smart” system will do everything for you, creating the most optimal conditions for the growth and fruiting of the crop!

As I already wrote in the last part, initially it was not planned to configure the greenhouse parameters using buttons with display on the display, so I provided buttons and switches in the box.

All this could also be implemented programmatically, but since I’ve already done it, they retain their functionality:

Soil heating switch (heating off / automatic heating on),
- air heating switch (heating off / automatic heating on),
- three-position window opening switch (automation disabled, windows open / automatic window control / automatic disabled, windows closed),
- button for adding water to the tank,
- watering button,
- watering mode switch (once a day / twice a day)
- button for turning on the display backlight, installed on top of the drawer. Turns on the backlight for 30s.

It’s immediately clear that all this is for cases in which something suddenly goes wrong with the automation.
Now about the settings that can be set from the buttons on the panel. This winter, trying to simulate a greenhouse as much as possible, I worked on writing code for a box lying on the table.

So, the main menu consists of 3 items:
1. Settings menu.
2. Setting the date and time.
3. Test program for limit switches and window opening motors.

Everything is clear with setting the date and time. Test program - to connect windows, drive them using buttons, check how they close, whether they are connected correctly, adjust the operation of limit switches, etc.

In the settings menu you can set the following parameters:

1. Watering time.
2. Time of the second watering (if the watering mode is turned on 2 times a day)
3. Water collection time.
4. Window opening temperature.
5. Window closing temperature.
6. Switch-on temperature for soil heating.
7. Soil heating shutdown temperature.
8. Air heating switch-on temperature.
9. Air heating shutdown temperature.

The wife said that since there is no backup and protection if the limit switches do not work, it is also necessary to set the limit for the operation of the pump and window motors. This was a correct and fair remark, so I had to enter the following settings:

10. Limit operating time of window opening motor 1.
11. Limit operating time of the window opening motor 2.
12. Limit operating time of window closing motor 1.
13. Limit operating time of window closing motor 2.
14. Limit pump operating time.
15. Pump operating time to start irrigation.

Now, to illustrate how the menu works, I suggest watching a short video:/p>

Despite the fact that we still had snow in mid-April, I installed the control unit in the greenhouse and connected the soil heating (warm floor) without automation for now and heating the air with an automatically controlled heater. After a week has passed that the soil has warmed up to 30 degrees, at the time of inspection the heater is turned off, the air temperature is 22 degrees - the sun is already working as it should.
In addition, on April 15, I turned on auto ventilation to observe its operation. You can also see how self-ventilation works in the video:

Tried the following settings:

Window opening 25 degrees;
- closing windows 21 degrees;
- turning on the heater 18 degrees;
- turn off the heater 20 degrees.

The settings turned out to be suboptimal. That is, the temperature outside is 8 degrees and windy. Approximately every 20 minutes the temperature in the greenhouse reached 25 degrees, the windows opened, the greenhouse was quickly ventilated, the windows began to close at 21 degrees, while they were closing, the temperature dropped even lower, so immediately after closing the windows for 5 minutes. the heater turned on.

Changed settings:

Window opening 28 degrees;
- closing windows 22 degrees;
- turning on the heater 16 degrees;
- heater off 19 degrees.

Everything settled down, the greenhouse stopped slamming its windows. Perhaps you need to install a temperature sensor outside and somehow correlate the temperature control in the greenhouse based on its readings.

For two weeks, not only was the automatic temperature maintenance system tested in the greenhouse, but also cucumbers were planted on the 20th of April. Now I’ll tell you about automatic watering. Its design in my greenhouse looks something like this:>

From a large tank, once a day at a certain time (set using the menu), water is poured into a tank located in the greenhouse using a pump. In my case at 10-00. The amount of water is determined by the activation of the float sensor. Just in case, through the menu you can set the maximum operating time of the pump (protection against sensor failure. So, the water has filled:

After this, the water in the tank is heated all day in the greenhouse, which is warm. And in the evening, I have it set at 19-00, the pump turns on for 40 seconds, the water overflows and, by gravity, according to the law of communicating vessels, pours out onto the garden bed:

How I set it up automatic watering, can also be seen in the video:

In early May, the temperature dropped to -8C on several nights. The heater was working, the temperature in the greenhouse was not lower than +12C, the soil temperature was +20C. Working in this mode revealed the shortcomings of Chinese relays. Despite the fact that the specifications state 10A 250V, and the heater is 1kW, the relay responsible for turning on the air heater began to get warm and “stick.” I had to put a more powerful relay in series. Automatic watering is currently turned on and working. Next week I hope to bring the greenhouse online so that I can observe its parameters on my website.
Currently, the sketch for Arduino looks like this: https://ideone.com/GvHs7u Please do not criticize the code - I am a beginner programmer, but the code is working, which has been proven, albeit for a short time, by operation.

Vitaly

Greenhouse controller using Arduino

This year I built a greenhouse with an area of ​​30 square meters. m. for tomatoes. Initially, I planned to cover it with polycarbonate, however, after weighing the pros and cons, I decided to use a copolymer ethylene vinyl acetate film. Well, now that the season is ending, I can already say that I made the right choice and the greenhouse pleased me with a quite decent harvest (approximately, about one and a half centners). The dimensions of the greenhouse are 3.8 * 8, i.e., approximately 30 square meters. m. full area, of which approximately 24 sq. m. useful. Ventilation was carried out naturally through open doors and vents located at the ends of the greenhouse. Maximum temperature in a greenhouse at open doors and the vents did not exceed the outside temperature at the peak by more than 5 degrees, although there are no vents at all on the side surfaces of the greenhouse. If I had used SPK (cellular polycarbonate) to cover the greenhouse, the temperature in the absence of vents in the roof would have risen to over forty. In addition, the transparency of the film used, like that of a monolithic PC, is high - 92%, which ensured that the tomatoes bore fruit very well and were clearly in a generative mode due to the abundance of light. With SPK, although the transparency of each layer is approximately the same, the percentage of light passing into the greenhouse is significantly less - 92% * 92% = 84%, plus some is lost on the partitions, which ultimately gives transparency no higher than 82%. As a result, plants receive significantly less light and enter a more vegetative mode, producing more leaf mass and less tomatoes. And in addition, you have to constantly deal with the formation of leaf mass, which is in excess due to plant competition due to lack of light.
In my greenhouse, due to the abundance of light, I didn’t have to worry about tearing off leaves at all, I just broke off the stepsons; there were few leaves on the plants, but a lot of fruits. However, another problem arose - light burn of leaves and fruits. On the leaves this was manifested in the yellowness of young leaves, which formed shortly before the onset of heat, and on the fruits - in the appearance of white sides on the fruits on the side facing sunlight. This factor had a very negative impact on the harvest, which could have been much larger, and also led to the fact that by the fall the bushes did not retain their full appearance, and even late blight tried. Then I still knew nothing about late blight - how it arises, what contributes to its spread. Then I learned that it’s not so much the cold that’s terrible for tomatoes, but the “bath” - when plants spend a long time during the day, like in a steam room, which occurs if the sun is already in the sky and the greenhouse is completely closed. All summer I did not close the greenhouse at all; neither day nor night, regardless of any weather changes, the doors and windows were constantly open. However, closer to autumn, when due to cold nights the greenhouse must be closed at night, when fungal diseases begin to become rampant, and temperature changes between night and day, and therefore condensation, increase sharply; vents not opened in time can help you end the season at once. This is exactly what happened to me - the tomatoes were almost “wet” all day at a temperature of 20-30 degrees. and everyone got sick with late blight due to the fact that any automation of ventilation on this moment I was absent, and I could not come to the greenhouse every day. As a result, I had to throw away 7 buckets of tomatoes, mostly almost red and pink ripe.
What’s interesting is that, despite the total disease of late blight, as soon as I eliminated the causes of the disease and began to monitor the opening and closing of the windows in a timely manner, the bushes began to continue to grow and produce more or less healthy fruits, so in September I practically removed almost all harvest. During October, we managed to harvest about 8 additional buckets of fruit, and now there are still about a hundred ripening there.
In the future I will continue to describe how I came to the conclusion about the need to use automatic system temperature and humidity control and why it is better to make the control system based on a controller. Then I’m already thinking about moving directly to the project. In general, this topic is not about what has already been done, but about what I am just about to do - the topic is about further improving the greenhouse, and I firmly decided to develop and implement the system. If you want to participate in the discussion of this topic, you are welcome; you do not have to wait for me to finish presenting this prelude, especially since it is, in general, not obligatory.

Registration: 06/23/13 Messages: 5,152 Thanks: 5,780

Vitaly

Registration: 06/23/13 Messages: 5,152 Thanks: 5,780 Address: Bryansk

I returned home and continue. Below you can see several photos of the construction of the greenhouse and the ripening of the crop. This year I didn’t have any seedlings - there were only enough tall varieties for the outer beds, and even then not completely, the rest was planted with low-growing varieties. Moreover, half of the tall ones and all the short ones were frozen on the window and they were delayed in development for almost 2 months. We planted seedlings on permanent place late - June 1 and 2, and I covered the greenhouse only on July 21, and only because the weather outside at that time had completely deteriorated, it was cold, it was raining continuously, so I had to cover it in a strong wind and only threw the film on - rain started. And literally on the second day after sheltering, the weather changed sharply and it became hot. The tomatoes did not endure such a sudden transition very easily, considering that in the evening, when I covered the greenhouse, I did not have time to make windows and doors, and the greenhouse stood the next day until 12 o’clock, completely covered, while I came to finish it.
Literally after 2-3 days I realized that I couldn’t cope with temperatures over 30 in the heat, if only because it was sometimes up to 33 outside. I thought for a long time about how to solve the problem, I really didn’t want to cover the greenhouse from the sun, because a decrease in illumination by 1% is equivalent to a decrease in yield by 1%, and in the spring it is even more - the harvest is lost by 1.5%. One of the options was to install sprayers on the roof of the greenhouse, which would be triggered when the temperature in the greenhouse rose above 30 degrees, the other was to make 3 doors on each side, the possibility of which was included at the design development stage. Moreover, the doors were supposed to be made as openings into which frames tightened with anti-corrosion could be inserted. mosquito net or frames covered with film if it’s cold, but I decided not to do this at the manufacturing stage.
It wasn’t long before I learned that there was a very effective way quickly lowering the temperature in the greenhouse using foggers, which at the same time allows you to adjust the humidity in the greenhouse. Now I have decided to include foggers - foggers - in the climate control system, and return to shading if for some reason this measure turns out to be insufficient to keep the temperature at 25-30 degrees. and excluding the formation of white barrels on tomatoes due to a combination of strong lighting and high temperature, although I think everything will be fine.
Next I’ll tell you about my conclusions about what temperature regime It is necessary to provide tomatoes with 24 hours for their normal growth and development, how this can be ensured and why ventilators based on hydraulic cylinders are completely unsuitable for these purposes.
And here are some photos:

Attachments:

Last edited: 10/20/15

Registration: 06/23/13 Messages: 5,152 Thanks: 5,780

Vitaly

Registration: 06/23/13 Messages: 5,152 Thanks: 5,780 Address: Bryansk

Temperature

Based on the initial experience of operating a greenhouse gained this year, I concluded for myself that there is no more important task in the process of growing plants in it than the task of temperature regulation. This is equally important for a greenhouse with any covering, be it film, SPK, or profiled polycarbonate. Of course, there are coatings in which this issue is practically not relevant - these are not transparent coatings, but coatings white and mesh greenhouses, but we will not consider these options here. Moreover, in this topic I decided to limit myself to considering the regulation of the parameters of a greenhouse made exclusively for tomatoes.
The fact is that each plant has its own favorite range of temperatures, humidity and other parameters. In order not to lose my thoughts on where I got these specific temperature levels required by tomatoes, which I will give below, I leave it to you, if the need arises, to check them and clarify them. I won’t even mention it again, but will simply copy what I said recently in this thread:

What, exactly, is required to create even the most primitive climate control in a greenhouse? For tomatoes, for example?
All you need to do is monitor the temperature outside and open the windows as early as possible in the morning, when the temperature outside rises above about 12 degrees, in order to dry the leaves and fruits from condensation, you need to open the windows and doors when the temperature in the greenhouse rises above 25 degrees. and turn on the foggers when the temperature rises above 30, and turn on the heating of the greenhouse when the temperature in it drops below 12.
That's probably all. If you add some other automation, I’m afraid it will not be better, but worse. For amateur greenhouses at this level, this minimum is perhaps optimal, allowing them to obtain a decent harvest of healthy products, and not the crumbs that the majority now have.

And another fragment:
The question is how much is this in demand?
Not by any means, unfortunately. In order for something to be in demand, there must at least be awareness of the need for it. And at what level many people argue here can be judged by a fairly typical statement: My cucumbers grow in the same greenhouse with tomatoes and bear fruit beautifully. Well, what can you explain to a person who is not familiar with the basics of agricultural technology? And since he has zero understanding of the need to maintain some kind of climate in the greenhouse, he naturally has no demand for systems that support it. he will read this and say something emphemistic, like: “The tomatoes will be golden,” or maybe he will express himself more clearly and rudely, like: “The cat has nothing to do... well, etc.
Many people prefer to simply build entire sarcophagi for plants with complex underground systems storing heat and shelling out 200 thousand or more for them (no offense to them, they are not doing this for mercantile reasons), instead of installing at least the simplest system thermoregulation, and they even claim that there is no other way (but this is an insult).
Now let's look at it from the other side. There are people who are well versed in electronics and programming, and they can easily make a very inexpensive control system, but I don’t see even one of them saying: For a tomato, you need to provide this, that, and that. And then their development could become very valuable for many, at least for those whose consciousness is not blinded by the need to build sarcophagi - the same dinosaurs from the point of view of automatic regulation, like an ordinary film tunnel, even if it was called pretentiously, say, "Ivanov's solar vegetarian"
Yes, about the need for a special thermostat. If you use a separate device to regulate each individual parameter, it will not work out either simply or reliably. I'm afraid that to implement the minimum I specified, it is no longer possible to do without a controller.

Yes, you say, we’ll make the device in a minimalist form, and then it turns out that there’s still a bunch of things that need to be taken care of, alterations will begin, and the cost will rise. Fortunately, automation based on software devices differs from hard automation schemes in that changing control parameters and introducing new functions is not difficult, and costs increase mainly only by additional sensors and executive mechanisms, and in the system itself only the program changes. Therefore, it is quite reasonable, in the first stages, to limit as much as possible the number of functions performed by regulating only temperature and humidity, so as not to waste extra effort and money.
Humidity in the greenhouse is the same important parameter, like temperature, but these parameters are strongly related, therefore, by adjusting the temperature, we will, at the same time, change the humidity, and it is not the absolute, but the relative humidity that is important. For the sake of simplicity, you shouldn’t bother her too much for now, it’s better to focus only on regulating the temperature, but more on that next time, where I’ll try to list everything necessary equipment for creating minimal system regulation and roughly estimate how much it will cost.

Registration: 06/23/13 Messages: 5,152 Thanks: 5,780

Vitaly

Registration: 06/23/13 Messages: 5,152 Thanks: 5,780 Address: Bryansk

More about temperature

I was thinking that I probably need to describe in a little more detail the reasons why the temperature in the greenhouse should be regulated exactly within the limits that I described above.
The fact is that the growth of southern plants at temperatures below 12 degrees. stops altogether, and if even lower, they begin to wither and cling various diseases, therefore, it is impossible to open the greenhouse when the outside temperature is below 12. On the other hand, in the morning, abundant condensation collects on the leaves and fruits in the greenhouse. If you allow a “bath” when the bushes are wet and the temperature rises to 20 and above - this is paradise for late blight - it’s better not to. This way you can ruin the entire crop very quickly. Therefore, you need to open the windows as early as possible. in summer middle lane The easiest way is to simply not close the windows and doors at all, but somewhere in August, depending on the weather, you need to switch everything to automatic.
The optimal temperature for tomatoes is 25 degrees. If it rises higher, you just need to open the ventilation vents. If the temperature rises above 30, this is fraught with damage to the leaves from overheating, sterilization of pollen, sunburn and other troubles, so when it reaches 30 gr. foggers - foggers that effectively lower the temperature by several degrees - should work.
If the temperature in the greenhouse drops below 12 degrees, then, I think, this is already clear - I described it above - any type of heater should turn on. In the fall, when you just need to ensure the growing of the set fruits, I think you can lower this threshold to 6-10 degrees in order to save energy. By the way, heating up to 40 degrees during the day is not so dangerous, since the tomatoes are already at the growing stage and sterilization of the inflorescences is not dangerous. If your tomatoes are already infected, then such high-temperature heating will kill late blight, therefore, for the purpose of disinfection, you can intentionally leave the greenhouse completely closed for several hours on a sunny day, just so that the temperature in the greenhouse rises above 30 degrees. After this, the greenhouse must be thoroughly ventilated. Actually, that’s exactly what I did and maybe that’s why the tomatoes in my greenhouse are still alive.
Well, that’s probably all. Even if this is only implemented, the plants will be in much more comfortable conditions and will give a much larger harvest than in a greenhouse, in which the temperature jumps from 35 degrees. during the day up to 5 degrees. at night. In any case, such an algorithm is quite suitable as a reliable basis, and then the question of further optimization will become clearer during practical operation.

And now - about the minimum set of equipment that will be needed for the control system.

Set of equipment for the controller

1. Controller - 1
2. Display unit (screen) for the controller - 1
3. Power supply 12 V for the controller - 1
4. Sensor outside temperature - 1
5. Internal temperature sensor - 1
6. Heat gun - 1
7. Electric door drives (actuators) - 2
8. Electric drives for transoms (actuators) - at least 2, for greenhouses made of SPC - more
9. Foggers (foggers) - for a greenhouse 8 m long approximately 8
10. Cabinet for placing equipment - 1
11. Residual current device - 1
Well, to ensure autonomy in the event of a power outage, a solar panel- and the battery - 1. And along the way, there are various other little things, such as pipes for electrical wiring, the wires themselves, etc.
I’m not giving the cost of each piece of equipment now - I’m just kind of lazy and have a little time, anyway, it will be gradually clarified, they will be selected optimal options, suppliers, models, so I hope interested participants will help decide on this issue.

Last edited: 10/21/15

Vitaly, it is not clear to whom your such a very detailed speech is addressed. Judging by the fact that you are going over the basics in detail, most likely it is for beginners, because everyone else seems to be familiar with the above. The topic of greenhouse automation that you raised is undoubtedly necessary and important, but the path you have chosen raises some skepticism.
I don’t claim to be the ultimate truth, but as I see it, the project usually starts a little differently. First, goals and objectives are discussed and set, technical specifications are drawn up, and appropriate solutions are selected. Sometimes even one small point of the technical specification crosses out the use of any solution methods, narrowing the areas of available tools. Something like this in a nutshell. You have already immediately chosen the Arduino platform. Then explain why exactly her, and not, for example, raspberry PI or something else. Arduino Very elementary platform. When choosing it, you have to assign a very limited set of tasks to it, greatly narrowing your desires. Until now, very basic crafts have been made on it. There were regrets from enthusiasts working on it that it “does not cope” with many tasks. Also, it seems, the set of sensors for it is very limited. I am not against automation and discussion, but, for me personally, building a system on Arduino is not of practical interest. So I’ll be curious, maybe I’ll come in and read it and that’s it.
Don't limit the topic to just one platform, and don't dismiss the possibilities for enthusiasts of other platforms. Then the topic may be more crowded and useful solutions will appear more often.

P.S. If this topic was created only to describe your experiments with Arduino, then I apologize in advance for getting into the wrong place with advice. I’m already talking about what I want to have in the greenhouse, so to speak, the minimum technical specification visible to me.

  • Registration: 06/23/13 Messages: 5,152 Thanks: 5,780

    Vitaly

    Registration: 06/23/13 Messages: 5,152 Thanks: 5,780 Address: Bryansk

    Vitaly, it is not clear to whom your such a very detailed speech is addressed.
    ...as I see it, the project usually starts a little differently. ...You have already immediately chosen the Arduino platform. Then explain why exactly her, and not, for example, raspberry PI or something else. Arduino Very elementary platform. When choosing it, you have to assign a very limited set of tasks to it... Until now, very basic crafts have been done on it. There were regrets from enthusiasts working on it that it “does not cope” with many tasks. Also, it seems, the set of sensors for it is very limited. ...for me personally, building a system on Arduino is of no practical interest. ...Don't limit the topic to just one platform, and don't throw away the possibilities for enthusiasts of other platforms. Then the topic may become more crowded and useful solutions will appear more often.
    ...I’m already talking about what I want to have in the greenhouse, so to speak, the minimum technical specifications...

    In general, for every active forum participant who writes comments, judging by statistics, there are 200-300 simply reading. So who do we refer them to? Are they newbies? Or are there many advanced people among them who simply do not want to enter into a discussion that seems small to them, or do they simply not have enough time to participate in discussions? On the other hand, if there is a group that doesn’t need to learn the basics, then we don’t see them developing in this area. Such discussions have arisen on this forum more than once, but the result is not noticeable. I know of only 3 examples of perhaps successful greenhouse automation. The first example - I gave the link above, the second here: I don’t remember, however, whether it really has an implementation on a microcontroller, and even SergeiL’s greenhouse operates under the control of a Samsung-based controller.

    Naturally, I chose the Arduino platform for myself, and if in the process of implementing the system on it I encounter difficulties, I, as they say, will be responsible for this. But I immediately stipulated that I do not intend to somehow limit the freedom of discussion in this topic and am ready to discuss any aspects, except, of course, simply blurting out the question. So please discuss any platform if you find a correspondent. I have already decided where to stop, because if among those discussing there is not a single one who has decided, then, accordingly, there will ultimately be no result.

    And regarding the fact that Arduino is a very elementary platform, I would like to clarify what you mean by this? Enthusiasts' opinion? Let's look specifically at who these enthusiasts are and what they tried to do on Arduino before they came to this conclusion? Arduino is simply a circuit-oriented language, which makes it understandable to people who understand electronics. It's an open platform, so there's a lot of ready-made solutions, it is designed so that even non-specialists can start doing something for themselves using software technology, which is what led to the emergence of many such enthusiasts. Yes, it allows, but it does not exclude the need for serious education, and this is precisely what enthusiasts often lack, so they begin to move from a sore head to a healthy one. And therefore, before giving up on Arduino technology, I would like to know what fundamental limitation of the capabilities of this language you can cite? Does he weigh a lot? Does the command system lack functionality? Is the performance low? Extremely inconvenient in programming? What exactly?
    I'll tell you a little secret. The thing is that you won’t have to do anything special in developing circuitry or programming to automate a greenhouse. This has already been done before us and greenhouses have been in operation for a long time, and not just one person. You can just stupidly repeat everything, without inventing anything, if that’s enough for you and you don’t want to add anything of your own. Get acquainted with the material, perhaps you will change your opinion about Arduino.

  • Registration: 03.11.13 Messages: 643 Thanks: 690

    I understand, I will not interfere in the discussion. I want a little more automation, which is why Arduino did not suit me, although, I repeat, my knowledge about it is superficial, learned from reading forums on this platform, and may be insufficient.
  • Registration: 06/23/13 Messages: 5,152 Thanks: 5,780

    Vitaly

    Registration: 06/23/13 Messages: 5,152 Thanks: 5,780 Address: Bryansk

    Arduino Very elementary platform. When choosing it, you have to assign a very limited set of tasks to it, greatly narrowing your desires. Until now, very basic crafts have been made on it. There were regrets from enthusiasts working on it that it “does not cope” with many tasks.

    This topic will help you to define your attitude towards Arduino. As far as I, not a programmer, understood from the dispute between two programmers, the complaints against Arduino do not lie in the weakness of the platform. The claims were related, as far as I understood, to its insufficiently high level, according to the opponent. However, a low level, you see, increases the power and speed of the language - any system programmer will tell you this. And the fact that a low level complicates writing a program, as he claims, depends on who. After all, Arduino is a language tailored for electronics engineers, so for them it will be, as a specialized language, much more convenient than a universal one. It's a different matter for programmers who have little knowledge of electronics, but in languages high level the dog was eaten - their opinion can therefore be understood.

    Last edited: 10/21/15

  • Registration: 10/20/11 Messages: 887 Thanks: 432

    In my opinion, before arguing about what to build automation on, you need to decide on the technical specifications, otherwise you will now stuff an industrial CNC into a greenhouse in order to open a couple of vents according to the temperature. Although, again, if someone is comfortable working with a particular controller and has the opportunity to use it, then why not, even if it is redundant. In any case, you need to start with technical specifications and build a control algorithm. So far, from what has been written above, it follows that: below 12, turn on the heating, above 25, open the window, above 30, turn on the foggers. While the circuit is very simple, you can even do without a controller.
  • Registration: 06/23/13 Messages: 5,152 Thanks: 5,780

    Vitaly

    Registration: 06/23/13 Messages: 5,152 Thanks: 5,780 Address: Bryansk

    ...In any case, we need to start with the technical specifications and build a control algorithm. So far, from what has been written above, it follows that: below 12, turn on the heating, above 25, open the window, above 30, turn on the foggers. While the circuit is very simple, you can even do without a controller.

    Well, try it. I'm not sure you'll succeed even with these simple algorithm do without a controller. But you have already simplified the algorithm I proposed, because I wrote that there are 2 sensors: one in the greenhouse, the other on the street, I just suggested the same threshold in both cases - 12 g.

    Do you think that it will be easy to implement even such a very simple algorithm in such an inertial object as a greenhouse? We can already assume that many obstacles will arise on the way to its implementation. For example, foggers instantly reduce the temperature at the top of the greenhouse, but overheating remains below, which means intensive air mixing and additional sensors will be required, which, of course, will complicate the control program. Humidity also cannot be increased uncontrollably - this will begin to harm the crop, and effective reduction temperature will become impossible. Therefore, it is assumed that in the future the algorithm and the entire system will become more complicated, it will be necessary to introduce fans for air mixing and for exhaust ventilation in order to reduce humidity.
    It’s just that at this stage much cannot be foreseen, especially since I, for example, have never done anything like this before. That’s why I suggested the minimum difficult option, which can no longer be done anyway by simple means, for example, using a thermostat. The point of this approach is that complicating the device in the future is not difficult. Therefore, now I would like to do the circuitry part - try to draw a circuit diagram of the device core. Editor for drawing email. I saw the diagrams in the topic that I already cited above. I have already downloaded it for myself, but I still have no idea how to work in it. It’s difficult and takes a long time to move alone, especially when you don’t know much, so then everything will go very slowly. Today I spent the whole day choosing devices on the Internet - everything that needs to be bought, I looked at many options and, perhaps, did not do enough. the best choice, but the process gradually began.
    The editor can be found here: sPlan- Maybe someone is familiar with it or can recommend the best one, but for now I’ll try to use this.

  • Schematic diagram and installation example in

    greenhouse thermostat on the ATmega8 microcontroller.

    One way to heat greenhouses is to use electricity. With good and smart automation, it is possible to ensure a high efficiency of the heating system, as well as ease of maintenance and automation in maintaining the set temperature. The efficiency of a greenhouse can be significantly increased by heating the soil and maintaining air temperature. During development of this device a homemade electric boiler of 5 kW was used. Two heating elements 2+3 sq. You can use one heating element at a time; it’s warm outside now, so one heating element can cope with the task quite well. Heats a greenhouse 11 by 5 meters, the height in the center is 3 m, double film, the greenhouse is one meter deep into the ground. The control unit monitors five points and controls three circuits. Two - warm bed, room temperature. In the device menu, you can set your own temperature and hysteresis for each circuit. Day and night temperatures are set separately for each circuit.

    The thermostat also provides control of the coolant temperature for emergency shutdown of the boiler in case of overheating, as well as the ability to connect a temperature sensor to monitor additional parameter(for example, outside air temperature). The transition time from day to night mode and vice versa is set in the menu and is common to all circuits. The operation of the pump is controlled by an automation unit. If the temperature reaches the set parameters and the boiler turns off, the pump will still work set time and turns off. One common pump is used for warm beds and indoors. Warm beds and air temperature are controlled by 12 volt electric valves. Schematic diagram of the thermostat:

    This is what the photo looks like soldered board from the tracks:

    1.Instructions for operation of the automation

    The thermostat microcontroller works with 5 DS18B20 sensors. The sensors are connected to one bus. It may be necessary to reduce R1. MK distinguishes sensors by their serial number. During manufacturing, the first time you will have to determine at random which sensor is responsible for what and install them accordingly.

    Data is displayed in integer format, tenths are discarded, and leading zeros are suppressed. Temperature range from -9 to +99 degrees. When the temperature goes outside the limits or when there is a sensor error, the display shows instead of the readings of the corresponding sensor.

    When connecting for the first time, if all 5 sensors are successfully initialized, their serial numbers will be written to the EEPROM. This will allow it to work correctly in the future if some sensors are removed or faulty. If you replace sensors, you must erase the EEPROM and turn on the device. It is currently only possible to erase EEPROM in the programmer. Then maybe I’ll figure out how to do it through the menu. The MK will work without 8 MHz crystal. FUSE must be set accordingly. Indicator based on HD44780 processor.

    2.Working with a thermostat

    1.The “MENU” button scrolls through the menu pages in a circle.

    2.In the settings menu (Setup), the option available for setting flashes.

    3.Installation using the PLUS/MINUS buttons as usual.

    4. Clock on DS1307. The time is displayed in the format hh:mm:ss. 24-hour display format. Access to the clock through the menu. Time settings are available on the page - in turn: seconds (PLUS/MINUS buttons reset the seconds value), minutes, hours. The time for turning on the day mode is set - day and the night mode - night. For modes, the output format is hh:mm. Clock settings are stored in the DS1307's memory.

    5.Move from one parameter to another using the UP/DOWN buttons. The buttons operate with a single press, regardless of the duration.

    6.After 10 seconds from the last press, the settings will be written to memory. The display will go to main mode.

    7.When you press any button, as well as when power is applied, the backlight turns on. The backlight will turn off 30 seconds after the last button press.

    3. Boiler control algorithm

    1.When power is supplied to the device, the controller polls the sensors and reads information from the real-time clock. The controller compares the current time with those set for day and night modes and selects the appropriate settings for the operation of the thermostats.

    2.After about 5 seconds, the device is activated and begins to control the boiler.

    3. If the temperature from the Pol-1, Pol-2 or Office sensors becomes below the set value, then the pump and heater are switched on and voltage is applied to the corresponding actuator for supplying coolant to this circuit. When the temperature rises above the set value by the hysteresis value, the heater turns off, the pump remains in operation for 30 seconds to ensure cooling of the heating element to a safe temperature. To ensure water flow through the boiler circuit, the coolant supply remains open to this circuit while the pump is operating. If the operation of the boiler is necessary for another circuit, then the coolant is switched off to the already unnecessary circuit immediately.

    4. Emergency mode

    1.If the coolant temperature has exceeded the one set for the Boiler parameter, regardless of the state of the sensors, the pump is turned on, the heater is turned off, and the Office circuit is opened to ensure water flow through the boiler.

    2. If the sensor of any circuit malfunctions, this circuit is considered to be turned off; if the heater was working through it, then after 30 seconds the pump and circuit will turn off.

    3. In the event of a malfunction of the coolant temperature sensor while the boiler is running, the device will switch the boiler to the mode as indicated in clause 4.1.


    I had the idea of ​​making an automatic greenhouse a long time ago. It came to fruition and I began to study greenhouse farming and automation for greenhouses. It turns out that an intelligent greenhouse is not so simple, there are a lot of subtleties that will have to be taken into account. I’ll probably start with the main thing - how growth and maturation occurs different cultures and what parameters environment need to be supported during these periods.

    Air temperature

    If tomatoes and cucumbers grow in a greenhouse, then the environmental parameters for these crops are similar. Tomatoes feel good at air temperatures from +18 to +25°C during the day and not lower than +16°C at night. Soil temperature from +10°C and above. For flowering and fruiting, the temperature can be increased slightly so that the fruits ripen faster and are larger.
    At night, substances from the leaves go to the fruits. If the temperature is increased, the fruit will fill more actively. If the temperature is lower limits, then this promotes the growth of shoots and roots - for long-term fruiting.

    To maintain the desired temperature in the greenhouse, it is necessary to take into account seasonal temperature fluctuations in the area where the greenhouse is located. If this South part Russia, then you can focus on automatically lowering the temperature, and if Northern part Russia will also have to take care of heaters.

    So I’ll start with ways to lower the temperature in a greenhouse. The easiest way to lower the temperature in a greenhouse is to create ventilation. For ventilation, “actuators” are used, which open the vents when the temperature rises.

    There are autonomous “oil ventilators” - the essence of their work is simple: when the air temperature rises, the hydraulic oil expands and pushes the rod, thereby opening the window. When the temperature drops, it closes without any automation. But there are also problems with them, the first problem is that if the air temperature is elevated and a cyclone suddenly passes by with increased wind, the window may simply not have time to close and it may be torn off by strong wind currents. Well, the second problem is cylinder leakage, but this can be noticed in time.

    Actuators for greenhouses

    I still decided to make the ventilation more intelligent. Stores sell linear actuators that can be used to open and close vents according to specified conditions. Because automation always works, then ventilation can be connected to common system, because The actuator costs no more than a hydraulic cylinder and has much more possibilities. In combination with a wind sensor, an atmospheric pressure sensor and a temperature sensor, you can expand the capabilities of your greenhouse. For example, an atmospheric pressure sensor can monitor pressure drops, because it has long been known that when atmospheric pressure drops rapidly, it is more likely that strong wind, and the wind speed sensor will definitely show that all the windows need to be closed.

    Air humidity

    This is as important a parameter in a greenhouse as temperature; it should not fall below 60%. For different crops, this parameter may differ from 60% to 90%. And not only that, the air humidity parameter changes depending on the stage of growth, flowering and fruiting. Therefore, automation for greenhouses should provide the ability to change conditions or select already established programs for different crops and stages of growth.

    Methods for humidifying greenhouses

    To humidify the air in a greenhouse, humidifiers and humidity sensors are used, these can be ultrasonic humidifiers or sprayers high pressure. For ultrasonic humidifiers it is necessary to use reverse osmosis filters, because... The piezoelectric element will quickly become unusable from the sun and other raids. But the nozzles of the high-pressure sprayer also become clogged, which is why a fine filter is needed.
    For ultrasonic humidification, it is worth considering one fact: with ultrasonic humidification, the steam temperature is almost 40 degrees, i.e. When humidified, the overall temperature in the greenhouse will rise slightly. But ultrasonic humidifiers are an economical option; it is better, of course, to use a high-pressure pump and special spray nozzles.

    Soil moisture and watering

    Another important parameter for greenhouses is soil moisture. This parameter changes at different stages of growth and maturation. The greatest need of plants for moisture is during the seedling period - up to 90-95%, as well as during the phase of fruit formation and fruiting.

    Automatic watering systems

    Automatic watering in a greenhouse works in different ways, but in the end everyone comes to dosing watering. Soil moisture sensors can be used but with careful modification. Chinese humidity sensors from printed circuit boards can show accurate data for no more than a month, after which metal surface contacts are destroyed and oxidized. If you use this sensor, then eventually the moment will come when you go into the greenhouse and you have a pool there, everything is flooded and your plants will probably die. Therefore, humidity sensors can be used in conjunction with a water flow sensor (water meter). You need to measure the amount of water consumed per day and set this parameter. A soil moisture sensor can be used but with modification; the contacts must be made of a material that conducts electricity and oxidizes as little as possible. It may be copper, but it also oxidizes over time, but this is already good, because You can clean the contacts once a year and use them again. But it is better to try graphite rods; graphite conducts electricity and does not oxidize. I haven’t tried it yet, but I would like to make such a sensor for testing. In general, you need to take the water meter readings as a basis, and you can turn off irrigation with a humidity sensor if it shows the maximum values. For example, in rainy weather, water flow decreases significantly, and the set amount of water for the flow sensor may be too much. So it is better to use combined control for irrigation.

    Watering is turned on using a relay based on a signal from a sensor or by time. The watering container should be at a height and it is better to water by gravity, simply by opening or closing the solenoid valve. This way you can do more autonomous system, because To power the controller and valves, a regular battery and solar battery. This principle of irrigation operation will be appropriate in places where electricity is often cut off for a long time.

    Soil temperature

    Soil temperature is also important to regulate, because... Maintaining soil temperatures within certain limits will help expand the capabilities of your greenhouse. For example, in this way you can increase the time of use of the greenhouse from early spring until late autumn, and grow some exotic plants. Temperature adjustment in an automatic greenhouse can be done using heating coils. Stores sell heating wires that are laid at the bottom of the beds. Heating is controlled through a controller that constantly reads data from a temperature sensor that must be located in the ground. Those. The temperature sensor must be waterproof. When the temperature drops, the controller will send a relay signal to turn on the power for heating. As soon as the soil temperature reaches the specified limits, the controller will turn off power to the heater. To a heating element has not failed due to frequent switching on and off, it is better to use special dimmers that will gradually apply load to the heater.

    Greenhouse on Arduino


    Greenhouse equipment

    1. Arduino Mega controller - price on aliexpress $10
    2. Relay block for 8 channels - price on aliexpress $10
    3. Temperature sensors DHT - price on aliexpress 1 dollar
    4. Temperature sensors DS1820 - price on aliexpress $1
    5. LCD I2C data display module - price on aliexpress $3
    6. Soil moisture sensors - price on aliexpress $1
    7. Light sensor - price on aliexpress 1 dollar
    8. Electromagnetic valves for drip irrigation - 150 rubles per piece in a car store
    9. A 12-volt uninterruptible power supply unit without a battery costs 700 rubles, with a battery 2000 rubles.
    10. Electric door lock drive for cars (for windows) - 250 rubles in a car store
    11. Float water level sensors - 200 rubles

    Electrical load management


    A Relay Shield board is suitable for controlling electrical equipment; the number of relays must correspond to the number of devices + reserve for the future, you can always add. The picture shows a 4 channel board. We will turn on/off the pump and electromagnetic valves. If you use a servo drive or electric door lock drive for a car, you can open/close the windows.

    Environmental parameters


    Environmental parameters are read in the greenhouse using temperature and humidity sensors. This data can be used for ventilation.

    Lighting control

    You also need a photoresistor that will turn on the lighting.

    Automatic watering

    A humidity sensor is needed for timely watering if the ground dries out. But automatic watering must be regulated by several sensors, because... beds are usually long, and the sensor will not be able to show accurate data for the entire area.

    Timer

    For additional automation circuits, you should get a clock board for Arduino. For watering, it is worth using a timer in conjunction with an air humidity sensor. You can do a lot with the timer, and if you also use the calendar, you can increase or decrease the illumination interval depending on the requirements of plants of different crops

    Access to the greenhouse via the Internet

    If you don't want to limit yourself to only the offline version automatic greenhouse, you can buy for 10 bucks on Aliexpress a special network shield so that you can control the greenhouse via the Internet. We can also use the network to connect video cameras. You can monitor our plants via the Internet.

    Emergency notification via SMS

    I don’t want to get ahead of myself, but an idea came to mind. For example, if water is not pumped into the tank, the pump is clogged, or the window is jammed and the temperature in the room rises above 80 degrees, all this can lead to the death of plants. If we live in a country house, then we can look into the greenhouse once a day to see if everything is okay with the plants. But what if we are in another city? I think it is necessary to create a safety algorithm to check the boundary parameters of the greenhouse. If one of the parameters is approaching a critical level, you can send an SMS using a GSM shield for Arduiono, it costs about 50 bucks on Aliexpress. We will always be aware if our plants are uncomfortable, and we can call a neighbor to check if everything is in order with the greenhouse.

    Ventilation

    There are several ways to maintain optimal temperature. For greenhouses, optimal temperature+22 degrees, maximum +30 degrees and minimum +16 degrees. To begin with, we will use an oil thermal drive, I don’t know the price, because... a specialized one costs from 1,500 rubles, but you can make it yourself from an old car shock absorber and additional capacity for better expansion. In general, the idea is this: when the temperature in the greenhouse increases, the oil in the thermal drive cylinder expands and pushes the piston, which is connected to the window, thereby opening it. And vice versa, as the temperature drops, the thermal drive closes the window. If everything is calculated correctly, then electronic devices are not needed to maintain the temperature, but we will make a fully automated greenhouse in case of extreme heat. And we will add more fans that will turn on if there are not enough oil thermal drives.

    Watering

    We have already read a lot about growing plants in a greenhouse, so we also do dynamic watering, and maybe even adapting to certain plants. We receive basic data for watering from humidity sensors, but it happens that we need to do special watering using a timer at the moment of ripening or growth. To do this, we will write a script for a specific type of plant, but in the main one we will use a humidity sensor. For irrigation, use a large barrel, preferably dark in color, so that the water is heated in it, cold water You can't water it. The barrel is placed at a height so that there is slight pressure. A valve is connected to the barrel, which releases water into the dripper system. For complete control, you can divide it into sections with valves so that you don’t overfill or underfill in different places, and use your own humidity sensor for each section. You need to install two water level sensors into the tank (minimum and maximum). Based on these sensors, the pump will fill the barrel if there is little water there and turn it off if there is enough water in the barrel.

    Let's bring it all to life with the help of the program

    Once we come up with the exact automation scheme, we can start programming sketches. The writing of the program is based on the C++ programming language. You can find many examples on the Internet that you just need to adapt to your tasks and change the numbers. At first, you will need to adjust the parameters and configure everything almost manually, and debug it in the process, so you will have to constantly monitor and adjust. This usually takes a couple of days, one for setting the second for checking, but it would be better to constantly be aware of what is happening in the greenhouse the first time, otherwise the sensor may not be in the right place and react poorly to changes. But then, when everything is debugged, you won’t have to worry about the microclimate in the greenhouse, and just collect fresh vegetables and berries from the garden beds. Programming on Arduino is not difficult, there are many examples on the Internet. This activity can be called a constructor for adults, it is fun and useful. The only thing I would like to say to everyone is that Arduino can solve everything, but for use in industrial scale or for high reliability, questionable. For reliability, it is better to use ready-made devices, although my Arduino has been working for several years without problems.

    What else to read