Annual: 2019

EM037 »
Plant monitoring and care system
📁Internet of Things
👤Lidia Izmailova
 (National Research University Higher School of Economics)
📅Oct 13, 2019
Regional Final

👀 2504   💬 0

EM037 » Plant monitoring and care system


In this project, automated care for plants that grow in the greenhouse is provided. The robot moving along the rails irrigates the soil and monitors the climatic conditions, such as light, humidity, temperature, etc. Using the website in the local network, users can set up parameters for crops and monitor plants in real time. The introduction of FPGA with Arduino in the project allows expanding the capabilities of the robot and improving the care of plants.

Project Proposal

1. High-level Project Description

Our project can greatly facilitate growing of plants by reducing the impact of climate on the cultivation process and minimize errors in production. Thus, the cultivation of various crops can be carried out in any climatic zones which will increase yields, ensure a sufficient amount of products for the population, and minimize costs in the process of growing.

The target audience of this device is very extensive: it can be used both in personal subsidiary farming and in mass production. Now, there are few similar devices on the market, so our team presents a new fundamental solution for growers. Centralized device management allows easily expanding the number of devices, depending on the area and number of plants in need of care.

The system assumes the presence of performing and control parts. The belt fabric attached to the robot, driven by an electric motor, moves the actuating mechanism to the required distance. The executing part is represented as a robot with a manipulator which measures the environmental parameters and (if necessary) immediately waters and loosens the soil. This arrangement of sensors significantly saves energy, protects against interference and errors, as when processing large areas, the length of the wire for sensors increases. Also, this design solution reduces the cost, increases the speed of access to the sensors, makes the design more compact, and prevents data interpretation errors in case of sensor defects. The manipulator is a mechanical arm with removable nozzles for various actions, such as watering, loosening, measuring soil parameters, etc. Parts for the manipulator are made using a 3D printer. Light control is carried out by turning on or off the LED tracks, depending on the performance of light sensors. The built-in fans control the level of humidity and carbon dioxide levels. With the increase of these indicators, the ventilation system in the greenhouse is activated until the indicators come to a predetermined rate. The robot control is implemented using FPGA with De10-nano nozzle.

The control part of the system is implemented based on FPGA. The system to communicate with the user creates a site on the local network. On this site, users can observe the planted plants, as well as at any time change the requirements for climatic conditions. For convenience, when planting plants, the user is offered basic climatic conditions in connection with the selected variety.

Further expansion of the system can be carried out by adding several nozzles for additional actions. For example, for cutting plants, removing weeds or spraying from unwanted pests. All environmental data is sent to the control unit which stores and processes the parameters, as well as sends instructions on further actions for climate change inside the greenhouse or the need for irrigation of the soil. If necessary, the system notifies the user about certain actions, events or problems that arise in the course of work.

First prototype and new platform: 


Video demonstration of first prototype:

Video demonstration of prototype:

2. Block Diagram

Device working system diagram

System block diagram

3. Intel FPGA Virtues in Your Project

De10-Lite allows using all the advantages of SoC, combining the productive ARM HPS core and the flexibility of FPGA. HPS core makes it possible to locally implement powerful data processing algorithms and parallelize their execution at the hardware level using FPGAs. HPS core allows easily connecting to WiFi and Ethernet to communicate with an external server. In addition, the use of IP cores permits quickly implementing any additional hardware module on the FPGA logic. FPGA facilitates the implementation of any interfaces connecting different peripherals. It also has the ability to easily connect Arduino that allows for transferring part of the low-level functionality to a remote microcontroller board. Power supply (5V) permits implementing a safe and autonomous system with low power consumption.

The DE10-Nano presents a robust hardware design platform built around the Intel System-on-Chip (SoC) FPGA, which combines the latest dual-core Cortex-A9 embedded cores with industry-leading programmable logic for ultimate design flexibility. It also has a sufficient number of outputs for connecting modules.

4. Design Introduction

This system greatly facilitates the cultivation of plants, even in exotic conditions, since all the parameters can be configured at any time. Thanks to this, the plant monitoring and care system can establish any natural conditions and, as a result, successfully harvest various crops in any climatic zone and at all times of the year. Therefore, using such a system makes it is possible to lower the cost of growing plants and increase the yield. It means that the plant monitoring and care system is widely used in agriculture, the development of which is in demand nowadays.

