Design of a Novel Remote Monitoring System for Smart Greenhouses Using the Internet of Things and Deep Convolutional Neural Networks
Abstract
:1. Introduction
- control different environmental parameters inside the greenhouse,
- ensure remote sensing and easy analysis of the collected data in real time,
- ensure early detection and classification of tomato diseases in plants,
- receive notifications about the state of the greenhouse.
- design of a low-cost monitoring prototype,
- development of a webpage for monitoring parameters inside the greenhouse,
- development of deep neural networks for diseases detection and classification,
- development of an Android application for notifications about anomalies.
2. Materials and Methods
2.1. Monitoring and Displaying Greenhouse Parameters
- ✓
- Step #1: Initialization, defining, loading reference parameters (CO2ref, Taref, SMref, RHref, WLref, and LIref) based on thr experimental thresholds.
- ✓
- Step #2: Measurements of the actual parameters (Ta, RH, SM, WL, CO2 and LI).
- ✓
- Step #3: Comparison of the parameters (measured versus references) for each sensor (e.g., if the measured Ta is outside of the Taref interval, the controller sends a signal to activate the corresponding relay and start the fan to refresh the environment inside the greenhouse).
- ✓
- Step #4: Sending a signal to the actuators by activating the corresponding relays:
- -
- water pump: start filling the tank;
- -
- valve: start watering and irrigation of the plants;
- -
- servomotor: open windows for fresh air;
- -
- fan: turn on air ventilation;
- -
- LED: turn on the light.
2.2. IoT and Webpage Development
2.3. Mobile Application and Notification
2.4. Database and Deep Learning CNNs for Diseases Classification
- Step 1: Train the DCNN model
- Step 2: Call the model on Raspberry with tf.lite.Interpreter()
- Step 3: Program the ESP32 camera to save images every time we access its IP address
- Step 4: Resize and change the type of the image to fit our model
- Step 5: Predict this image with the model and get the result
- Step 6: Use the Pyrebase library to make connections with the database
- Step 7: Save the result to the Firebase database
- Step 8: Read with NodeMCU and send an SMS if there is a problem
2.5. Standalone Photovoltaic Power System
3. Results and Discussion
3.1. Photovoltaic Power Supply System
3.2. Smart Greenhouse Prototype
3.3. Monitoring and Data Visualization
3.4. Warning SMS and Mobile Application
3.4.1. Warning SMS
3.4.2. Mobile Application (Android)
3.5. Plant Diseases Classification
- Number of layers: ten layers (one AveragePooling2D layer, two ConvD2 layers, two MaxPool2D layer, one Flatten layer, one Dropout layer, and three Dense layers)
- Epoch = 20
- Optimizer = Adam
- Activation function = ReLU and SoftMax
- Loss = SparseCategoricalCrossent
- Model_DCNN = keras.Sequential([
- keras.layers.AveragePooling2D(12,(4,3),
- input_shape=(227,227,3)),
- keras.layers.Conv2D(128, (3,3), activation=‘relu’),
- keras.layers.MaxPool2D(2,2),
- keras.layers.Conv2D(64, (1,1), activation=‘relu’),
- keras.layers.MaxPool2D(2,2),
- keras.layers.Dropout(0.4, input_shape=(2,)),
- keras.layers.Flatten(),
- keras.layers.Dense(128, activation=‘relu’),
- keras.layers.Dense(64, activation=‘relu’),
- keras.layers.Dense(32, activation=‘softmax’)
- ])
- Model_DCNN.compile(optimizer=‘adam’,loss=keras.losses.SparseCategoricalCrossentropy(),metrics=[‘accuracy’])
- history=Model_DCNN.fit(train_ds, epochs=20, batch_size=32)
4. Conclusions and Outlook
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
CO2 | Carbon dioxide |
CO2ref | Reference carbon dioxide |
DC | Direct current |
DCNN | Deep convolutional neural networks |
DL | Deep learning |
GSM | Global System for Mobile Communications |
HTML | HyperText Markup Language |
IoT | Internet of things |
Ipv | Photovoltaic current |
LED | Light-emitting diode |
LCD | Liquid Crystal display |
LI | Light intensity |
LIref | Reference light intensity |
NodeMCU | Node MicroController Unit |
PV | Photovoltaic |
RH | Relative humidity |
RHref | Reference relative humidity |
SAPV | Standalone PV System |
SM | Soil moisture |
SMref | Reference soil moisture |
SMS | Short Message Service |
Ta | Air temperature |
Taref | Reference air temperature |
TVOC | Total volatile organic compounds |
Vpv | Photovoltaic voltage |
WL | Water level |
WLref | Reference water level |
Appendix A
- Calibration of the CO2 and air quality sensors (CCS811):
- Calibration of the air temperature and humidity sensor (DHT11):
- Calibration of the light sensor (BH1750):
- Calibration of the current sensor ACS 7120 (30 A)
- Calibration of the voltage sensor
- Calibration of Ultrasonic (HC04)
Appendix B
Item | Reference/Specification | Accuracy/Resolution | Price (USD) |
---|---|---|---|
Microcontrollers | Arduino Mega 2560 | Accuracy of ± 2 LSB The maximum error is 2 bits (4 decimal) in 10 bits (1024 decimal). The worst-case accuracy of the converter is 4/1024, or 1 part in 256 i.e., 0.25%. | 14 |
Processor | Raspberry 4 pi 2 Go | Resolution up to 1080p at the 60 Hz refresh rate. | 70 |
LED | 12 V | - | 3 |
GSM module | A6 | Sensitivity < −105 | 5 |
Wi-Fi module | NodeMCU ESP8266 | 14-bit resolution. The minimum resolution could reach as much as 44 ns. External clock accuracy between 15 and +15 ppm | 2.5 |
Relative humidity and air temperature sensor | (DHT11) | ± 5% RH, ± 0.5 °C accuracy | 1.5 |
Position sensor | Ultrasonic HC04 | Absolute accuracies of 1–3% in the operating range from −25 °C to +70 °C. | 0.75 |
Relay | 5 V | - | 10 |
Light sensor | BH1750 | Accuracy: ± 20%. This sensor can accurately measure the lx value of light up to 65,535 lx. | 0.95 |
CO2 sensor | CCS811 | 2% tolerance due to accuracy of the internal clock in Mode timings | 4 |
Valve | 12 V | - | 2.5 |
Water pump | 12 V | High accuracy | 8 |
Fan | 12 V | - | 3 |
Servomotor | MG960R | Servos operate accurately at speeds up to 5000 rpm or more. Its stopping accuracy is within ± 0.05 degrees (with no load). | 5 |
Voltage sensor | 25 V | Resolution of 0.00489 V | 1.5 |
Current sensor | ACS 7120 (30 A) | Accuracy < 2% | 2 |
LCD | 4 × 16 | - | 2.5 |
Screen | 1.3 inch | - | 3 |
Capacitive soil moisture | V 1.22 | 2–3% of the actual soil moisture | 3 |
References
- Wang, T.; Wu, G.; Chen, J.; Cui, P.; Chen, Z.; Yan, Y.; Zhang, Y.; Li, M.; Niu, D.; Li, B.; et al. Integration of solar technology to modern greenhouse in China: Current status, challenges and prospect. Renew. Sustain. Energy Rev. 2017, 70, 1178–1188. [Google Scholar] [CrossRef]
- 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]
- Gorjian, S.; Ebadi, H.; Najafi, G.; Chandel, S.S.; Yildizhan, H. Recent advances in net-zero energy greenhouses and adapted thermal energy storage systems. Sustain. Energy Technol. Assess. 2021, 43, 100940. [Google Scholar] [CrossRef]
- Azaza, M.; Tanougast, C.; Fabrizio, E.; Mami, A. Smart greenhouse fuzzy logic based control system enhanced with wireless data monitoring. ISA Trans. 2016, 61, 297–307. [Google Scholar] [CrossRef] [PubMed]
- Oliveira, J.; Boaventura-Cunha, J.; Oliveira, P.M. Automation and Control in Greenhouses: State-of-the-Art and Future Trends. In Lecture Notes in Electrical Engineering; Springer Science and Business Media LLC: Berlin, Germany, 2017; Volume 402, pp. 597–606. [Google Scholar]
- Leithardt, V.; Santos, D.; Silva, L.; Viel, F.; Zeferino, C.; Silva, J. A Solution for Dynamic Management of User Profiles in IoT Environments. IEEE Lat. Am. Trans. 2020, 18, 1193–1199. [Google Scholar] [CrossRef]
- Nawandar, N.K.; Satpute, V.R. IoT based low cost and intelligent module for smart irrigation system. Comput. Electron. Agric. 2019, 162, 979–990. [Google Scholar] [CrossRef]
- Martins, J.A.; Ochôa, I.S.; Silva, L.A.; Mendes, A.S.; González, G.V.; Santana, J.D.P.; Leithardt, V.R.Q. PRIPRO: A Comparison of Classification Algorithms for Managing Receiving Notifications in Smart Environments. Appl. Sci. 2020, 10, 502. [Google Scholar] [CrossRef] [Green Version]
- Castañeda-Miranda, A.; Castaño-Meneses, V.M. Internet of things for smart farming and frost intelligent control in greenhouses. Comput. Electron. Agric. 2020, 176, 105614. [Google Scholar] [CrossRef]
- Kumar, A.; Singh, V.; Kumar, S.; Jaiswal, S.P.; Bhadoria, V.S. IoT enabled system to monitor and control greenhouse. Mater. Today 2020, in press. [Google Scholar] [CrossRef]
- Chiu, Y.-C.; Yang, P.-Y.; Grift, T.E. A wireless communication system for automated greenhouse operations. Eng. Agric. Environ. Food 2014, 7, 78–85. [Google Scholar] [CrossRef]
- Liao, M.-S.; Chen, S.-F.; Chou, C.-Y.; Chen, H.-Y.; Yeh, S.-H.; Chang, Y.-C.; Jiang, J.-A. On precisely relating the growth of Phalaenopsis leaves to greenhouse environmental factors by using an IoT-based monitoring system. Comput. Electron. Agric. 2017, 136, 125–139. [Google Scholar] [CrossRef]
- 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]
- Ratnaparkhi, S.; Khan, S.; Arya, C.; Khapre, S.; Singh, P.; Diwakar, M.; Shankar, A. Smart agriculture sensors in IOT: A review. Mater. Today 2020, in press. [Google Scholar] [CrossRef]
- Benzaouia, M.; Hajji, B.; Rabhi, A.; Mellit, A.; Benslimane, A.; Dubois, A.M. Energy Management Strategy for an Optimum Control of a Standalone Photovoltaic-Batteries Water Pumping System for Agriculture Applications. In International Conference on Electronic Engineering and Renewable Energy; Springer: Singapore, 2020; pp. 855–868. [Google Scholar] [CrossRef]
- Aschilean, I.; Rasoi, G.; Raboaca, M.S.; Filote, C.; Culcer, M. Design and Concept of an Energy System Based on Renewable Sources for Greenhouse Sustainable Agriculture. Energies 2018, 11, 1201. [Google Scholar] [CrossRef] [Green Version]
- Huang, K.; Shu, L.; Li, K.; Yang, F.; Han, G.; Wang, X.; Pearson, S. Photovoltaic Agricultural Internet of Things Towards Realizing the Next Generation of Smart Farming. IEEE Access 2020, 8, 76300–76312. [Google Scholar] [CrossRef]
- Mishra, M.; Choudhury, P.; Pati, B. Modified ride-NN optimizer for the IoT based plant disease detection. J. Ambient. Intell. Humaniz. Comput. 2021, 12, 691–703. [Google Scholar] [CrossRef]
- Kim, S.; Lee, M.; Shin, C. IoT-Based Strawberry Disease Prediction System for Smart Farming. Sensors 2018, 18, 4051. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Pavel, M.I.; Kamruzzaman, S.M.; Hasan, S.S.; Sabuj, S.R. An IoT Based Plant Health Monitoring System Implementing Image Processing. In Proceedings of the 2019 IEEE 4th International Conference on Computer and Communication Systems (ICCCS); Institute of Electrical and Electronics Engineers (IEEE), Piscataway, NJ, USA, 25 February 2019; pp. 299–303. [Google Scholar]
- Khattab, A.; Habib, S.E.; Ismail, H.; Zayan, S.; Fahmy, Y.; Khairy, M.M. An IoT-based cognitive monitoring system for early plant disease forecast. Comput. Electron. Agric. 2019, 166, 105028. [Google Scholar] [CrossRef]
- Verma, S.; Chug, A.; Singh, A. Prediction Models for Identification and Diagnosis of Tomato Plant Diseases. In Proceedings of the 2018 International Conference on Advances in Computing, Communications and Informatics (ICACCI); Institute of Electrical and Electronics Engineers (IEEE), Piscataway, NJ, USA, 16 April 2018; pp. 1557–1563. [Google Scholar]
- Diyan, M.; Khan, M.; Silva, B.N.; Han, K. Scheduling Sensor Duty Cycling Based on Event Detection Using Bi-Directional Long Short-Term Memory and Reinforcement Learning. Sensors 2020, 20, 5498. [Google Scholar] [CrossRef] [PubMed]
- DatabaseTomate. Available online: https://data.mendeley.com/datasets/ngdgg79rzb/1 (accessed on 27 May 2021).
- Rouibah, N.; Barazane, L.; Benghanem, M.; Mellit, A. IoT-based low-cost prototype for online monitoring of maximum output power of domestic photovoltaic systems. ETRI J. 2021, 43, 459–470. [Google Scholar] [CrossRef]
- Mellit, A.; Hamied, A.; Lughi, V.; Pavan, A.M. A Low-Cost Monitoring and Fault Detection System for Stand-Alone Photovoltaic Systems Using IoT Technique. In ELECTRIMACS 2019, Proceedings of the 13th International Conference of the IMACS TC1 Committee, Salerno, Italy, 21–23 May 2019; Springer: Berlin, Germany, 2019; Volume 604, pp. 349–358. [Google Scholar]
- Engineersgarage. Available online: https://www.engineersgarage.com/acs712-current-sensor-with-arduino/ (accessed on 20 April 2021).
- John Errington’s Experiments with an Arduino. Available online: http://www.skillbank.co.uk/arduino/calibrate.htm (accessed on 1 June 2020).
- Arduino UNO: Complete Ultrasonic Sensor Guide (HC-SR04). Available online: https://www.instructables.com/Arduino-UNO-Complete-Ultrasonic-Sensor-Guide-HC-SR/ (accessed on 13 August 2021).
Category of Disease | Precision (%) | Recall (%) | F1 Score (%) | Accuracy (%) |
---|---|---|---|---|
Bacterial spot | 87 | 85 | 86.88 | 88 |
Black leaf mold | 85 | 87 | 83.35 | |
Gray leaf spot | 82 | 85 | 83.51 | |
Healthy | 90 | 89 | 92.73 | |
Late blight | 83 | 86 | 84.47 | |
Powdery mildew | 82 | 85 | 83.51 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mellit, A.; Benghanem, M.; Herrak, O.; Messalaoui, A. Design of a Novel Remote Monitoring System for Smart Greenhouses Using the Internet of Things and Deep Convolutional Neural Networks. Energies 2021, 14, 5045. https://doi.org/10.3390/en14165045
Mellit A, Benghanem M, Herrak O, Messalaoui A. Design of a Novel Remote Monitoring System for Smart Greenhouses Using the Internet of Things and Deep Convolutional Neural Networks. Energies. 2021; 14(16):5045. https://doi.org/10.3390/en14165045
Chicago/Turabian StyleMellit, Adel, Mohamed Benghanem, Omar Herrak, and Abdelaziz Messalaoui. 2021. "Design of a Novel Remote Monitoring System for Smart Greenhouses Using the Internet of Things and Deep Convolutional Neural Networks" Energies 14, no. 16: 5045. https://doi.org/10.3390/en14165045
APA StyleMellit, A., Benghanem, M., Herrak, O., & Messalaoui, A. (2021). Design of a Novel Remote Monitoring System for Smart Greenhouses Using the Internet of Things and Deep Convolutional Neural Networks. Energies, 14(16), 5045. https://doi.org/10.3390/en14165045