Design and Implementation of Solar Powered Automatic Irrigation System

This research is geared towards employing modern technology to enhance agricultural productivity through local and mechanized farming systems. The research work involves the construction of a device that controls water flow in an irrigation system most especially, in areas where there is acute shortage of water supply or insufficient rainfall which may be due to climate change resulting or causing draught and other environmental conditions. It is a device that is solar powered, as an alternative source of power supply to the entire irrigation system. The solar power supply consist of two modules or panels, a battery and charge regulator whose function is to control the battery charge and as well supply power to the load (motor) at various weather and soil moisture conditions. The device was tested and it was (is) able to minimize electrical power consumption, with a flow rate of water averaging at 20 liters per minute, due to the pump size and capacity. The humidity of the soil is detected by the soil moisture sensor which determines the voltage levels at which the water pump switches on/off. Also, there is an ultraviolet light sensor that enables the controller to switch off the pump during the period of higher intensity of sunlight, owing to the fact that most crop plants are irritated by water when the sun is very hot. The water pump is a D. C submersible type. An algorithm was designed for the smooth operation of the entire system.


Introduction
Irrigation is the artificial method of watering plants in order to support their growth. Automatic irrigation system is an irrigation that supplies water to crop plants or other plants on its own at some time intervals, depending on soil moisture and weather condition without the farmer's intervention. According to Beat Stauffer and Dorothee Spuhler (2019), an automatic irrigation system refers to the operation of the system with minimum or no manual intervention apart from inspection and monitoring. Almost every system (drip, sprinkler, surface) can be automated with the help of devices such as timers, sensors, computers and mechanical appliances. It makes the irrigation process more efficient so that operators can concentrate on other important farming activities to improve crop yield. Otherwise, a system like this may require a huge capital to invest in, on a large scale farming which requires some engineering expertise to plan, design and implement its operation., An automatic irrigation system can also be defined as an irrigation system that is operated by a computerized controller and has been engineered to function automatically with minimum manual participation and little or no human intervention [3]. An automatic irrigation system is capable of supplying the actual amount of water to a vast area of land within a short period of time.

Automatic Irrigation Systems
Automatic irrigation systems are convenient, especially for those who travel often and cannot attend to their lawns or gardens regularly [2]. If installed and programmed properly, automatic irrigation systems can even save you money and Powered Automatic Irrigation System help in water conservation. Dead lawn grass and plants need to be replaced, and that can be expensive. But the savings from automatic irrigation systems can go beyond that. Watering with a hose or an oscillator causes wastage of a huge amount of water. Neither method targets plant roots with any significant degree of precision. Automatic irrigation systems can be programmed to discharge more precise amounts of water in a targeted area, which promotes water conservation.

High Technology Automated Irrigation Systems
According to Beat Stauffer and Dorothee Spuhler (2019), high technology automatic irrigation system is divided into six categories, as described below.

Time Based System
Irrigation time clock controllers, or timers, are an integral part of an automated irrigation system. A timer is an essential tool to apply water in the necessary quantity at the right time. Timers can lead to an under-or over-irrigation if they are not correctly programmed or the water quantity is calculated incorrectly (CARDENAS-LAILHACAR 2006). Time of operation (irrigation time -hrs per day) is calculated according to volume of water (water requirement -litres per day) required and the average flow rate of water (application rate -litres per hours). A timer starts and stops the irrigation process [8,9].

Volume Based System
The pre-set amount of water can be applied in the field segments by using automatic volume controlled metering valves [8]. An example of volume based irrigation method is described in [17], where a pre-determined quantity of water is programmed to be sprinkled across an area of land for a set interval of time.

Open Loop Systems
In an open loop system, the operator makes the decision on the amount of water to be applied and the timing of the irrigation event. The controller is programmed correspondingly and the water is applied according to the desired schedule. Open loop control systems use either the irrigation duration or a specified applied volume for control purposes. Open loop controllers normally come with a clock that is used to start irrigation. Termination of the irrigation can be based on a pre-set time or may be based on a specified volume of water passing through a flow meter [4].

Closed Loop Systems
In closed loop systems, the operator develops a general control strategy. Once the general strategy is defined, the control system takes over and makes detailed decisions on when to apply water and how much water to apply. This type of system requires feedback from one or more sensors. Irrigation decisions are made and actions are carried out based on data from sensors. In this type of system, the feedback and control of the system are done continuously. Closed loop controllers require data acquisition of environmental parameters (such as soil moisture, temperature, radiation, wind-speed, etc) as well as system parameters (pressure, flow, etc.) [4,8].

