Intelligent agriculture system using low energy and based on the use of the internet of things

ABSTRACT


INTRODUCTION
The internet of things (IoT) [1]- [5] appeared in the speech of a British engineer (Kevin Ashton) in 1999 to designate a system where hardware is connected to the internet.The IoT is an ecosystem where devices, equipped with sensors and communication technologies, interact with each other and with the Internet to collect, transmit, and analyze data to provide practical and intelligent enhancements in various domains [6]- [12].The main goal of using IoT in agriculture [13]- [21] is to reduce the load on the human body, make decisions at the right time, increase agricultural production, cope with lack of information and secure agricultural fields from intrusion.To increase the quantity and quality of the harvest, IoT plays an important role by using various physical objects related to the internet [22].The term smart agriculture refers to precise agriculture using technologies such as sensing devices, remote sensing, drone monitoring of agricultural fields and many others [23].Nowadays, there is a huge shortage of water.Many places in our country are facing this problem.According to a survey, most crops could not grow well because of the water.To get out of this problem, smart irrigation contributes a huge role.Smart irrigation is carried out using various sensing materials.
The use of the IoT in rural agricultural settings faces several challenges.Firstly, limited connectivity in these areas makes it difficult to establish a reliable IoT network for real-time collection and transmission of agricultural data.Additionally, the high cost associated with implementing an IoT infrastructure, including sensors, communication devices, and robust internet connectivity, poses a barrier for financially constrained rural farmers.Furthermore, regular maintenance and ensuring the durability of IoT devices also present issues, given the limited access to maintenance services in rural areas, leading to difficulties in sustaining IoT systems in the long term.Despite these challenges, technological advancements, targeted investments, and Bulletin of Electr Eng & Inf ISSN: 2302-9285  Intelligent agriculture system using low energy and based on the use of … (Elhattab Kamal) 1287 increased awareness can help overcome these hurdles and fully leverage the benefits of IoT in rural agricultural domains.
In this paper we will propose a new fully autonomous model, that will be able to overcome these challenges, because it uses low cost technologies, low power consumption, and able to operate correctly in rural areas where there is an absence of internet and electricity.our new model uses ESP32, long range (LoRa) transmission protocol, and solar panel with battery to power IoT equipment.
In the next segment, titled related work, we will provide an overview of the studies conducted in this domain to offer a current perspective.Subsequently, the materials and methods section will outline the procedures and resources used to build our new system.The system test section will reveal the outcomes of our innovative system.Going further, the critique and discussion segment will involve a critical evaluation of our solution, with the aim of identifying avenues for improvement and highlighting its significance.Ultimately, in the conclusion, we will summarize the crucial insights derived from our research.

