A Scalable Smart Greenhouse Design For Mongolian Families
Article information
Abstract
Life expectancy in Mongolia is male 63.8 and female 72.8. Total life expectancy is 68.1, which gives Mongolia a World Life Expectancy ranking of 132 in the WHO 2022 report. The number one reason for the mission of Mongolians is cardiovascular disease, which is closely related to their diet. The staple food of Mongolians is meat. The annual vegetable consumption of Mongolians announced by the UN in 2017 was 47.31 kg, far below the average value of 250 kg in developed countries. This paper proposes a smart greenhouse for families where Mongolian families can grow vegetables at home. This paper presents a smart home greenhouse that meets the environmental characteristics and requirements of the Mongolian region. We manage sensors and actuators through the Raspberry Pi platform to provide an environment necessary for cultivation. It describes the architecture of an integrated management system that stores sensor data in the cloud system's storage, apply reinforcement learning, and controls the operating point of the smart greenhouse. It describes how to manage the system internally using three layers, the physical layer, the embedded OS layer, and the application layer, and to communicate with the cloud through the IoT edge manager.
Introduction
The average life expectancy of Mongolians, who mainly eat meat, is 63.8 years for men and 72.8 years for women. It is lower than developed countries, and according to the WHO 2022 report, it ranks 132nd worldwide. The following table shows the statistics of geriatric diseases in Mongolia.
Mongolians eat meat all year round because their staple food is only meat. Vegetables are more expensive than meat, so putting them on the table is not easy. The number one cause of death among Mongolians is cardiovascular disease, which is closely related to diet.
Mongolia is very dry. Annual precipitation is about 350 mm. The climate is a typical continental climate, with a clear dry cold climate with four distinct seasons. In summer, the temperature rises to 36 degrees, and the UV rays are intense. However, since the humidity is low, we do not feel the perceived temperature is high. At night in winter, temperatures drop to minus 45 degrees Celsius, and sub-zero temperatures continue from the beginning of November to the end of April.
According to 2019 statistical data, Mongolia's food market is growing at an annual rate of 20%. (Kati, agro-food export information, https://www.kati.net/nation/basisInfo.do?lcdCode=MD222). In particular, although the production of fresh agricultural products is increasing due to government investment, the self-sufficiency rate is still low, and the country is dependent on imports from China. Based on production, livestock products and grains account for the largest share, and fruit production is the lowest at 1%, accounting for 11% of fruit consumption.
As of 2017, Mongolia's greenhouse area is 7,659 hectares, the yield is about 5140 tons, and the import volume is 9733 tons, mainly tomatoes, cucumbers, and long mongs. The vegetable self-sufficiency rate is 35%. The cultivated area of Mongolia was 770,000 hectares in 2014 and 960,000 hectares in 2020. The self-sufficiency rate of vegetables was 54% in 2014 and 70% in 2020, with a goal of 100% self-sufficiency by 2025. (https://blog.daum.net/kmbc/1558) Mongolia's agricultural industry is greatly affected by natural disasters such as drought and snow damage. However, it has maintained an average growth rate of 6% over the past five years.
The annual vegetable consumption of Mongolians announced by the United Nations in 2017 was 47.31 kg, far below the average value of 250 kg in developed countries. The reason is that the total agricultural land area is 122,000 ha, 1% of the national land area, which is smaller than Korea, and it is difficult to cultivate crops due to the dry and barren climate. In addition, agricultural products imported from China have high distribution prices, making it difficult for ordinary people to access them as much as they want.
Through the Mongolian government's agricultural promotion policy, the size of the food market is growing by 20% every year, and the production of fresh agricultural products is expanding. As the popularity of vegetarian brands such as Ulemj Organic and Tsetseg, which sells vegetarian-oriented organic food, is increasing, the Mongolian concept of eating is changing.
In order to supply red vegetables that are good for cardiovascular disease (e.g., strawberries, tomatoes, red peppers, Etc.) throughout the year, this paper proposes a smart greenhouse for families in which Mongolian families can grow their vegetables at home. The goal is to supply vegetables to a family of four throughout the year.
We build the greenhouse like a house with a roof that allows sunlight to pass through. We harvest multiple crops in any season, no matter the climate. In order to increase the yield, it is necessary to control the quality and growth of food, so we should design to fit the plant's growth pattern accordingly. (Farooq et al., 2022).
Several years ago, people sought farm management and quality improvement methods that minimize farmer intervention using information and communication technology (ICT). As a result, smart greenhouse agriculture, in which crops are grown in an enclosed environment, is in the spotlight. Farmers determine environmental variables and cultivation methods in a traditional greenhouse according to the grower's skill. Accordingly, Engineers introduced IoT technology and developed an automated greenhouse in an intelligent environment. (Kodali et al., 2016).
In case of excessive or insufficient water supply, we control the greenhouse with a precise system that minimizes the effects of bad weather and intense light. It supports monitoring and automation (Dan et al., 2015). Researchers introduce IoTbased prototypes, applications, and services and carry out cutting-edge R&D in network architecture, interoperability, and security issues.
We can use vertical farming in indoor greenhouse farms to increase space utilization. The interior is environmentally friendly and is a greenhouse that does not use pesticides. However, this requires high-level maintenance. We must control temperature, humidity, soil moisture, and LED lights to compensate for sunlight.
An advantage of cloud computing is that it can facilitate dynamic monitoring of virtualized computing systems. In addition, data can be stored at a meager cost, enabling farmers to obtain information on environmental variables at minimal cost using video, image, and short message services. In a smart greenhouse, cloud computing can be used in three layers: infrastructure, platform, and software (Mekala and Viswanathan, 2017).
The structure of this paper is as follows. Section 1 introduces recent research trends for smart home greenhouses and describes Mongolia's environmental characteristics and requirements. Section 2 proposes and describes a system for integrated control of multiple smart greenhouses installed in the field using the cloud system. It describes the system architecture that manages sensors and actuators through the Raspberry Pi platform, stores sensor data in the cloud system storage, applies reinforcement learning, and controls the operating point of the innovative greenhouse. Section 3 describes the system software architecture that controls various environmental variables inside the smart home greenhouse with sensors and actuators. It describes how to manage internally using three layers, a physical layer, an embedded OS layer, and an application layer, and communicate with the cloud through the IoT edge manager. Section 5 concludes.
Background Study
1. Research trend of smart greenhouse for home use
We can install smart greenhouses for home use indoors and incorporate IoT technology to make sustainable cultivation possible throughout the year using minimal resources within a limited space. To expand the cultivated land in a limited space, we can create vertical layers and increase the spatial density by minimizing the volume and weight occupied by crops. We can maximize operational efficiency and productivity through hydroponics, automatic management using IoT, light technology using LED, and reinforcement learning. Figure 2 shows the cultivation of a European-style lettuce-like vegetable called Isabelle in a smart greenhouse operated by Metro Farm at Sangdo Station. Isabelle weighs about 100g per pod, and it takes 38 days to produce one seedling.
IoT-based smart greenhouses can have three layers: A physical layer of hardware structure, a layer for monitoring and controlling the states, and a network layer for data collection. Inside the first layer are physical components, including sensors, actuators, and microcontrollers. Sensors play an important role in measuring information. It measures essential environmental variables such as humidity, temperature, gas, acidity, moisture content, and light intensity. The collected data is stored through the Internet and used to determine the optimal operating point of the actuator by analyzing it with reinforcement learning. Actuators such as nutrient faucets, water pump motors, electric switches for LED lights, and window openers are activated to control the internal states of the greenhouse (Abdul Razzaq, 2020).
The second layer is for monitoring and controlling the states. Climate monitoring checks if temperature, CO2 level, humidity, and air pressure are within set limits and controls devices to adjust these values if necessary. In hydroponics, water quality monitoring measures the number of essential components such as phosphorus and potassium and measures the salinity of the water, allowing plants to grow normally. Plant monitoring includes plant disease and leaf observation. We use Data obtained by recognizing plant growth trends and health conditions for further cultivation in the future (Theodora Karanisa, Etc., 2022).
The third layer is IoT data collection in a cloud environment. The most used protocols for remote storage are MQTT, HTTP, and CoAP (Mekala and Viswanathan, 2017).
2. Required function of smart greenhouse for Mongolian family
In order to provide an environment for plentiful cropping even in the harsh environment of Mongolia, it requires the warmth of the greenhouse, a continuous power supply, and a reliable communication network. During six months of subzero weather, it damages most crops. It can use a double-layered wall to support the internal heat and insert an air barrier or insulating material. It must control the internal temperature to an appropriate temperature by controlling the heater. The supply of cheap electricity is critical to powering up IoT devices. Since the battery life installed inside the greenhouse is limited, we aim first for large cities with power lines. We install a UPS in case of occasional power outages. In the case of installing a greenhouse in a nomadic away from the city, we can use a temperature difference for solar panels, wind power, and electric generators.
Data is collected and stored in remote storage. Meanwhile, when an emergency is detected, we design the sleep mode to minimize power consumption compared to the normal mode to avoid extreme damage. We recommend a wireless sensor network (WSN or Wireless Sensor Network) because it is expensive to connect the sensors through a wired connection when the Internet is unavailable, and some crops have to change locations over time. WSN is simple to implement and inexpensive. It communicates with nodes distributed in the greenhouse to encapsulate and transmit greenhouse farm information. Figure 3 compares the bandwidth, reach, and cost of available wireless protocols.
In order to increase price competitiveness, we set the BOM price of electronic devices in the greenhouse to less than USD 500. For this purpose, we adopt Raspberry Pi (RPI) platform equipped with Embedded Linux. RPI controls environment variables to optimal values through reinforcement learning. We install and control various sensors (temperature, humidity, carbon emission, water quality, pH level, power consumption, etc.) and actuators (fans, LED lights, pumps, showers, etc.). We store the measured data in the cloud. The users can manage the greenhouse system through secured monitoring and logging web functions.
The greenhouse interior uses vertical cultivation to increase space efficiency. By connecting the basic unit of the smart greenhouse horizontally and vertically, we can adjust the size according to the user's requirements. Suppose a family has many members or wants to grow several crops, we can expand the size from the basic unit, and the price can be lowered further by eliminating duplicate electronic devices.
3. Public Relations and Local Recruitment and Training
Product marketing is crucial to improve Mongolian's awareness of vegetarianism, dramatically reducing adult diseases and promoting healthy life. We must persuade the Mongolian government to promote Internet marketing, agricultural exhibitions, and technology dissemination at the broader government level.
Education to help ordinary farmers install and operate the innovative technology provided by smart greenhouses is very important. Thorough education of relevant stakeholders is necessary so that ordinary farmers can understand and accept the applicability and utility of new technologies. It is vital to educate non-technical users in the field of intelligent agriculture.
Smart Green House Integrated Control System
1. Integrated Control System For Smart Greenhouse on Cloud
Figure 4 is a conceptual diagram of an integrated control system for smart greenhouses proposed in this paper. It includes 1) the control system that observes and controls various environmental variables in a smart greenhouse, 2) the scalable smart greenhouse, and 3) the smart greenhouse interface with the cloud.
The smart greenhouse provides an environment where crops can be multi-cultivated regardless of the external natural environment. It is a system installed in the front end that periodically measures the values of various environmental variables according to the types of crops and controls the values by operating actuators. The sensor transmits the collected data to the front end of the greenhouse, and we store data in the local storage. Local storage is not ample in size, so it deletes old data automatically. To store, monitor, and analyze all measured data, we store it in the cloud system. The front end of the greenhouse transmits sensor values as streams to the back end of the cloud server. We store sensor data in the storage and database in the cloud system. The data is analyzed in batch format and used to control the actuators to converge the measured values of environmental variables to the optimal value obtained through reinforcement learning. The cloud also provides a monitoring service that shows the stored data value to the administrator in real time. If an abnormality occurs, it is saved in the system log file and reported to the administrator through the alarm service. We provide a command window so the administrator can manually operate all actuators (Microsoft, 2021).
2. Scalable Smart Greenhouse
The basic unit of the smart greenhouse is the size that can be grown for multiple crops so that a family of four can eat continuously throughout the year. For example, Isabelle has about 100 g per pod, and it takes 38 days to produce one seedling. 9.5 crops per year are possible. Assuming that one person's intake of Isabella per year is 50 Kg, it is enough to cultivate 210 stalks per crop. In the case of making a water channel vertically through hydroponics, it requires five shelves with 42 plants per shelf.
If we have a large family or want to grow other crops, we can connect the smart greenhouse of this basic unit horizontally and vertically to adjust the size to suit our needs. We can significantly reduce the cost per basic unit by saving multiple redundant parts. For example, it becomes possible to share controllers, UPS, solar chargers, wired and wireless communication devices, Etc. with each other. Figure 5 shows a scalable smart greenhouse.
3. The System For Observing and Controlling Environmental Variables
The smart greenhouse measures and controls many variables necessary for cultivation in the system, for example, temperature, humidity, carbon emission, water quality and quantity of water supply, acid concentration, energy charge, LED light intensity and frequency band, vegetable quality, Etc. Therefore, there is a need for a system that simultaneously measures several types of sensors and controls actuators. As shown in Figure 6, We can implement such a system using the Raspberry Pi (RPI) platform equipped with an ARM microprocessor. RPI has 40 GPIO pins to connect and manage multiple sensors and actuators simultaneously (Huins, 2022). Measured sensor values can be recorded in local storage and transmitted to the cloud for further analysis.
System Software Architecture of Smart Greenhouse using Raspberry Pi
As shown in Figure 7, the smart greenhouse consists of architecture with multiple layers. The first layer is the physical layer, where we locate various hardware. On top of that, embedded Linux and several libraries make up the second layer. The third layer consists of three managers who control the smart greenhouse.
Smart greenhouses play the role of IoT edge devices from a cloud perspective. The IoT edge manager on the third layer starts an Internet connection with the IoT Hub, which is the input/output port of the cloud system. Then it periodically sends a heartbeat message to maintain the connection. It sends the sensor data to the IoT Hub and receives its commands. It issues the commands to the actuators.
The device (sensor and actuator) control manager reads the measurement values of the sensors connected to the GPIO pin of the Raspberry Pi and stores them in the local storage device. It also transmits them to the cloud through the IoT edge manager in real-time. The local storage stores the sensor data in FIFO format and deletes old data automatically. It receives commands from Machine Learning (ML) that exists on the same layer or from the cloud and controls the actuators. The ML component plays a role in optimally controlling the environmental variables in the greenhouse. It analyzes the sensor data and adjusts the parameters of reinforcement learning transferred from the cloud. The communication bus provides interprocess communication service (IPC) among the managers on layer three and the IoT Hub.
1. IoT Architecture using Cloud Computing
When we power up the smart greenhouse installed in the field, an internal software manager starts a monitoring system that reports environmental variables stored in the local storage through the GUI. The local storage size is not very large, and the measured data varies depending on where the smart greenhouse is.
Reinforcement learning, which stores vast amounts of data and determines optimal environmental variables based on this, provides its services through cloud computing. Figure 8 shows the IoT architecture using cloud computing.
Many smart greenhouses installed in the field can receive cloud computing services through the IoT edge manager. One IoT Hub can communicate with hundreds of IoT edge devices and process hundreds of streams. When the system starts, the IoT edge manager attempts a secure Internet connection with the IoT Hub using the pre-configured addresses. If the communication connection is successful, the IoT Hub sends the stream data received from the IoT edge to the cloud storage according to the contracted provisions. The cloud monitors the stored data in real-time. It analyzes and uses the data to optimize the parameters for ML. It sends the actuator commands to control the environment variables of the greenhouse to the IoT edge manager.
IoT Hub guarantees secure Internet connections and contracted services to IoT edge devices. It verifies that different kinds of streams from IoT edge devices conform to contracted provisions (Microsoft, 2021). It delivers the data stream to the storage and the monitoring system connected to the IoT Hub.
The data is reported to the monitoring system so administrators can see the measured values in real-time. If necessary, they can perform batch analysis on the log. When an incident occurs, it sends an alarm or e-mail to the address set by the administrator.
ML is used to collectively process the stored data to determine the input values of the actuators that control the smart greenhouse under optimal conditions.
The IoT edge manager makes a service contract after establishing an Internet connection with the IoT Hub. It delivers the sensor data to the IoT Hub and issues a command to the actuator manager.
It sends the heartbeat message periodically to maintain the Internet connection with the IoT Hub. To increase the efficiency of local storage and ML, administrators can buffer, filter, and compress data and even change the data format into a format that the cloud understands.
2. Raspberry Pi Software Stack
The Raspberry Pi (RPI) has 40 GPIO pins. We use these pins to pass data from multiple sensors to the RPI memory and simultaneously output commands from the RPI to multiple drivers.
We identify each pin by a BCM number or a wPI number, as shown in Figure 9. We name pins GPIO.xx. Manufacturer’s device drivers use BCM numbers. Applications using the WIRINGPI library facilitate wPI numbers (Huins, 2022). Each pin is set to input or output mode and uses a device-specific serial communication protocol. RPI sends commands to a device when we set the pin to an output mode. It receives data from the device when we set the pin to an input mode.
RPI also provides communication ports to connect various peripheral devices. As shown in Figure 10, there are UART ports that can connect terminals and ports that connect devices using I2C and SPI protocols. It also provides the ports for connecting EEPROM. Analog input signals are first converted to digital signals by ADC converters, and then the digital values are transferred to RPI memory using I2C or SPI protocols. When we need to output an analog signal as a command to an actuator, we use PWM (Pulse Width Modulation). PWM signals are passed to a low pass filter and produce AC values.
The 40 GPIO pins can drive the connected peripherals in two ways: polling and interrupting. Because polling wastes CPU cycles, we should periodically read as much data as we need. On the other hand, by installing an interrupt handler in the device driver, the device can interrupt the CPU and receive the interrupt service on time (Kaiwan N Billimoria, 2022). When using WIRINGPI, the application program can set the interrupt service function by calling the wiringPiISR function. We revoke the device driver service routines through the file system in the C library (Maurice J. Bach, 1986).
3. System Processes
The system initializer creates the IoT Edge Manager process when we power the system on. The IoT Edge Manager establishes an Internet connection with the IoT Hub and periodically sends Heartbeat messages. Then, the IoT edge manager creates the streaming process, which initializes local storage to store sensor data and the ML to update its parameters in real-time. It continues to create the sensor/actuator manager process. It then establishes an IPC between the streaming and sensor/actuator manager processes to allow good communication. The sensor/actuator manager process creates a sensor or an actuator process specified in a configuration file, which has information about the type of sensor or actuator attached to the GPIO pins. Figure 11 shows the process of initializing the system and creating application processes. Figures 12 and 13 show the execution steps of the actuator process and sensor process.
The system administrator enters the information about sensors and actuators connected to the GPIO pins in text format into the configuration file. The sensor/activator manager process reads the file and creates the corresponding sensor and actuator processes. The sensor process periodically sends the sensor values to the streaming process to store them in the local storage and the I oT edge process to store them in the cloud. We can write the sensor's polling cycle in the configuration file or dynamically modify it through the configuration manager. The actuator process receives commands from ML or the cloud through IPC and drives the corresponding actuator.
4. Operation Management System
The purpose of the smart greenhouse is to automate all operations without user intervention after installation. It always sets all sensor values between the maximum and minimum values, and when they are out of range, we record the event in the system log file. Log messages are reported to the cloud to record them permanently. The local ML operates the actuators to adjust the sensor values. When the local ML fails to restore the sensor value within a given time, the cloud delivers the parameter values of reinforcement learning to modify the local ML to adapt to the current situation. One cloud system can manage hundreds of smart greenhouses at the same time. The system administrator can use the web pages provided by the cloud to monitor the status of the smart greenhouse in real-time. He will receive an alarm message through various media when an event occurs. In addition, The system administrator can manually manipulate all actuators and modify system parameters. The system can be powered down if necessary.
Where there is no communication facility, the IoT edge manager will act as the regional manager. Using a web page or a command window, the IoT edge manager shows several recent data in the system to the user and serves as a logger or an alarm generator. We store data on a FIFO basis and delete old data automatically.
The primary energy source of a smart greenhouse is power lines. Suppose there is a power outage and the power line does not deliver electrical energy. It switches the energy source to a secondary one, such as a solar cell or UPS. When using a UPS, the controller turns off the power of the monitor, motor, communication chip, Etc., and increases the polling period of the sensor to minimize the amount of power used by the system. The low-power ARM microprocessor installed in the RPI uses 2 watts for the multi-core CPU processor, 2 watts for the GPU, and 0.5 watts for the MMU, and peripheral SoC devices can operate with a total of 4.5 watts. A UPS with an output of 12V, battery capacity of 2.9AH, and wattage capacity of 300W can operate for about 8 hours without external power. We can also connect one or more identical units to operate multiple units as one smart greenhouse, increasing the yield according to the number of families. Since Mongolian nomads live on the move, smart greenhouses for Mongolian homes should be easy to install and dismantle.
Conclusions
Mongolia has an arid climate with an average annual precipitation of 350 mm and is the least densely populated country. Therefore, an imbalance of food ingredients may occur. In particular, it is not easy to supply vegetables. Because the temperature difference between night and day, summer and winter, is severe, it is not easy to grow vegetables due to the dry climate. The low population density makes it difficult to establish a distribution system for fresh vegetables. Cardiovascular disease is the number one cause of death among Mongolians, and the low life expectancy is closely related to diet. Mongolians consume about one-fifth of the average value of vegetable consumption in developed countries.
This paper proposes a design for a sustainable home-smart greenhouse in Mongolia. The smart greenhouse design considered Mongolia's environmental characteristics and unique requirements. We design it to operate, manage and maintain very efficiently using the latest I CT technology. Considering the average Mongolian nomad's financial ability, we set electronic device prices to less than 500 dollars. It allows nomadic households to consume enough vegetables throughout the year.
Recently, IoT engineers actively researched smart greenhouses using ICT technology. Regarding these research results, we proposed a hydroponic greenhouse to suit the Mongolian environment. Since the sub-zero weather continues for more than six months, the greenhouse has a double structure. A power generation system is essential for nomads, and we designed it to save as much power as possible in an emergency. Connect the UPS to allow 8 hours of operation without external power.
We use data collected nationwide for system improvement through extensive data analysis using machine learning. We use a wireless sensor network for data collection. The collected data is encapsulated and transmitted, and the computational burden is offloaded to the cloud to save power for computation.
We modularized the greenhouse in its basic form, and by connecting the modules vertically or horizontally, it was possible to expand it by 2, 4, or 6 times depending on the number of families. In addition, considering the mobility of nomads, installation and disassembly is easy. We developed it on the assumption that plants can be multi-cropped by hydroponics. For example, Isabel, European-style lettuce, takes 38 days to transplant, so it is possible to multiply about 10 in a year.
The software used to operate the sensors and actuators can be implemented using proven open sources. The base platform is a Raspberry Pi with an ARM microprocessor. Raspberry Pi connects to the server cloud through the Internet. We divided the system into the IoT edge managers of smart greenhouses and the monitoring system of the central cloud system. One cloud system can manage hundreds of smart greenhouses. If the connection to the server is lost, a local machine learning (ML) function is included in the IoT edge manager to enable minimal management.
The Mongolian government plans to achieve 100% vegetable self-sufficiency by 2025. In addition, the food market has recently been growing by 20% annually through the agricultural promotion policy. This design will help lead the Mongolian government's active efforts successfully.
Acknowledgements
This paper started from field research on missionary classes provided by Onnuri Professional Mission School. We want to thank Pastor Sung-Dong Kim, who served as a missionary in Mongolia and gave advice on this paper.