Real Time Feedback System
With this application irrigation is based on actual dynamic demands of the plant itself; the plant root zone is effectively reflecting all environmental factors acting on the plant. Operating within controlled parameters, the plant itself determines the degree of irrigation required. Various sensors, tensiometers, relative humidity sensors, rain sensors, temperature sensors etc. control the irrigation scheduling. These sensors provide feedback to the controller to control its operation [8,14].

Computer Based Irrigation Control Systems
A computer-based control system consists of a combination of hardware and software that acts as a supervisor with the purpose of managing irrigation and other related practices such as fertigation and maintenance. Generally, the computer-based control systems used to manage irrigation systems (e.g. drip irrigation systems) can be divided into two categories: interactive systems and fully automatic systems [8,9,13,15]. Besides these high-tech solutions there are also effective methods without any energy supply. Optimizing a system mechanically with the help of gravity can automate an irrigation process Examples are the systems described below [9,14].

Review of Past Literatures on Automatic Irrigation System
Automatic irrigation is needed in farmlands or fields which are divided into small portions known as irrigation blocks and they are irrigated in sequentially to discharge water from the source. Various types of automatic irrigation techniques have been developed, with different approach on operating the overall process of irrigation. Some of them make use of surface irrigation, while others employ subsurface irrigation using two drip tapes. They are time based systems which comprises mostly irrigation time clock controllers, or timers [18]. A timer is a device used to switch water application in a specific volume over a predetermined time interval. Timers can cause excess or less volume of water to be dispensed during t irrigation if they are not correctly programmed or the water quantity is calculated incorrectly. Time of operation is calculated according to volume of water required and the average flow rate of water a timer starts and stops the irrigation process. Timers provide an automatic program for irrigation at random conditions, without implementing system display [18,19]. Other methods of automated irrigation employs open loop feedback control system, where the operator decides the quantity of water to be pumped at a period of time depending on the portion or land area. During the irrigation process, the controller is programmed to supply water with due respect to the operator' desired plan. Open loop control systems can function in two ways. It may either make use of irrigation duration or a specified applied water volume for control purposes. Open loop controllers normally come with a clock that is used to start irrigation and as mentioned earlier, the operator decides on the actual time in programming it. The end of the irrigation process is determined by a pre-set time interval or may be based on a specified volume of water flow [4,18]. This information is programmed into the controller and the water is applied according to the desired schedule. The disadvantage of open loop automatic irrigation systems is that they do not respond automatically to changes in environmental conditions. Also, they may require frequent resetting to achieve high levels of irrigation efficiency [11,18].

Drip Irrigation Using Automated Systems
Automatic irrigation controllers employed in drip methods are purely volume based systems, where a predetermined quantity of water is supplied to various portions of the farmland with the help of automatic volume controlled metering valves. Previous researches have proved that volume control systems have more advantages over time control systems [18,19]. The quantity of water these systems supply is always the same whether power supply is available or not but time controlled systems are still more popular due to their cost-saving benefits. Volume based systems basically involve the connection of volume meters to generate pulses after discharging a specific amount of water and the controller measures these pulses in order to regulate the supply. Drip irrigation can also be achieved automatically by a spreadsheet model that provides both water budgeting and forecasting for a vast area of land divided into plots. Such an operation ensures that the whole farmland is watered every day base on current demand by measuring the size of each plot, as well as programming the amount of water required to irrigate every plot during an extended simulation and the prioritization of plots to be irrigated based on raw deficit and net revenue [18,20].

Automated Irrigation System Based on Soil Moisture
Using Arduino This is another form of an automatic irrigation or watering system using Arduino microcontroller UNO R3 programming, in such a way that the D.C voltage supply to a water pump motor is interrupted through the motor driver module. A Soil sensor is connected to the A0 pin of the Arduino board to sense the moisture content of the soil to be irrigated. When the moisture content of the soil reduces in value, the sensor detects a change in the humidity, thereby sending a signal to the microcontroller so that the pump (motor) can be activated [5,23]. This concept can be used for automatic plant watering system. The circuit comprises an Arduino UNO board, a soil moisture sensor, a 5V motor pump, a Motor driver L293D (IC1), motor driver IC to run the water pump. The Arduino board can be powered by a 5V to 9V power supply which may either be a battery or a plugin adaptor or solar panel. The water pump is powered separately by a separate 5V to 9v [5].