RELATED WORK
To have visibility on the current state and the problems encountered in the work already done in the field of irrigation and intelligent monitoring, it is necessary to make a literary study in order to propose a new model that will improve existing solutions.The solutions implemented in this area are described: Krishnan et al. [24] proposed the prototype also turns off the engine to save energy in case of rain.This system can be improved by adding other sensors for example the pH sensor.Sudharshan et al. [25] designed a prototype smart irrigation that uses three sensors (temperature, soil moisture, and humidity), Arduino, NodeMCU, and a solar panel to power the system.Data from sensors is sent to the cloud and farmers can visualize moisture, soil moisture and temperature.This system can be improved by adding other agricultural monitoring sensors for example the infrared motion sensor (pir sensor) to protect the agricultural field from animal intrusion.Benyezza et al. [26] realized an IoT-based zoning irrigation system, using sensors for moisture, soil moisture, temperature, and the Raspberry Pi to optimize plant growing conditions and reduce water consumption.But this system is not entirely autonomous in terms of energy, this system can be improved by adding a solar panel to have electricity and AI algorithms to optimize water use.Tiglao et al. [27] developed an IoT prototype using the Raspberry Pi, an irrigation mechanism and soil moisture, temperature and moisture sensors that allow farmers to make smart decisions, to get the best yield.This system can be optimized in terms of electrical energy using the ESP32 and LoRa instead of using the Raspberry Pi and Wi-Fi which consumes a lot of electrical energy.Goap et al. [28] designed a new model based on the IoT that uses the Raspberry Pi, Arduino Uno, moisture, temperature, soil moisture sensors, and open-source technology to predict irrigation needs in an agricultural field, the developed and fully autonomous irrigation system.This system can be developed by adding agricultural monitoring sensors for example the pH sensor to improve the quality and quantity of agricultural products.Veerachamy et al. [29] realized a control system using an IoT platform using the Arduino Uno, soil moisture, humidity and temperature sensors and cloud technology.Prototype irrigates fields automatically when soil moisture is low.This system can be fully autonomous and adapt with large agricultural fields by adding a solar panel.Katta et al. [30] proposed an IoT-based agricultural field monitoring system that uses the soil moisture sensor to automatically irrigate farmland, an infrared motion detector and a Raspberry Pi camera to monitor plant health.This system can be optimized in terms of electrical energy by using the ESP32 which consumes less electrical energy than the Raspberry Pi.Seethalakshmi et al. [31] developed a model that uses NodeMCU technologies, moisture, soil moisture sensors, temperature and thingspeak cloud technology to analyze future weather status from an open API.With these parameters irrigation can be optimized.This system can be adapted with large agricultural fields by adding a solar panel and can be improved by adding agricultural field monitoring sensors for example the pH sensor.Shufian et al. [32] designed a prototype using the Arduino Uno, solar panel, fast charger and a battery, this configuration is controlled by the Arduino and the ESP8266 Wi-Fi module is used to control online monitoring in order to get feedback from the sensors.This system can be improved in the safety of agricultural fields against animal intrusion by adding the pir sensor.Vianny et al. [33] proposed a hybrid model using the Raspberry Pi for irrigation and making the decision using different parameter observations.K-nearest neighbors (KNN) is used to gather the closest detection information, using various parameters to ensure accurate irrigation that manages water use and reduces energy use.This system can be fully autonomous in terms of energy and adapt with large agricultural fields by adding a solar panel and devices that consume less electrical energy, for example ESP32 and LoRa.Shukla et al. [34] have realized an IoT-based system that uses Arduino Uno and a soil moisture sensor (YL-69) that indicates the amount of moisture in the soil and whether there is a need for watering.The Arduino Uno microprocessor controls the entire project and analyzes the data to understand the growth behavior of the moringa plant under various climatic conditions.This system can be improved by using AI algorithms that optimize water use in large-scale agricultural fields.
The field of agriculture is ranked among the top domains using the IoT.Several systems have been developed to irrigate plants automatically when soil moisture is low but these solutions remain limited in terms of energy and are not adapted with large agricultural fields because in large agricultural fields there are places where there is a lack of electricity and internet access, so the other systems already implemented in this area remain unable to respond to these two major problems (lack of electricity and internet) and have not taken into account the security of agricultural fields against intrusions, and they offer solutions that use batteries or wires as a source of electrical energy the thing that makes the power supply of internet devices a real challenge for many causes, the area of agricultural fields is large, which increases the cost of installing electrical cables in all fields and electrical cables installed in agricultural fields remain subject to damage that can be caused by water, agricultural vehicles and insects.
In the next section we will propose a new system that will be autonomous, adapt with the problems of large agricultural fields (lack of electricity and internet coverage), consumes less energy, able to protect our agricultural land against intrusion, and consume less energy and more efficient than other systems.

MATERIAL AND METHOD 3.1. The new system
Our new system will be autonomous and adapted with large agricultural fields and consumes less energy than the systems mentioned above thanks to the use of solar energy with a battery as a power source, low-power interconnection technologies (the ESP32 micro controller [35] and the LoRa data transmission protocol) and the pir sensor to protect our agricultural fields against the intrusions of animals and others.

LoRa technology
LoRa, an enhanced data communication technology using wireless technology, was patented and developed by Cycleo of Grenoble, then taken over by Semtech [36].The goal of using LoRa technology in our new system is to cover large agricultural fields while saving energy.LoRa data transmission technology is recommended for IoT systems that want to send small messages a day over a large distance [37].

Description of the system
In this paper, our new autonomous agricultural system is composed of two units.The first unit is developed for real-time condition detection and will analyze terrain parameters such as temperature, soil moisture, moisture and pH value.The pH sensor monitors the soil pH level, the soil moisture sensor monitors the moisture level in the agricultural field, the temperature sensor monitors the temperature and humidity level, the pir monitors the agricultural field against animal intrusions.Soil moisture, it is treated using the ESP32 micro controller to optimize the irrigation of large agricultural fields.When the parameter falls below the optimal level, the ESP32 MCU (1) sends the command to the pumps to bring the operation to the level.The processed data will be transmitted to the second unit using the LoRa communication protocol.The second unit performs the dual function of receiving and transmitting data to the cloud server via Wi-Fi.The cloud server is connected to a mobile app that allows users to monitor their large-area farmland as long as it's connected to the internet.The diagram of the smart agriculture methodology based on LoRa and the microcontroller ESP32 is shown in Figure 1.

