You are currently viewing a new version of our website. To view the old version click .
Future Internet
  • Article
  • Open Access

31 May 2024

GreenLab, an IoT-Based Small-Scale Smart Greenhouse

,
,
,
and
Department of Computers and Information Technology, Politehnica University Timisoara, 300006 Timisoara, Romania
*
Author to whom correspondence should be addressed.
This article belongs to the Special Issue Industrial Internet of Things (IIoT): Trends and Technologies

Abstract

In an era of connectivity, the Internet of Things introduces smart solutions for smart and sustainable agriculture, bringing alternatives to overcome the food crisis. Among these solutions, smart greenhouses support crop and vegetable agriculture regardless of season and cultivated area by carefully controlling and managing parameters like temperature, air and soil humidity, and light. Smart technologies have proven to be successful tools for increasing agricultural production at both the macro and micro levels, which is an important step in streamlining small-scale agriculture. This paper presents an experimental Internet of Things-based small-scale greenhouse prototype as a proof of concept for the benefits of merging smart sensing, connectivity, IoT, and mobile-based applications, for growing cultures. Our proposed solution is cost-friendly and includes a photovoltaic panel and a buffer battery for reducing energy consumption costs, while also assuring functionality during night and cloudy weather and a mobile application for easy data visualization and monitoring of the greenhouse.

1. Introduction

With the development of the Internet of Things (IoT), new emerging technologies become more accessible to developers providing, among others, solutions for smart and sustainable agriculture and bringing alternatives to global problems such as the food crisis. With the help of IoT, smart technologies and data analysis can be used to face challenges like climate change, poor soil, and lack of labor [1].
Water, energy, and food are resources that are inevitably connected. Climate often plays a decisive role in food production as well. A major impact on one resource implies major imbalances in the other two. Taking into account the fact that, for the normal development of the human body, an almost daily intake of fresh fruits and vegetables is necessary and taking into account the irregularity or blockage of imports, the problem of the lack of fresh fruits/vegetables, the problem of import substitution remains a pressing problem in many countries.
One solution, which is already successfully applied, is the creation of greenhouses and mini/micro greenhouses, which allow the cultivation of vegetables and fruits and thus eliminate expensive imports. Smart greenhouses allow farmers to grow desired crops with minimal human interference. Climatic conditions such as temperature, air humidity, brightness, and soil moisture are continuously monitored inside a mini-house with the help of a sensor system. Variations in indoor environment conditions automatically lead to their correction using heating/cooling, irrigation/drying, and lighting systems to maintain optimal conditions for plant growth.
The development of interconnected intelligent systems can generate opportunities to effectively address the challenges of food shortages and fluctuating supply chains.
Current research shows how IoT technologies are explored and used in smart greenhouses [1]. The most notable research trends consist of network architectures [2,3], advanced controlling techniques [4,5], energy efficiency [6], interoperability [7], advanced techniques for data acquisition [8] and security challenges [9]. In [8], the most notable technologies with the greatest potential were identified to include cloud, fog and edge computing, embedded systems, communications protocols like LoRa, ZigBee, GPRS, and different interfaces like API, H2M, and M2M. All of these are parts of modern IoT architecture.
Besides the advantages, the IoT-based solutions are still facing several challenges regarding the need of to standardize IoT infrastructure in the agricultural sector, technological challenges regarding connectivity in developing countries, and the need to align corporate farming practices with global patterns [8].
This paper presents an experimental Internet of Things-based small-scale greenhouse prototype as a proof of concept for the benefits of merging smart sensing, connectivity, IoT, and mobile-based applications, for growing cultures. Our proposed solution includes a photovoltaic panel and a buffer battery for reducing energy consumption costs, while also assuring functionality during night and cloudy weather, and a mobile application for easy data visualization and monitoring of the greenhouse.
This paper is structured in five sections. The first section, called the Introduction, describes the field of research and places our solution in the broad context of IoT-based greenhouses, continuing with the second section, Related Work, which describes the state of the art in this field. The proposed solution is described in the third section, called the GreenLab Project. Data readings are presented and discussed in the Results section. The paper ends by summarizing the main conclusions in a dedicated section.
The main contributions presented in this paper are as follows:
  • Design and implementation of smart IoT-based solution for a small-scale smart greenhouse;
  • Design, integration, and usage of a hybrid powering system consisting of a solar panel and a buffer battery;
  • Design and implementation of the software for different layers of the IoT architecture;
  • Design of an accessible usage and maintenance protocol;
  • Data gathering and analysis regarding the functionality of our proposed solution.

3. GreenLab Project