Electrical Power Source
The electrical power required for the running of the D. C motor which drives the water pump is delivered by a standalone solar power supply system in order to ensure that there is constant availability of electricity to operate the irrigation process always. Electrical power supply from the convectional or traditional sources is a very big problem in Nigeria. Reference [16] describes that there is persistent scarcity or lack of stable and uninterrupted power supply in some parts of the world particularly in the developing countries, and this is posing a lot of limitations to the practice of irrigation in the rural communities or villagers where electricity supply is not frequent. Under this situation, alternative source of power such as solar energy is employed to supply power to the water pumps. In this type of irrigation system, a solar charge controller is used to regulate the charging of a battery bank for the storage of electrical energy produced by an array of solar panels. The battery in turn delivers the required D. C voltage to operate the water pumps, which is used as water supply to the entire farm land [3,16]. Though, solar powered automatic irrigation system can operate under direct sunlight. But there is need to ensure that the process does not cause any damage or harm whatsoever to the plants, particularly crop plants. In this research, a photocell is incorporated in the sensing unit of the control device so that water supply to plants can be interrupted in certain period of daylight when it is not necessary [6,19]. The solar powered automatic irrigation system implemented in this research receives its power supply from the sun's energy through photovoltaic or solar modules. And this has reduced the level of dependence on the convectional power supply. In this system, solar energy is used to operate the irrigation pump. This type of system optimizes the use of water by reducing water wastage. It is cheap and very easy to install, with no trace of environment pollution [3,5,7]. The system has three major parts; Moisture sensing part, control section and the output section. The soil humidity is detected by a resistance type sensor. The control unit was achieved using ATMega328 microcontroller. The output was the unit used to control the irrigation system by switching it on and off depending on the soil moisture contents. Two stages of design were undertaken.

Materials and Methods
Thus the microcontroller is programmed using PROTUS software. The function of the moisture sensor is to sense the level of moisture in the soil. The motor/water pump supplies water to the plants. The light intensity sensor detects the intensity of the sunlight and decides whether or not to activate the pump.
The ATMega328 microcontroller is employed to control the motor. It is connected to the motor driver relay, and the driver to the water pump. The motor is driven by 12volts. The moisture sensor measures the level of moisture in the soil and sends the signal to the microcontroller if watering is required. The motor/water pump supplies water to the plants until the desired moisture level is reached.

Power Supply
Every circuit runs on a different voltage, some circuits' runs on 5V, 9V and so on. But in this project we will be using 5V and 12V if we are using an ATMEGA 16bit micro control then we need a 5V power supply because the operating voltage for ATMEGA 16 micro control is 5V. If we give voltage greater than 5V then our micro controller may get damaged. For avoiding this we always use a 5V power supply for micro controller circuits.

Switching Unit
This unit consists of a transistors (BC109) operating as a switch, relays and a DC motor. The moisture sensor works using the principle of the relationship between conductivity and moisture content of a medium. The specifications are Operating voltage -5V Type-Analog Principle-change in conductivity in the presence of moisture Probe material-copper The working of the relay for various test conditions is shown in table 1 below

Sensing Unit
A sensor is a device that measures a physical quantity and then converts it to a signal which can be read by the observer. Three copper conductors were used to form a sensing probe connected to 5VDC supply, which is interfaced with the microcontroller. The conductors are separated from each other, so that when they are inserted into the soil, there will be a change in voltage signal to the microcontroller due to the moisture condition of the soil. When the water fills the gap, there is a resistance between the probes and voltage signal passes to the microcontroller.
The resistance to flow of current between the sensor probes changes with soil moisture level and soil type. The current passing through the sensor probes (I out ) for different soils and different soil moisture levels was calculated as shown below:

LED Display and Speaker
According to our design model, if the water level is indicated by the red LED which means extremely low, the microcontroller will automatically start the pump according to the command of the UV light sensor and relay interface. The farmer will be confirmed by a continuous alarm from the speaker. The pump will remain ON until the water level is indicated by the white LED bulbs. When the sensor senses the water level above 10cm, microcontroller will make the pump to be switched OFF at the secure level, the microcontroller will not operate. However when the soil moisture level goes down to mid-level, the sensor will send a signal to the microcontroller. After receiving the signal, the microcontroller will send a message to the LED interface seeking the decision of the farmer to start pumping or not.
The choice of LEDs used was made according to ohms law as follows.