The components
In the development of our new agricultural system, we have carefully selected a range of sensors and components to create a smart and efficient solution for managing and monitoring the conditions in our agricultural field.Each component serves a specific purpose, contributing to the overall functionality and effectiveness of the system.This integration of technology aims to enhance agricultural practices by providing real-time data on crucial parameters.Let's explore the key components of our system: a. Rain sensor This sensor contains two outputs, the first is logical D0 allows the detection of all or nothing (a screw allows to adjust the detection threshold) and the second is analog A0, which varies from 0 V (plate completely wet) to 5 V (dry plate).The purpose of using the rain sensor shown in Figure 2 in our new system is to detect water that comes from rain.b.Sensor temperature This sensor does 1-wire serial communication using a single protocol and provides temperature and humidity values over (16 bits).The purpose of using this sensor shown in Figure 3 in our new model is to determine the value of temperature and humidity in our agricultural land.c.Soil moisture sensor The purpose of using this sensor in our new system, shown in Figure 4, is to measure soil moisture [28].In the case where there is more water, the soil conducts more electricity which means that there is less ISSN: 2302-9285  Intelligent agriculture system using low energy and based on the use of … (Elhattab Kamal) 1289 resistance.In the other case where there is less water, the soil will conduct less electricity, which means there is more resistance.d. pH sensor The pH sensor measures the pH of the solution, whether the solution studied is acidic or basic.Using the pH sensor in the prototype requires a program to be made to measure soil pH [38].The purpose of using the pH sensor shown in Figure 5 in our new system is to determine the pH value in our agricultural field.This sensor uses crystals that are naturally occurring and electrically polarized, capable of handling voltage when cooled or heated.The thing that can change the positions of atoms in crystals.This modification of the positions causes a tension in the crystal.This sensor works autonomously.We will use the infrared detector shown in Figure 6, in the new system to protect our agricultural field against animal intrusion.f.
ESP32 micro controller The ESP32 micro controller shown in Figure 7, is an IoT development board designed by Heltec automation, it integrates wireless, Bluetooth, and LoRa communications at a reduced cost.It is often used in smart cities, smart homes, and smart farms.g.Solar panel The solar panel is a renewable energy production equipment [39]- [41].It can be thermal (converts solar energy into heat) or it can be photovoltaic (converts solar energy into electricity).Solar thermal panels consist of a glazed surface that captures the heat of the sun to transmit it to a heat transfer fluid and solar thermal panels consist of a glazed surface that captures the heat of the sun to transmit it to a heat transfer fluid.The solar panel, shown in Figure 8, is used in our new system to power IoT devices, as it absorbs the sun's rays and converts it into electricity.This device is used to manage the current in one direction only.It manages current flow from one direction but prevents current from flowing in the opposite direction.These devices are classified by their current capacity, voltage, and type.We will use the diode shown in Figure 9 in our new system to limit the voltage.The thing that will protect our solar panel from reverse currents coming from the battery of our new system.i.
Lithium batteries This type of battery is able to charge in a fast way that lasts a long time with a higher energy density than other batteries.Lithium batteries are lightweight batteries with a long battery life.Lithium batteries, shown in Figure 10, make our new system fully self-sufficient in terms of energy as it provides electricity at night and allows us to store energy during the day.j.
Recharge card for power bank The card is used as a source of energy operating with one or more batteries.Some cards have a rather power-bank oriented use, i.e., after recharging they will power a portable electronic device.Others are more intended to be used as a UPS backup power supply, in addition to a permanent mains supply.The charging board, shown in Figure 11, is used for the purpose of building a power bank using lithium batteries to power all 5 V-compatible devices.The water pump, shown in Figure 12, is used for irrigating agricultural fields.The operation of the water pump depends on the soil moisture.For example, if the soil moisture drops the water pump begins to irrigate the agricultural field until the desired value of soil moisture is reached.l.
Electric relay A relay module is an electronic component that allows remote control of an electrical load using a low power electrical signal.It consists of an electrical winding that can be activated by a low intensity electrical current, as well as a mechanical contact that can be opened or closed in response to the electrical signal.The relay module is often used to control electrical devices such as lights, motors and pumps, as well as to protect electronic circuits by cutting off the power in the event of an overload or short circuit.The purpose of using electric relays, shown in Figure 13, and to drive the pump of our new model from our microprocessor the ESP32.m.LoRa module The LoRa ebyte E32 transmission protocol module is a high-performance, long-distance transceiver with a 1-watt output power capability and a UART interface.This module utilizes the Semtech SX1278 chip operating at a frequency of 433 MHz, which is well-known for its exceptional performance in enabling longrange LoRa networks.As depicted in Figure 14, this module plays a pivotal role in our system, providing reliable communication over extended distances.