The system created is capable to automatically track the parameters of atmosphere, soil and water in a specified area; control interface for plant monitoring and care system was developed; positioning system for a robot suspended on a rail was developed and implemented, and an autonomous system, that waters and loosens plants based on the data obtained, was created. The developed device provides "smart" airing, as well as lighting for planted plants. After testing the prototype for several months, a harvest was obtained, as well as the data on the effect of various climatic parameters on the development of plants. Based on the experiments conducted, the most appropriate modules were chosen to study the productivity of the development of agricultural crops under conditions of artificial growth, and the method of robot motion for automated care was empirically chosen. It is the work directly at the roots of the plants that allows for accurate watering and loosening, while the leaves and shoots of the crops are not damaged, and it makes such cultivation more realistic and careful. This method of plant care helps to prevent errors in production, as the system constantly monitors and maintains the climate inside the greenhouse. After all the research done, a project implementation plan was created.

Using FPGA greatly simplifies the data and control system. The modules are controlled using parallelization. It can quickly process information and immediately display it to users. The linking of the executive and control parts is made possible by FPGA. This creates a distributed load on the board and reduces the processing time and output information. Also, the integration of new modules can be done without any problems due to the sufficient amount of GPIO. The use of De10-Nano allowed us to use all the advantages of SoC, combining the powerful ARM core HPS and the flexibility of FPGA. 

5. Function Description

First prototype

An initial prototype of a system made of materials at hand was developed for testing technology and preliminary development of technical solutions. Further, the entire system will be reworked and implemented at a new level, taking into account all the identified problems and shortcomings of the preliminary prototype.

This device is a guide system, control electronics, sensors, irrigation and loosening systems, as well as a greenhouse frame made of transparent plastic (Fig. 1). The system can analyze sensor readings from different points of the greenhouse and maintain specified conditions. The operation of the entire system is controlled by the FPGA De10-Nano which, analyzing the sensor readings, itself makes decisions about the need to turn on a particular module. The body of the prototype is made of scrap materials - Lego parts which had to be improved to achieve the best result. When the water level in the tank reaches the minimum value, the robot signals a lack of water. At the moment, the robot is able to water and loosen only the specified points which it recognizes using the self-positioning system (Fig. 2). It is also created a user-friendly menu for visualizing processes and setting parameters. In addition to connecting removable drives, the management station also has the ability to connect to the server using a local Wi-Fi network for subsequent data processing.

When growing the roots of plants suffer from a lack of air, so it is necessary to weed the plants and loosen the soil, for example, after watering, when the soil is particularly settled. The system provides for the possibility of hilling plants to saturate the soil with air (Fig. 3). This allows plants to provide more comfortable conditions for growing, prevents trapping of the soil and rotting of the root system. Nozzle for loosening consists of two pointed tips (Fig. 4). This form of nozzle allows for obtaining better loosening and does not damage the roots of plants. As a result, effective and high-quality cultivation of agricultural crops is achieved.

Maintaining gas, light and temperature regimes of the environment is necessary for most types of crops. Therefore, a moisture and light control system was added to the prototype (Fig. 5). Light control is carried out by turning on or off the LED tracks according to the performance of light sensors. The built-in fans control humidity and carbon dioxide levels. With an increase in these indicators, the ventilation system in the greenhouse is activated until the indicators come to a predetermined rate.

Fig. 1. The first version of the robot


Fig. 2. Self-positioning system


Fig. 3. The appearance of a robot prototype for loosening the soil


Fig. 4. The mechanical rake of a robot prototype for loosening


Fig. 5. Robot prototype when loosening the soil: visible LED lights of plants are in the upper part of the picture