System Description and Testing
Measuring soil moisture is very significant in agriculture as it helps the farmer in handling the irrigation system. Soil moisture sensor is responsible for resolving this problem. The sensor measures the content of the water. Soil moisture sensor works on the principle that conductivity changes with the presence of water content in the soil. The output of the sensor is high when the space between the three electrodes is dry. The output voltage decreases as the moisture content increases between the two electrodes. It is simple to use this sensor. It was simply inserted into the soil to be irrigated and tested and the volumetric water content of the soil is indicated by the LED bulbs. When the soil moisture content is low, the system automatically starts the irrigation process until What is generally agreed is that plants should not be watered while in full sun. the notion that wet leaves on sunny day causes scorch in plants was disproved nearly ten years ago but there is no doubt that watering in full sun is not water efficient as much of it will evaporate before entering the soil. The light sensor was connected to the microcontroller to control the times at which the system could be activated depending on the amount of daylight. A switch was also included to deactivate the light sensor in case the farmer desires to irrigate the farm at some time during the day.
The sprinklers were made by puncturing plastic bottles with a needle. The holes were made with a needle so as to increase the pressure of water flowing out of them thereby increasing the radius covered by each point.. the solar panels each measuring 18Volts and 100W were connected in parallel maintaining their rated voltage but their capacity was increased in order to charge the 100Ah battery. The solar panel charges the battery through the charge controller. The level of the battery is indicated by the LED assigned to do so. The battery charging circuit in the automatic control unit controls the charging operations. When the battery voltage goes below 11.3VDC, the charging operation automatically starts and when it gets to 14.4V the solar panel is automatically disengaged from charging the battery. The battery supplies power to the overall system. A voltage regulator reduces the voltage from the battery entering the control unit to 5V since most of the electronic components are damaged by voltage above 5V and 9V. The battery was charged using the solar panels to a voltage of 13.5Volts before it was connected to the automatic control unit.    A water reservoir of 120litres was used to test the automated irrigation action of the pump. The three probe sensor was planted at a specified point where irrigation was to take place. To implement the final bit of the automated irrigation system an electric motor 12VDC was selected as the water pump. The first two units of the system i.e. sensing unit and the control unit (microcontroller) are powered by 5VDC. To interface the two units a 5VDC relay (SLT73-5D-1Z) was used as the isolation unit. The volume of water required to irrigate the soil sample was observed and recorded against time. The microcontroller was connected to the relay via an NPN transistor (2N4123). To protect the transistor; while turning it on, a resistor was used. The resistor limits the current flowing through the transistor. To protect the microcontroller from back e. m. f during switching a diode was connected across the relay. The test was conducted by irrigating an area with 120 litres of water. The battery charging operations was observed and result recorded. Also the volume of water consumed before the moisture sensor disengages was monitored and recorded. The time it takes for water to infiltrate the soil was noted and recorded.

Soil Condition Analysis
Water was added in the soils in steps and the sensor values recorded as shown table 4 below.

Discussion
The moisture sensor used is a resistance sensor type. Its output is the resistance in the soil between the three probes. The value of the soil resistance decreases with increase in water content to a certain point. On adding 50litres the resistance value reduced drastically as indicated by the LED colour change from RED to YELLOW. On adding more water the resistance value kept reducing. At around 100litres of water the soil resistance began to reduce at a lower rate. This is because at this point the soil is now becoming saturated with water and thus adding more water has a small effect on the soil resistance. The sensor was calibrated and three states defined. The states are soggy, moist and dry. When the dry state was achieved the control unit (micro controller) switched the water pump ON through a relay circuit. The three states were indicated using three different LEDs. The alarm system also indicated when the pump was running. The control circuit and the sensor circuit were powered using a 12V battery which was connected via a voltage regulator with an output of 5V.

Conclusion
A Solar Powered Automatic Irrigation System has been designed, implemented and tested successfully, in accordance with the characteristic features of all the hardware components used.
Step-by-step procedures were carefully observed in assembling all the units embedded in the control of the entire system to ensure effective operating condition. The system operates automatically through an actuated response by the soil moisture sensors that detects the moisture level (water content) of the soil as it affect different plants growth. If the moisture level is found to be below the desired level, the moisture sensor sends a signal to turn ON the Water Pump which supplies water from the source to the plant through the sprinkler. When the desired moisture level is attained, the system cuts the water supply on its own and the Water Pump is turned OFF. Thus, there is also the tendency to minimize water usage in a condition of water scarcity resulting from unfavourable climatic and weather conditions. Also, there is availability of uninterrupted power supply to the entire system, using solar energy which is often used to charge the battery that provide electrical energy to power the water pump.
Thus, the overall aim of developing a more efficient, cheap and productive irrigation system capable of helping both small and large scale farmers to carry out their farming practices and increase in farm produce, have been actualized.