A solution for smart farming in the form of a mini smart greenhouse that continuously monitors factors such as temperature, air humidity, brightness, and soil moisture is proposed next. In order to reduce energy consumption costs, a photovoltaic panel and a buffer battery are incorporated into the system, coupled with a mobile application to facilitate easy data visualization and monitoring of the greenhouse.
This research follows the waterfall model of the system development life cycle as a research methodology. The required steps are the requirements, system design, implementation, testing, and maintenance.

3.1. Requirements

This research focused on developing a proof-of-concept for an IoT-based small-scale smart greenhouse, relatively easy to implement and easy to use by non-technical personnel. In this process, we have identified and established the following requirements:
  • The greenhouse should be small-scale, no larger than 40 × 40 × 40 cm;
  • The processor used and the development board should be low-cost, accessible, easy to program, and well documented;
  • The solution should include sensors for temperature, humidity, light, and actuators for irrigation, air heating, and cooling;
  • The system should be powered from an accessible green source (i.e., to use solar energy);
  • The solution should provide connectivity to the Internet;
  • The solution should contain an easy-to-use mobile application for monitoring the greenhouse environment’s relevant parameters.

3.2. System Design

As a solution, we propose an IoT-based small-scale smart greenhouse called GreenLab, powered by a photovoltaic panel and a mobile application for monitoring the environmental parameters. The solution respects the IoT layered architecture approach and includes layers for perception, communication, and the application. Figure 1 presents the block diagram of the perception layer of GreenLab. The diagram consists of the Arduino MEGA 2560 R3 development board with an ATmega2560 microcontroller, an 8-channel relay module, an ultrasonic distance sensor to measure the water level in the container, a capacitive soil moisture sensor, a gas sensor, a light sensor, an air temperature and humidity sensor, an Ethernet module connected to a phpMyAdmin database, a solar panel, a battery (with its charger), a submersible water pump, an auto heater, two fans, LED matrices and the greenhouse itself.
Figure 1. Block diagram of the perception layer of GreenLab.
GreenLab is powered mainly by the energy obtained from the solar panel. Taking into account the cloudy days or that there is a day–night cycle, a buffer battery has been connected to provide the energy to supply all the components of the mini-greenhouse which is charged mainly from the solar panel. Secondary/alternatively, a charger is connected to the main battery, only in case of need. The functional block diagram with the supply of the component blocks from the renewable energy source (solar panel) and alternatively from the network is presented in Figure 2.
Figure 2. Block diagram with the supply components from the battery (battery charger) and the solar panel.

3.2.1. Hardware Design

The GreenLab hardware system consists of a power supply solution, a communication module, and a control system containing three main blocks: the irrigation block, the lighting control block, and the ventilation and heating control block.
In Figure 3, there is the wiring diagram of the control system.
Figure 3. The wiring diagram of GreenLab.
Figure 4 presents the block diagram of irrigation control. It consists of the Arduino MEGA 2560 R3 (ATmega2560 microcontroller) board, the ultrasonic distance sensor to measure the water level in the container, the capacitive soil moisture sensor, and the 8-channel relay module which controls the water pump used to water the soil.
Figure 4. Irrigation block diagram.
Figure 5 presents the block diagram of lighting control. It consists of the Arduino MEGA 2560 R3 (ATmega2560 microcontroller) board, the light sensor to detect whether there is day or night, the 8-channel relay module which controls the LED matrices used to illuminate the greenhouse.
Figure 5. Lighting control block diagram.
Figure 6 presents the block diagram of the ventilation and heating system composed of the MEGA 2560 R3 development board, the block of the relay, the air temperature and humidity sensor the auto heather, and two fans mounted on the same level, thus one introduces air in the greenhouse and the other evacuates it.
Figure 6. Ventilation and heating block diagram.

3.2.2. Software Design

Following the same IoT layered architecture approach for the software design, we have chosen three layers, containing the perception layer, the network layer, and the application layer [21]. A schematic of the proposed architecture is presented in Figure 7.
Figure 7. Software layered architecture.
The perception layer which is responsible for the system–environment interaction provides functionalities such as data acquisition from the sensors and control modules for the actuators as it can be seen in Figure 8. The main environment parameters to be controlled are the temperature, the ambient light, and the soil moisture, which are monitored through sensors, and their level is adjusted through actuators like fans, LEDs, and water pumps.
Figure 8. Perception layer workflow.
Next, we will present the flowchart for each main control system module based on the sensors’ readings. For the irrigation module, the flowchart is depicted in Figure 9. When the soil moisture sensor detects that the soil has reached the dryness threshold, the board closes the relay that controls the submersible pump. It draws water from the container and through a pipe and moistens the soil. This operation is interrupted by opening the assigned relay in the relay block in one of the following situations:
Figure 9. Irrigation flow chart.
  • The soil moisture detection sensor tells the development board that the soil is sufficiently moist;
  • A preset number (5) of seconds has elapsed since the relay closed;
  • The ultrasonic distance sensor tells the plate that there is no more water in the container (the distance from the sensor to the float in the vessel is more than 10 cm and the water level is below the suction mouth of the pump).