Development tools
In the implementation of our new agricultural system, we utilized a combination of hardware and software components to ensure efficient functionality and user-friendly interaction.The following components play a crucial role in the development and operation of our system: a. Arduino integrated development environment (IDE) The Arduino IDE is an open-source software essential for programming Arduino boards.With its user-friendly interface, it allows easy code writing, compiling, and uploading to the board.Based on the C/C++ language, it offers specific libraries to control input/output pins and sensors.Suitable for beginners and experts alike, it is widely used to create a variety of innovative electronic and IoT projects.We used IDE Arduino for the development of our new system.b.Mobile application When creating the mobile application, shown in Figure 15, we tried to make it simple and easy to use by using a single interface that displays the essential information collected and processed by our ESP32 microprocessor, our application retrieves information from the cloud to display it immediately.We created our mobile application, using the Blynk platform that uses android and compatible with several types of microcontrollers for example the Arduino, Raspberry and ESP32.It contains three essential elements: − The Blynk application for data control and display: the Blynk application is a powerful mobile application designed to empower users to control and display data from a wide range of electronic devices.It offers a user-friendly interface that allows the creation of customized dashboards for remote monitoring and control of various devices.With Blynk, users can easily create interactive interfaces to interact with microcontrollers, sensors, and actuators, making it a versatile tool for managing their connected equipment.The Blynk cloud, serving as the communication hub between devices and the mobile application: the Blynk cloud stands as the central hub within the Blynk ecosystem.It functions as a dedicated server responsible for facilitating bidirectional communication between connected devices and the mobile application.Through this cloud infrastructure, users can remotely access their devices and establish secure connections.It plays a pivotal role in the seamless transmission of data between devices and the mobile application, ensuring a smooth and secure user experience.

−
The Blynk library, comprising a variety of widgets, including command buttons, notifications, and display formats: the Blynk library is a comprehensive collection of software components that encompasses a wide array of pre-built widgets.These widgets include command buttons for sending instructions to devices, real-time notification mechanisms for receiving alerts, and customizable display formats for presenting data in a clear and visually appealing manner.Users have the flexibility to choose from a diverse selection of widgets to personalize their dashboards, creating tailored interfaces for their IoT and home automation projects.

Working steps
In the first unit, the ESP32 microcontroller ( 1) is tasked with retrieving data from a variety of sensors.Once collected, it processes this data and employs LoRa communication to transmit it to the second unit.Additionally, the microcontroller continually monitors soil moisture levels, and if the recorded level exceeds 700, the water pump will pump water to the agricultural land as needed.Furthermore, the microcontroller incorporates a rain sensor into its operations to detect rainfall, in the event of rain, it promptly halts the operation of our new system's water pump, ensuring that irrigation is suspended during natural precipitation events.This integrated functionality enhances the efficiency and sustainability of the agricultural irrigation system.Figure 16 shows the process of our new system.
In the second unit, all data collected from the sensors in unit 1 will be efficiently processed and transmitted to the user via our ESP32 microcontroller (2) and a dedicated mobile application, leveraging cloud technology.This seamless integration allows for real-time data access and control, enabling users to remotely monitor and manage various parameters critical for agricultural operations.Furthermore, our ESP32 microcontroller (2) serves as the interface between the cloud infrastructure and the user, ensuring secure, and reliable data exchange.The mobile app, designed with user-friendly features, provides an intuitive platform for users to access the collected data, receive alerts, and make informed decisions regarding irrigation and other agricultural activities.By harnessing the power of cloud technology, our system offers scalability, accessibility, and data-driven insights, contributing to more efficient and sustainable agricultural practices.This comprehensive approach enhances productivity, conserves resources, and empowers farmers with valuable information for optimizing crop yields.

SYSTEM TEST
We tested our new system in areas with no electricity and no internet connection.The on-field evaluation showed that our system functions well thanks to LoRa technology and our solar panel.In environments where access to electricity and the internet is limited, our system has proven its effectiveness by using LoRa for long-range communication between system units.Additionally, the use of a solar panel ensures the necessary power supply for continuous system operation, even in remote locations.These field tests confirm the robustness of our solution, which can be deployed in remote and off-grid areas to optimize agricultural irrigation efficiently and sustainably.

