Implementation of a microcontroller-based neural network for prediction of pH and EC levels in hydroponics

Authors

  • Abdoulaye SIDIBE Department of Mechatronic Engineering, Pan African University Institute for Basic Sciences, Technology and Innovation, Nairobi, Kenya
  • Rehema Ndeda Department of Mechatronic Engineering, Jomo Kenyatta University of Agriculture and Technology, Nairobi, Kenya
  • Evan Murimi Department of Mechatronic Engineering, Jomo Kenyatta University of Agriculture and Technology
  • Urbanus N. Mutwiwa Department of Agriculture and Biosystems Engineering, Jomo Kenyatta University of Agriculture and Technology

Keywords:

EC, hydroponic, microcontroller, NARX, pH

Abstract

The production of crops using hydroponic methods are becoming popular due to their high yield and ability to overcome the challenges facing soil farming including soil degradation, limitation of water access, reduction of farmland and climate change. These systems rely on the quality of the nutrient solution which is directly made accessible at the plant roots. Farmers often lack the information to prevent nutrient deficiencies, until they are visible signs on plants, for example, the yellowing of leaves. Monitoring nutrient solution parameters is one way to prevent nutrient deficiencies before they affect plants negatively. However, obtaining relevant information involves complicated analytical test, whose equipment is not available at the farm level. This article presents the implementation of a neural network based in the Arduino Mega microcontroller to predict pH and EC in a Nutrient Film Technique (NFT) hydroponic system. These predictions of pH and EC levels based on environmental parameters that affect growing plants, such as greenhouse air temperature and humidity, enable farmers to take preventive actions to prevent nutrient deficiencies. Data collection was carried out in a NFT hydroponic system specially designed to reduce energy consumption. The Nonlinear AutoRegressive with eXogenous inputs (NARX) model was developed and trained using Levenberg-Marquardt on MATLAB. The linear regression R showing the relationship between inputs and outputs was 99%. The Mean Square Error (MSE) was 0.0026828 and there were no signs of over or under fitting. The developed neural network model was implemented in the Arduino controller and tested in the field to predict pH and EC values. The results showed that EC values were well predicted compared to pH values. However, the pH values predicted showed small deviations of 0.1 compared to the actual values measure by the sensor.

Downloads

Published

2023-08-30

How to Cite

SIDIBE, A., Ndeda, R., Murimi, E., & N. Mutwiwa, U. . (2023). Implementation of a microcontroller-based neural network for prediction of pH and EC levels in hydroponics. JOURNAL OF SUSTAINABLE RESEARCH IN ENGINEERING, 7(4), 106-117. Retrieved from https://jsre.jkuat.ac.ke/index.php/jsre/article/view/162