For the lighting module, the flowchart is depicted in Figure 10. The light sensor detects the difference between day and night (the absence of light) and communicates the status to the microcontroller which turns on or off the LED matrices according to the day/night functioning mode.
Figure 10. Lighting flow chart.
For the ventilation and heating module, the flowchart is depicted in Figure 11 and Figure 12. The control of the fans is carried out by turning on or off the relays in the following situations:
Figure 11. Ventilation flow chart.
Figure 12. Heating flow chart.
  • The gas sensor detects an amount of gas above a defined threshold;
  • The temperature sensor detects a temperature above/below a defined threshold.
The network layer provides the communication between the perception and the application layers.
The application layer offers the possibility to visualize and monitor the data acquired by the perception layer. A mobile application is responsible for visualizing the evolution of each parameter, by using 24 h or 7-day data records and for direct control of the actuators, by providing a manual command mode of operation for the system. As basic security measures, authentication and authorization roles were defined and implemented. In Figure 13, there is a caption of the graphical user interface for the manual commands for an authenticated user with control rights.
Figure 13. Graphical User Interface of the mobile application.

3.3. Implementation

3.3.1. Hardware

Following the schematics and the requirements from the previous sections, we have implemented a prototype of the greenhouse with the following dimensions 40 × 30 × 22 cm, to which we have added all the components from the schematics in Figure 3, reaching a total cost under USD 200. The main hardware components used by this solution are as follows:
  • An Arduino MEGA 2560 R3 development board with an ATmega2560 microcontroller;
  • An Ethernet module (Shield Ethernet W5100);
  • A power module consisting of a solar panel OF 156 × 39 MM, with 12 solar cells and a maximum power of 34 W and an HB130802 battery charger linked to an Ultracell 12 V battery;
  • A Solar Charge Controller that is linked to the Arduino Board, to the Ultracell Battery, and the solar panel;
  • A HL-58S 8-channel 12 V optical isolated relay module connected directly to the board;
  • An ultrasonic distance sensor (HC-SR04);
  • A capacitive soil moisture sensor (DFROBOT Capacitive Soil Moisture Sensor;
  • A gas sensor (MQ-135);
  • A light sensor (YQZBML_Mod-lights);
  • An air temperature and humidity sensor (DHT11);
  • A submersible water pump;
  • An auto heater (Auto Heater Fan, 12 V/150 W );
  • Two fans (DL08025SE 12M);
  • LED matrices.
Each component, its cost, and its functionality are described in Table 2, Table 3, Table 4 and Table 5. Pictures of the obtained prototype can be seen in Figure 14 and Figure 15.
Table 2. Power harvesting and storage components.
Table 3. Processing and communications components.
Table 4. Sensors.
Table 5. Actuators.
Figure 14. GreenLab—prototype.
Figure 15. GreenLab—heather, fans and sensors.

3.3.2. Software

Each software component was implemented following the software design described in the previous sections:
  • The perception layer functionalities were implemented on the embedded platform as C functions through the Platform IO framework.
  • The network layer implements the connection between the mobile application and the database where sensor data records are stored. It was implemented using the Axios library for CRUD (Create-Read-Update-Delete) operations over the HTTP communication protocol.
  • The application layer consists of a mobile application written in React Native (Expo), in Typescript. The front-end of the mobile application was developed using the Expo platform, Javascript, and JSX (a JavaScript extension developed over React Native) and the back-end used XAMPP, PHP, and MySQL for the connection to a PhpMyAdmin database.
A more detailed schematic can be seen in Figure 16.
Figure 16. GreenLab—modular software architecture.

3.4. Testing of the Setup

The system was tested and validated in laboratory conditions. The tests concentrated on the monitoring and control process for the main environment parameters described in the previous sections. During the system validation, data were gathered from all the sensors for several weeks. The following figures (Figure 17, Figure 18, Figure 19, Figure 20, Figure 21 and Figure 22) represent samples of data obtained regarding each parameter monitoring.
Figure 17. GreenLab—air temperature evolution.
Figure 18. GreenLab—air humidity evolution.
Figure 19. GreenLab—light evolution.
Figure 20. GreenLab—gas concentration evolution.
Figure 21. GreenLab—water level evolution.
Figure 22. GreenLab—soil moisture evolution.
Figure 17 presents the evolution of the air temperature during 24 h and 7 days, respectively. The plots are a direct capture of the mobile application display. In a similar manner, Figure 18, Figure 19, Figure 20, Figure 21 and Figure 22 present the evolution of the other parameters.
At the system level, several plants were monitored during growth for three weeks (see Figure 23).
Figure 23. GreenLab—growing plants.

3.5. Maintenance

For verification and maintenance, a protocol was defined and proposed. Its objective is to ensure the proper functioning and longevity of the equipment and systems through regular verification and maintenance activities. This protocol applies to all equipment and systems within the mini greenhouse that require periodic verification and maintenance. Procedures:
1.
Planning:
(a)
Identify equipment and systems requiring verification and maintenance.
(b)
Establish a schedule for conducting verifications and maintenance tasks.
2.
Preventive verification:
(a)
Conduct visual inspections of equipment to detect signs of damage.
(b)
Test the functionality of systems to ensure they work correctly.
3.
Diagnosis and defect identification:
(a)
Record any issues or defects identified during preventive verification.
(b)
Diagnose the root causes of problems and determine the solutions.
4.
Implementation of maintenance measures:
(a)
Perform repairs or replacement work as needed.
(b)
Test equipment or systems after maintenance to verify proper functioning.

4. Conclusions

GreenLab project is a proof of concept for an IoT-based small-scale smart greenhouse. Its architecture respects the multi-level IoT architecture.
By using different IoT technologies, we have succeeded in implementing a modular, low-cost, simple-to-use and control greenhouse. By respecting the IoT layered approach, we have provided a modular and flexible solution from both hardware and software points of view.
We have also provided an accessible means for the environment parameters monitoring and control by developing an intuitive and easy to use mobile application, which gives the users access to real-time and historical data, graphical representations, and data analysis. Thus, the GreenLab project can be used as a proof of concept for IoT technologies and small agriculture in schools. Its intuitive interface makes it accessible to young pupils and non-technical personnel.

Author Contributions

Conceptualization, M.M. and R.B.; methodology, R.B.; software, C.V.; system implementation, C.V.; validation, R.B., C.V. and B.B.; formal analysis, C.S. and M.M.; investigation, C.V.; resources, R.B. and M.M.; data curation, R.B. and C.S.; writing—original draft preparation, C.V.; writing—review and editing, C.S.; visualization, B.B.; supervision, R.B. and M.M.; project administration, R.B. and C.V. All authors have read and agreed to the published version of the manuscript.

Funding

This paper was partially supported by a grant from the Ministry of Research, Innovation, and Digitization, CNCS/CCCDI—UEFISCDI, project number ERANET-CHIST-ERA-ECOMOME, within PNCDI III.

Data Availability Statement

The data presented in this study are available in this article.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
APIApplication Programming Interface
CRUDCreate-Read-Update-Delete
GPRSGeneral Pachet Radio Service
HTTPHypertext Transfer Protocol
H2MHuman to Machine
IoTInternet of Things
LEDLight Emitting Diode
LoRaLong Range
M2MMachine to Machine
SW-SVRSliding Window-based Support Vector Regression
WPTWireless Power Transmission

References

  1. Farooq, M.S.; Riaz, S.; Helou, M.A.; Khan, F.S.; Abid, A.; Alvi, A. Internet of Things in Greenhouse Agriculture: A Survey on Enabling Technologies, Applications, and Protocols. IEEE Access 2022, 10, 53374–53397. [Google Scholar] [CrossRef]
  2. Wang, X. Research and design of intelligent monitoring system for greenhouse based on Internet of Things. In Proceedings of the 2021 4th International Conference on Information Systems and Computer Aided Education, Dalian, China, 24–26 September 2021; pp. 2154–2157. [Google Scholar] [CrossRef]
  3. Muñoz, M.; Guzmán, J.L.; Sánchez-Molina, J.A.; Rodríguez, F.; Torres, M.; Berenguel, M. A New IoT-Based Platform for Greenhouse Crop Production. IEEE Internet Things J. 2022, 9, 6325–6334. [Google Scholar] [CrossRef]
  4. Subahi, A.F.; Bouazza, K.E. An Intelligent IoT-Based System Design for Controlling and Monitoring Greenhouse Temperature. IEEE Access 2020, 8, 125488–125500. [Google Scholar] [CrossRef]
  5. Farooq, M.S.; Javid, R.; Riaz, S.; Atal, Z. IoT Based Smart Greenhouse Framework and Control Strategies for Sustainable Agriculture. IEEE Access 2022, 10, 99394–99420. [Google Scholar] [CrossRef]
  6. Shamshiri, R.R.; Bojic, I.; van Henten, E.; Balasundram, S.K.; Dworak, V.; Sultan, M.; Weltzien, C. Model-based evaluation of greenhouse microclimate using IoT-Sensor data fusion for energy efficient crop production. J. Clean. Prod. 2020, 263, 121303. [Google Scholar] [CrossRef]
  7. Rayhana, R.; Xiao, G.; Liu, Z. Internet of Things Empowered Smart Greenhouse Farming. IEEE J. Radio Freq. Identif. 2020, 4, 195–211. [Google Scholar] [CrossRef]
  8. Maraveas, C.; Bartzanas, T. Application of Internet of Things (IoT) for Optimized Greenhouse Environments. AgriEngineering 2021, 3, 954–970. [Google Scholar] [CrossRef]
  9. Ferrag, M.A.; Shu, L.; Yang, X.; Derhab, A.; Maglaras, L. Security and Privacy for Green IoT-Based Agriculture: Review, Blockchain Solutions, and Challenges. IEEE Access 2020, 8, 32031–32053. [Google Scholar] [CrossRef]
  10. Umarov, A.; Belgibaev, B.; Grif, M.; Mansurova, M.; Kulmamirov, S. Smart greenhouse and plant growth control. Period. Eng. Nat. Sci. 2021, 9, 474–493. [Google Scholar] [CrossRef]
  11. Kaneda, Y.; Ibayashi, H.; Oishi, N.; Mineno, H. Greenhouse Environmental Control System Based on SW-SVR. Procedia Comput. Sci. 2015, 60, 860–869. [Google Scholar] [CrossRef]
  12. Ramadan, L.; Shahrour, I.; Mroueh, H.; Chehade, F.H. Use of Machine Learning Methods for Indoor Temperature Forecasting. Future Internet 2021, 13, 242. [Google Scholar] [CrossRef]
  13. Wang, L.; Xu, Y.; Xu, J. Realization of wireless charging in intelligent greenhouse with orthogonal coil system uniform magnetic field. Comput. Electron. Agric. 2020, 175, 105524. [Google Scholar] [CrossRef]
  14. Xu, J.; Dai, F.; Xu, Y.; Yao, C.; Li, C. Wireless power supply technology for uniform magnetic field of intelligent greenhouse sensors. Comput. Electron. Agric. 2019, 156, 203–208. [Google Scholar] [CrossRef]
  15. Putri, R.I.; Setiawan, H.; Irawan, B.; Yunus, Y.; Patma, T.S.; Pradani, E.R.K. Fuzzy Maximum Power Point Tracking (MPPT) controller for photovoltaic system on mini greenhouse. J. Phys. Conf. Ser. 2019, 1402, 033109. [Google Scholar] [CrossRef]
  16. Hoque, M.J.; Ahmed, M.R.; Hannan, S. An Automated Greenhouse Monitoring and Controlling System using Sensors and Solar Power. Eur. J. Eng. Technol. Res. 2020, 5, 510–515. [Google Scholar] [CrossRef]
  17. Saokaew, A.; Chieochan, O.; Boonchieng, E. A smart photovoltaic system with Internet of Thing: A case study of the smart agricultural greenhouse. In Proceedings of the 2018 10th International Conference on Knowledge and Smart Technology (KST), Chiang Mai, Thailand, 31 January–3 February 2018; pp. 225–230. [Google Scholar] [CrossRef]
  18. Castelló Ferrer, E.; Rye, J.; Brander, G.; Savas, T.; Chambers, D.; England, H.; Harper, C. Personal Food Computer: A New Device for Controlled-Environment Agriculture. In Proceedings of the Future Technologies Conference (FTC) 2018; Arai, K., Bhatia, R., Kapoor, S., Eds.; Springer: Cham, Switzerland, 2019; pp. 1077–1096. [Google Scholar]
  19. Sovilj, S.; Fonović, D.; Hager, M.; Kovaček, M. “Food Computer”—A Demo Platform for Internet of Things Education. In Proceedings of the 2022 45th Jubilee International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia, 23–27 May 2022; pp. 1454–1460. [Google Scholar] [CrossRef]
  20. Anderson, M. MIT’s food computer: The future of urban agriculture? [News]. IEEE Spectrum 2016, 53, 12–13. [Google Scholar] [CrossRef]
  21. Gavrilović, N.; Mishra, A. Software architecture of the internet of things (IoT) for smart city, healthcare and agriculture: Analysis and improvement directions. J. Ambient. Intell. Humaniz. Comput. 2021, 12, 1315–1336. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.