After receiving the finished first prototype and testing it with various crops, while system creation, the concept of materials distribution changed. Some of them were replaced with more durable and comfortable to use. In the new version of the design, it was decided to bring the electric propulsion of the robot out of the working area. The belt attached to the robot, driven by an electric motor, moves the actuator to the required distance. The system assumes the performing and control parts. The executing part is represented as a robot with a manipulator, which is located on a movable box, which houses the AT Mega2560. It measures environmental parameters, transmits sensor values, receives commands and, if necessary, immediately irrigates and loosens the soil. This arrangement of sensors significantly saves energy, protects against interference and errors, as when processing large areas, the length of the wire for sensors increases. Also, this design solution reduces the cost, increases the speed of access to the sensors, makes the design more compact and prevents data interpretation errors in case of sensor defects. The control part is based on the SoC De10-nano with HPS based on the Linux kernel. This board is capable of transmitting low-level commands to the microcontroller, and it allows you to implement high-level tasks, such as data analysis and decision-making based on them, maintaining a server for remote monitoring of the system. The presence of a graphical interface and the ability to display images on an external screen simplifies user interaction and enables quick system configuration without changing the program code. De10-nano uses 5V power, making it an ideal choice to reduce power consumption in the system as a whole. The manipulator is a mechanical arm with removable nozzles for various actions, such as watering, loosening, and measuring soil parameters. Parts for the manipulator are made using a 3D printer. Fig. 6 shows one of the first types of the manipulator assembly model.

Fig. 6. The first type of manipulator

The figure shows the nozzle for gripping and loosening. The optimal size and shape of the nozzles are chosen experimentally. Further expansion of the system can be carried out by adding several nozzles for additional actions (cutting plants, removing weeds, or spraying from unwanted pests). All environmental data is sent to the control part, which saves and processes the collected information, sends instructions on further actions for climate change inside the greenhouse or the need for irrigation of the soil. If necessary, the system notifies the user about certain actions, events, or problems that arise in this work.

Data transmission between boards is carried out using packets. The package is always formed in different ways, since the data from the sensors are requested at different intervals, and sometimes they are requested again. A package can contain all parameters at once, and sometimes only one parameter. The formation of the premise occurs according to the principle: name of the parameter, value. When receiving a packet, a parity check is performed to avoid transmission errors. If the values ​​are correct, the control part separates the parameter values ​​using flags (dimension and data order specified earlier). Packages may also contain commands for controlling the execution part. To avoid errors, these commands contain the numbers of actions to be performed and are a binary eight-bit code. The system is able to centrally store the measured data on a long-term storage medium - server SSD-disk. Recording of the received data is implemented in widely used .csv format (comma-separated values). Data, such as time (the sequence number of the cycle; each work cycle takes 10 minutes), as well as data from all sensors are recorded in the file. For the user the convenience, the DE10-nano independently builds graphs from the sensor readings and intuitively presents them. For the convenience of subsequent work, the SD card initially contains the FAT32 file system which allows for simply removing the card from the device, inserting it into the card reader of any computer, after which it is ready to work. Fig. 7 shows a fragment of .csv file with the data obtained in the interpretation of MS Office Excel software.

Fig. 7. Fragment of .csv file

Fig. 8. Guide rails for the performing part

Figure 8 shows the guide rails for the moving part. They are made of aluminum profiles, which provides greater structural strength compared to the first prototype. The movement of the robot will be due to the movement of the belt cloth between the guides. All the wires and the water supply tube are hidden under the belt, which will allow the robot to move freely and the water tube will not bend over. The robot works with plants on both sides of the rails, this arrangement of rails provides an economical expenditure of space for planting and reduces the processing time of each, and therefore consumes less energy.

Figures 9 and 10 show a general view of the structure; a demonstration tray with ground is located in parallel with the guides. In the final form, the rails are embedded in the ground, which makes the system more convenient to use and configure, economically consumes space for planting.

Fig. 9. Prototype

Fig. 10. AT Mega 2560 and FPGA De10-Nano

Fig. 11. Manipulator

Fig. 12. Side view of manipulator

Figures 11 and 12 depict the manipulator, the details of which are printed on a 3D printer. For additional fixation, some parts are glued to a two-component adhesive. The manipulator has 4 degrees of freedom, which are responsible for moving around the rails, raising, lowering, moving away from the rails and rotating the nozzles, so that it can cover a large area around the processing point, and make careful care without damaging the shoots and roots of plants. The manipulator is located on the belt web on which the trolley is fixed. Inside the trolley there is a motor for turning the manipulator relative to the control board, and sensors are located on top. Sensors are placed on the upper panel of the moving part to reduce the error in reading the climatic parameters. In order to avoid a systematic measurement error, the gas pollution sensor is located separately and is located further from the others, since it heats up during operation, which can affect the temperature and humidity.