Tests the battery in the agricultural field
From the installation of our new model in the field of large area, we deduced that our battery was able to guarantee the power of our prototype for (1 day) without encountering problems.Figure 17, shows that our power system consisting of a solar panel and a charging battery with a voltage of (2.9 to 4.9) takes the duration of 3 hours in normal conditions (not rainy/not cloudy).Figure 18, shows that our discharge process begins in the afternoon in case there is no sun, and next morning the voltage of our power system consisting of a solar panel and a battery takes the value of 2.68 V.

Performance test of our new model
The new realize system is used because of the speed of response and cost-effectiveness.Sensors are used for real-time monitoring of our agricultural fields and directly connected to our mobile application using ESP32 and LoRa. Figure 19 shows the message received when there is an intrusion into our agricultural field using the motion detection sensor.Different irrigation methodologies were followed for three days.Figure 20 shows that our new model consumes the least water level compared to manual irrigation and drip irrigation.Additionally, the use of ESP32 and LoRa module provides long-range connectivity and reliable communication.Compared to other communication systems, our model allows farmers to receive sensor data and control systems remotely, even in rural areas with limited internet connectivity.This ability to communicate effectively in low-connectivity environments is a significant advantage for rural farmers who rely on real-time data for critical decision-making.
The integration of a solar panel for power supply is also a distinguishing feature of our model.Compared to traditional systems that require external power sources, our solution utilizes renewable energy, reducing operational costs and environmental impact.This provides energy autonomy for rural farmers, eliminating reliance on grid electricity and ensuring continuous power supply even in remote environments.In comparison to other systems available, our IoT model offers a comprehensive and integrated solution, combining essential sensors, long-range connectivity, and sustainable solar power.This unique combination enables rural farmers to access advanced technology, maximize agricultural yields, reduce operational costs, and promote efficient resource management.
In conclusion, our new IoT model offers significant advantages over other systems in the agricultural field.Through comprehensive monitoring, reliable connectivity, and sustainable solar power, our solution meets the specific needs of rural farmers by providing accurate data, efficient communication, and energy autonomy.In the future, a proposed enhancement for our system would be to incorporate edge computing capabilities.This would enable real-time data processing and analysis directly at the sensor nodes, reducing latency and improving response time.Additionally, implementing machine learning algorithms on the edge would enable predictive analytics, allowing for proactive decision-making and optimized resource management in agricultural operations.

CONCLUSION
The new model is to set up a new system of smart irrigation and monitoring of large-scale agricultural land using solar energy as a source of electricity.The LoRa communication protocol to connect all the objects of the system, a pump to irrigate our agricultural field and an infrared detector in order to secure our agricultural field against animal intrusions in order to protect our harvest.The agricultural system realize is fully autonomous capable of operating in agricultural fields where there is the absence of electricity and internet coverage and composed by two units.The first unit is made for the detection of real-time terrain parameters such as temperature, soil moisture, humidity and pH value.The pH sensor monitors the soil pH level, the soil moisture sensor monitors the moisture level in the agricultural field, the temperature sensor monitors the temperature level, the pir sensor monitors the agricultural field against animal intrusions.The detection of soil moisture is used to optimize irrigation in large-scale agricultural fields.When the parameter falls below the optimal level, the ESP32 micro controller (1) sends the command to the pump so that the water attracts the level into the ground.The use of our prototype in our agricultural field reduces the problem of water waste because our system automatically starts the pump when there is the need for water and secures our field intrusions into large agricultural fields or there are changing conditions (lack of internet and electricity).Our new model represents a significant advancement in irrigation efficiency.Compared to traditional methods such as manual irrigation and drip irrigation, our system stands out for its ability to minimize water and energy consumption.This substantial reduction in water and energy requirements is essential for the preservation of natural resources and the sustainability of modern agriculture.By adopting our model, farmers can not only achieve significant cost savings in terms of water and energy expenses but also make a significant contribution to environmental preservation by reducing their ecological footprint.Additionally, through automation and intelligent monitoring, our system enables more precise resource utilization, ensuring that plants receive the right amount of water at the right time for optimal growth.In summary, our new model offers an innovative and sustainable solution for agricultural irrigation, combining efficiency, savings, and environmental stewardship.In the future we will work on machine learning algorithms and artificial intelligence to have a better production of crops.

Figure 1
Figure 1.New model

Figure 17 .Figure 18 .
Figure 17.Battery charging graph Figure 21 shows the percentage of the cumulative time the engine is running for three days.The result obtained shows that the  ISSN: 2302-9285 Bulletin of Electr Eng & Inf, Vol. 13, No. 2, April 2024: 1286-1297 1294 new model uses the motor for 9.34% of the total watering time, manual irrigation uses the motor for 31.34% and drip irrigation uses the motor for 20.34%.