Link to details for the manipulator:

The system is equipped with a ventilation window for airing and oxygenating the greenhouse. The system also has a fan for air mixing. This allows the air to move freely around the greenhouse, as a result of which the temperature and humidity are evenly distributed and there are no sharp drops. And of course, the fan allows the pollen to circulate rather than settle, so even in the conditions of a natural winter, plants can produce fruit without the need of insects for their pollination.

Heating of water and soil occurs due to heating elements. Heating should be done with extreme caution, as the roots can be overheated and the plants will die, so a high-precision sensor is used to measure the temperature. And with direct heating, data is removed more often than usual.

Additional lighting is presented in the form of special lamps for growing plants, the light in which is close to the sun. With a shortage of such lamps, as well as to make the cost of the product cheaper, you can use LED strips, but this will have to adjust the development period. Since in different periods the plant requires different proportions of red and blue light from the visible spectrum. Also, with the help of LED strips, plants will not be able to receive light from invisible light, which, of course, will adversely affect their growth: the speed will noticeably decrease, the shoots will become thinner, and therefore the harvest will be small in size and in small quantity.

The system can notify the user in an emergency, as it notifies the user about the state of the plants over time. Emergency situations can be: a fire (the air temperature sensor increases, the level of carbon dioxide increases markedly, the changes are drastic), the failure of some modules (that is why some of the especially important sensors are duplicated), the lack of some materials and others. Notification occurs through the site in the local network. Also there you can customize information about planted crops. But when planting, the system itself offers options for placing plants depending on their size and compatibility with each other, since not all plants can be planted together. This approach allows planting people who have a minimal understanding of agriculture, it will help prevent mistakes and make the harvest tastier.

The system provides for the appearance of a camera for monitoring plants. So each user will be able at any time to see what is happening in the greenhouse, doing it remotely.

6. Performance Parameters

The robot is capable of processing a large area of planting. Using only one set of sensors, the robot can travel around all the plants alternately giving each plant about 2 minutes to tillage and air parameters. Since the environmental parameters do not change rapidly, a single robot can be used for approximately 700 seedlings when planted with a difference of 30 cm. These measurements are approximate, since the distance between plants varies from speciesof plants. The frequency of watering also depends on the specific varieties of plants and the period of development.

The data request from sensors is as follows: reading of the carbon dioxide level occurs once every 20 minutes, it takes a minute to warm up the sensor; humidity and air temperature - once every 10 minutes; soil temperature - once per hour; water temperature is measured immediately before watering the first plant and (if necessary) is heated, then checked 20 minutes after heating. Soil temperature data may be requested more often if the climate outside the greenhouse is very different from the internal climate, since in this case the earth cools faster. The frequency of measuring climatic parameters can be adjusted in accordance with the recommendations for growing plants.

Due to the distributed system of elements and modules in the system, the minimum time spent on caring for plants is achieved. Thus, it is possible to increase the area of plants without loss for individual care.


7. Design Architecture

The software of the first prototype, used on the ATMega system microcontroller, is made in C ++. The software of the system is made in the C language. The platforms support all interfaces and transmission protocols that are used in the project and also have a sufficient number of analog and digital ports. The following protocols are used for the operation of sensors:

  1. One-Wire protocol for connecting DS18B20. This protocol requires only 2 wires which allows using a “twisted pair” cable, as well as the use of a long cable well suited for connecting sensors when removing them from the prototype package.
  2. UART protocol to exchange data boards between each other. This is the most common physical data transfer protocol the purpose of which is to organize communication between digital devices.
  3. SPI protocol for connecting SD card. This protocol provides less power consumption and allows for using an arbitrary length of the transmitted "packet".
  4. I2C protocol for connecting BMЕ-280 and GY-302. This protocol allows for connecting a set of devices that need only one microcontroller.

The server hardware runs under Microsoft Windows Embedded; the site is written in PHP and runs on the free Apache HTTP server software. The router is running free DD-WRT firmware based on the Linux kernel. It is configured HotSpot for speed and ease of use of client devices.

Indoor and outdoor air parameters may vary greatly. For this reason, the system implements control of temperature and humidity outside the greenhouse in order to avoid abrupt climate change when airing the greenhouse. The plant monitoring and care system provides for the location of sensors directly on the performing part which reduces the number of necessary sensors, thereby reducing the final cost of the device. The control part of the system processes data and gives instructions to the robot.

The process of plant care, performed by the robot, involves the stages as follows:

  1. Once in a while c FPGA sends a command to collect data
  2. The performing part takes data from sensors (air and soil temperature, pressure, light level, gas contamination level)
  3. Data transfer to the control part
  4. Data processing by the control part
  5. Reception of management teams
  6. A robot pulls up to a given plant
  7. Measures the measurement of soil moisture moisture
  8. Sending data to the control part
  9. Data processing by the control part
  10. Reception of management teams
  11. With a lack of moisture, measuring the temperature of the water
  12. Sending data to the control part
  13. If necessary, heating water for irrigation
  14. Reception of management teams
  15. Watering and loosening the soil
  16. Additional soil moisture measurement
  17. Sending data to the control part
  18. Data processing by the control part
  19. Reception of management teams
  20. Moving to the next plant

In parallel with this process, other climatic parameters are measured, when they deviate from the previously set norm, the system includes built-in modules for climate change. 

An additional moisture measurement helps to control the proper care of the plants, i.e. whether a sufficient amount of water has arrived to the plant. If the watering was insufficient, then the procedure is repeated, and if the water has not arrived at all (the humidity value has not changed much), the system reports an error in the water supply, which may be due to lack of water or problems with the hose.
For greater accuracy in measuring temperature and humidity, the readings are duplicated, which helps to achieve greater reliability of the results. Therefore, for air, temperature and relative humidity are calculated by the formulas 1 and 2, respectively, where the weight of the quantity from a specific sensor in the final version is determined by the accuracy of the measurements.

tº = t* 0.7 + (t+ tc) * 0.15        (1)

where, t - temperature of the DS18B20;
            t - temperature DHT22;
            t - temperature BME280.

h = h* 0.6 + hc * 0.4        (2)

where, h- humidity DHT22;
            hc - humidity BME280.

At the same time, a check is underway for acceptable values, that is, for the correct operation of the sensors. If the difference in temperature or humidity is more than 8%, the system requests the data again. If this method does not help to correct the situation, then the system itself decides which of the values to trust, after which the client is notified of the error.

This system can detect emergency situations, for example, with a sharp increase in the level of gas contamination and temperature and reaching maximum permissible values, the system will notify of a possible fire. Also, if it is impossible to change any climatic conditions for a certain period, the system will notify about the failure of some modules.

For the successful operation of the entire system, when it is installed and configured, the test mode of all modules is activated. Checks access to water, free movement of water along the hose, correct installation of sensors and the correctness of their operation, free movement of the cart and movement of the manipulator, the correctness of data transfer between the control and executive parts.
Climate change in the greenhouse occurs using different modules. Special phytolamps help prolong daylight hours for plants, with a lack of natural light. A ventilation and ventilation system is needed to control the level of carbon dioxide, humidity and temperature. Special heating elements buried in the ground help maintain soil temperature to prevent frostbite on the roots. Water is also heated using heating elements. Some of the heaters are located below on the side wall of the greenhouse next to the fan for even distribution of warm air throughout the space.

Some of algorthms:

Fig. 13. Plant processing algorithm


Fig. 14. Illumination algorithm


Fig. 15. Spraying algorithm

For performing irrigation, loosening and spraying responsible performing part. Changes in light, ventilation, heating of the soil and water are performed by the control unit. This solution allows you to independently perform several actions at once and reduces the processing time of plants.

Adjusting the light, ventilation and heating of the soil affects all plants, so the execution of these algorithms is performed once in a while, which is customizable by the user and depends on the plant varieties. Watering, loosening and spraying occurs sequentially for each plant (if necessary). Such a solution creates conditions close to the natural, because if it rains, both leaves and roots get wet.

The algorithm for setting the light includes checking for daylight hours. This condition helps to determine the phase of the day in plants and does not give the plants a constant light, which has a beneficial effect on growth and development. At the same time, the lack of lighting hours is disastrous for them, so we monitor this parameter.

Air ventilation is based on data on the temperature inside and outside the greenhouse, as a sharp hit of a cold stream of air during ventilation can adversely affect the heat-loving crops.