34
CHAPTER ONE
1.0 Introduction
1.1 Background of the Study
Irrigation is the artificial application of water to the land or soil. It is used to assist in the growing of agricultural crops, maintenance of landscapes, and re vegetation of disturbed soils in dry areas and during periods of inadequate rainfall. When a zone comes on, the water flows through the lateral lines and ultimately ends up at the irrigation emitter (drip) or sprinkler heads. Many sprinklers have pipe thread inlets on the bottom of them which allows a fitting and the pipe to be attached to them. The sprinklers are usually installed with the top of the head flush with the ground surface. When the water is pressurized, the head will pop up out of the ground and water the desired area until the valve closes and shuts off that zone. Once there is no more water pressure in the lateral line, the sprinkler head will retract back into the ground. Emitters are generally laid on the soil surface or buried a few inches to reduce evaporation losses.
Water is a resource that all living species need. It is therefore very precious and has to be used with moderation to be preserved for the generations to come. Agriculture is an industry that uses a lot of water. Most of the time, this resource is not used efficiently and substantial amounts of water are wasted. In the near future, these wastes will represent a large sum of money. The ones who manage this resource efficiently will be winning time and money.
In this project report, an automated irrigation system is suggested to minimize the water input and human intervention, while satisfying the plants needs. First, the details of the problem are summarized. The objective and the scope of the project are described. Some general approaches to the design are reviewed. The results and conclusions of an experiment to determine the required amounts of water are discussed. Then, the suggested design is explained in detail with the purpose, requirements and constraints, simulation and test results for each of its parts. A brief cost analysis is performed to estimate the viability of such a project on the market. Finally, the design is criticized, and suggestions are made for future improvements.
An automatic irrigation system does the operation of a system without requiring manual involvement of persons. Every irrigation system such as drip, sprinkler and surface gets automated with the help of electronic appliances and detectors such as computer, timers, sensors and other mechanical devices.
Healthy plants can transpire a lot of water, resulting in an increase in the humidity of the greenhouse air. A high relative humidity (above 80-85%) should be avoided because it can increase the incidence of disease and reduce plant transpiration. Sufficient venting or successive heating and venting can prevent condensation on plants surfaces and the greenhouse structure. The use of cooling systems during the warmer summer months increases the greenhouse air humidity. During periods with warm and humid outdoor conditions, humidity control inside the greenhouse can be a challenge. Greenhouses located in dry, dessert environments benefit greatly from evaporative cooling systems because large amounts of water can be evaporated into the incoming air, resulting in significant temperature drops.
Since the relative humidity alone does not tell us anything about the absolute water holding capacity of air, a different measurement is sometime used to describe the absolute moisture status of the soil. The vapor pressure deficit is a measure of the difference between the amount of moisture the air contains at a given moment and the amount of moisture it can hold at that temperature when the air would be saturated. Pressure deficit measurement can tell us how easy it is for plants to transpire: higher values stimulate transpiration (but too high can cause wilting), and lower values inhibit transpiration and can lead to condensation on leaf and surfaces.
1.1.1 Types of Irrigation
1. Ditch Irrigation
Ditch Irrigation is a rather traditional method, where ditches are dug out and seedlings are planted in rows. Siphon tubes are used to move the water from the main ditch to the canals.
2. Terraced Irrigation
This is a very labor-intensive method of irrigation where the land is cut into steps and supported by retaining walls. . The flat areas are used for planting and the idea is that the water flows down each step watering each plot. This allows steep land to be used for planting crops.
3. Drip Irrigation
This is known as the most water efficient method of irrigation. Water drops right near the root zone of a plant in a drip- ping motion. If the system is installed properly you can steadily reduce the loss of water through evaporation and runoff.
4. Sprinkler System
This is an irrigation system based on overhead sprinklers, sprays or guns, installed on permanent risers. You can also have the system buried underground and the sprinklers rise up when water pressure rises, which is a popular irrigation system for use on golf courses and parks.
5. Rotary Systems
This method of irrigation is best suited for larger areas, for the sprinklers can reach distances of up to 100 feet. The word "Rotary" is indicative of the mechanical driven sprinklers moving in a circular motion, hence reaching greater distances. This system waters a larger area with small amounts of water over a long period of time.
1.2 Statement of the Problem
Irrigation of plants is usually a very time-consuming activity; to be done in a reasonable amount of time, it requires a large amount of human resources. Traditionally, all the steps were executed by humans. Nowadays, some systems use technology to reduce the number of workers or the time required to water the plants. With such systems, the control is very limited, and many resources are still wasted.
Water is one of these resources that are used excessively. Mass irrigation is one method used to water the plant. This method represents massive losses since the amount of water given is in excess of the plants needs. The excess water is evacuated by the holes of the pots in greenhouses, or it percolates through the soil in the fields.
The contemporary perception of water is that of a free, renewable resource that can be used in abundance. However, this is not reality; in many parts of North America, water consumption is taxed. It is therefore reasonable to assume that it will soon become a very expensive resource everywhere.
In addition to the excess cost of water, labour is becoming more and more expensive. As a result, if no effort is invested in optimizing these resources, there will be more money involved in the same process. Technology is probably a solution to reduce costs and prevent loss of resources.
1.3 Aim and Objectives of the Study
The aim of this project is to build an automatic plant irrigation system that sense soil moisture using microcontroller.
The following are objectives of the studies:
To reduce human interference and ensure proper irrigation
To minimize water loss and to maximize the efficiency of water used
To prevent over labour of the pumping machine and prevent it from getting bad or burned
The following aspects were considered in the choice of a design solution:
Installation costs;
Water savings;
Human intervention;
Reliability;
Power consumption;
Maintenance;
Expandability.
A critical consideration is the installation costs, since costs generally determine the feasibility and viability of a project. The installation must be simple enough for a domestic user. The water savings was also an important aspect, since there is a demand to minimize water loss and to maximize the efficiency of water used. Since the objective is to minimize the cost of labour, minimal supervision and calibration must be needed. The system must operate with optimized consistency. The power consumption must also be monitored. For maintenance, the replacement parts must be readily available and easy to install in the case of failure. Finally, the possibility for implementing the system at a larger scale (e.g. in greenhouses) should be investigated.
1.4 Justification of the Work
The increasing world population has lead to exponential increase in food demand. This event has necessitated the need for more land to be cultivated. Due to change of weather patterns brought about by global warming, irrigation remains as the only reliable method of crops production. With more and more land now being under irrigation there is a need for optimal use of water.
Over the last few years knowledge in electronics and computation has been used to solve present day challenges. In the forefront of the electronics revolution has been the microcontroller. The microcontroller has been used together with various sensors to measure and control physical quantities like temperature, humidity, heat and light. By controlling these physical quantities using the microcontroller; automatic systems have been achieved.
Irrigation systems in crop production can and has also been automated. This solves the challenge brought about by the unreliability of climate changes thus need for water optimization. Automation of the soil moisture sensor irrigation systems is one of the most convenient, efficient and effective method of water optimization. The systems helps in saving water and thus more land can be brought under irrigation. Crops grown under controlled conditions tend to be healthier and thus give more yields. Controlled watering system results in reduction of fertilizer use and thus fertilizer costs go down.
1.5 Scope of the Study
This project involves the evolution of watering manually to watering automatically. The controlling of the automatic watering system is use in a house, institution or any organization with flowers planted for decoration. Sensor used to control the watering system is soil moisture sensor. Other than that, this system should also monitor the water level.
1.6 Significance of the Study
The continuous increasing demand of food requires the rapid improvement in food production technology. In a country like Nigeria, where the economy is mainly based on agriculture and the climatic conditions are isotropic, still we are not able to make full use of agricultural resources. The main reason is the lack of rains & scarcity of land reservoir water. The continuous extraction of water from earth is reducing the water level due to which lot of land is coming slowly in the zones of un-irrigated land. Another very important reason of this is due to unplanned use of water due to which a significant amount of water goes to waste. This problem can be rectified if we use microcontroller based automated irrigation system in which the irrigation will take place only when there will be acute requirement of water.
1.6.1 Advantages of the System
Saves water - Studies show that drip irrigation systems use 30 - 50% less water than conventional watering methods, such as sprinklers.
Improves growth - Smaller amounts of water applied over a longer amount of time provide ideal growing conditions. Drip irrigation extends watering times for plants, and prevents soil erosion and nutrient runoff. Also, because the flow is continuous, water penetrates deeply into the soil to get well down into the root zone.
Discourages weeds - Water is only delivered where it's needed.
Saves time - Setting and moving sprinklers are not required. A timer delay as per environment can be added to the system for automatic watering.
Helps control fungal diseases, which grow quickly under moist conditions. Also, wet foliage can spread disease.
Adaptable - A drip irrigation system can be modified easily to adjust to the changing needs of a garden or lawn.
Simplest Method - Start by drawing a map of your garden and yard, showing the location of plantings. Measure the distances required for lengths of hose or plastic tubing to reach the desired areas.
1.6.2 Others Advantages
Highly sensitive
Works according to the soil condition
Fit and Forget system
Low cost and reliable circuit
Complete elimination of manpower
Can handle heavy loads up to 7A
System can be switched into manual mode whenever required
1.6.3 Area of Application
Roof Gardens
Lawns
Agriculture Lands
Home Gardens
1.7 Motivation
The increasing demand of the food supplies requires a rapid improvement in food production technology. In many countries where agriculture plays an important part in shaping up the economy and the climatic conditions are isotropic, but still we are not able to make full use of agricultural resources. One of the main reasons is the lack of rains & scarcity of land reservoir water. Extraction of water at regular intervals from earth is reducing the water level as a result of which the zones of un-irrigated land are gradually increasing.
Also, the unplanned use of water inadvertently results in wastage of water. In an Automated Irrigation System using ATMega328, the most significant advantage is that water is supplied only when the moisture in soil goes below a pre-set threshold value. This saves us a lot of water. In recent times, the farmers have been using irrigation technique through the manual control in which the farmers irrigate the land at regular intervals by turning the water-pump on/off when required. This process sometimes consumes more water and sometimes the water supply to the land is delayed due to which the crops dry out. Water deficiency deteriorates plants growth before visible wilting occurs. In addition to this slowed growth rate, lighter weight fruit follows water deficiency.
This problem can be perfectly rectified if we use Automated Irrigation System in which the irrigation will take place only when there will be intense requirement of water, as suggested by the moisture in the soil.
1.8 Thesis Outline
This study comprises of five different chapters arranged sequentially. Chapter one gives a brief history of the various forms of locks and their technological advancements. Chapter two explains the operating principles of the various stages involved in the digital combination lock using microcontroller. In chapter three, the design and implementation of the whole project work is discussed fully. Chapter four presents the results and discussions drawn from tests performed on the system, while lastly; Chapter gives a conclusion and recommendation on the entire work.
CHAPTER TWO
LITERATURE REVIEW
2.0 Introduction
The development of models and strategies to control the environment of plants started with the shoot environment, that is, with the climate. One important reason was that influencing variables such as temperature, humidity, and irradiation or CO2 concentration are easier to measure and to control." (Hans P. K, 2000)
From this research, we can see that there are a few factors that need to be control in the environment. The factor that is to be considered is soil moisture.
Khriji et al (2014) presented a complete irrigation solution for the farmers based on WSN. The automated irrigation system using low-cost sensor nodes having reduced power consumption can reduce the water waste and is cost effective. A node is deployed using Telos B mote and adequate sensors/actuators. Field nodes are used to detect the level of moisture and temperature in the soil. Weather nodes monitor the climatic changes, and the nodes connected to actuators are used to control the opening of the irrigation valve when needed.
Mahir et al (2014) proposed an efficient water usage system by pump power reduction using solar-powered drip irrigation system in an orchard. Soil moisture content is analyzed by Artificial Neural Networks (ANN) to provide even distribution of water for the required location. This will prevent the unnecessary irrigation and reduce the water demand. This system reduces the orchard's daily water usage and energy consumption by 38 percentages.
Farid et al (2013) presented a practical solution based on intelligent and effective system for a field of hyper aridity. The system consists of a feedback FLC that logs key field parameters through specific sensors and a Zigbee-GPRS remote monitoring and database platform. The system is deployed in existing drip irrigation systems without any physical modification. FLC acquires data from these sensors and fuzzy rules are applied to produce appropriate time and duration for irrigation.
Singh et al (2012) presents a solution for an irrigation controller for cultivation of vegetable plants based on the fuzzy logic methodology. In this system the amount of water given to the plants depends on its size, moisture control of soil, which is affected by temperature of environment, evaporation due to wind velocity and water budget. The system feed water to plants in a controlled and optimal way. Solar energy conversion technology is used to feed power to the pump controller.
Xin et al (2013) described an autonomous precision irrigation system through the integration of a center pivot irrigation system with wireless underground sensor networks. The wireless underground sensor aided center pivot system will provide autonomous irrigation management capabilities by monitoring the soil conditions in real time using wireless underground sensors. Experiments were conducted with a hydraulic drive and continuous-move center pivot irrigation system.
Robert (2013) promoted a commercial wireless sensing and control networks using valve control hardware and software. The valve actuation system included development of custom node firmware, actuator hardware and firmware, an internet gateway with control, and communication and web interface software. The system uses single hop radio range using a mesh network with 34 valve actuators for controlling the valves and water meters.
J.S. Awati and V.S. Patil, "Automatic Irrigation Control by Using Wireless Sensor Networks". The system was integrated with sensors into a wireless monitoring network to determine and evaluate calibration functions for the integrated sensors. The system compares the measuring range and the reaction time of both sensor types in a soil layer during drying. Data were transmitted over several kilometers and made available via Internet access.
Nolz et al (2007) integrated the sensors into a wireless monitoring network to determine and evaluate calibration functions for the integrated sensors, and compare the measuring range and the reaction time of both sensor types in a soil layer during drying. The integration of the sensors into the telemetry network worked well. Data were transmitted over several kilometers and made available via Internet access.
Christos et al (2014) described the design of an adaptable decision support system and its integration with a wireless sensor/actuator network to implement autonomous closed-loop zone-specific irrigation. Using ontology for defining the application logic emphasizes system flexibility and adaptability and supports the application of automatic inferential and validation mechanisms. A machine learning process is applied for inducing new rules by analyzing logged datasets for extracting new knowledge and extending the system ontology in order to cope.
2.1 Automatic Irrigation System
An automatic irrigation system does the work quite efficiently and with a positive impact on the place where it is installed. Once it is installed in the agricultural field, the water distribution to crops and nurseries becomes easy and doesn't require any human support to perform the operations permanently. Sometimes automatic irrigation can also be performed by using mechanical appliances such as clay pots or bottle irrigation system. It's very hard to implement irrigation systems because they are very expensive and complex in their design. By taking some basic points into considerations from experts' support, we have implemented some projects on automatic irrigation system by using different technologies.
In this article, we are describing about three types of irrigation systems that work automatically and each system is an advancement of the previous one as we go from first system to the next, and so on.
The automatic irrigation system on sensing soil moisture project is intended for the development of an irrigation system that switches submersible pumps on or off by using relays to perform this action on sensing the moisture content of the soil.
2.2 Need of Automatic Irrigation
Automatic irrigation systems are convenient, especially for those who travel. If installed and programmed properly, automatic irrigation systems can even save you money and 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 with oscillator wastes 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.
2.3 Microcontroller
A microcontroller is a highly integrated chip which performs controlling functions. A microcontroller, or embedded controller, is similar to a microprocessor as used in a personal computer, but with a great deal of additional functionality combined onto the same monolithic semiconductor substrate. Microcontrollers, sometimes referred to as one-chip microcomputers, are used to control a wide range of electrical and mechanical appliances. Since they were first introduced, microcontrollers have evolved to the point where they can use for increasing complex applications. Some microcontrollers in use today are also programmable, expanding the number of application in which they can be used.
2.4 Sensors
This is an Electrical resistance Sensor. The sensor is made up of two electrodes. This soil moisture sensor reads the moisture content around it. A current is passed across the electrodes through the soil and the resistance to the current in the soil determines the soil moisture. If the soil has more water resistance will be low and thus more current will pass through. On the other hand when the soil moisture is low the sensor module outputs a high level of resistance. This sensor has both digital and analogue outputs. Digital output is simple to use but is not as accurate as the analogue output.
The soil moisture sensor is often sensing devices embedded within some sort of insulation. The insulation may often be for electrical purposes - to isolate the sensor electrically. Soil moisture sensors measure the water content in soil. A soil moisture probe is made up of multiple soil moisture sensors.
Technologies commonly used in soil moisture sensors include:
Frequency domain sensor such as a capacitance sensor.
Neutron moisture gauges, utilize the moderator properties of water for neutrons.
Electrical resistance of the soil
In this particular project, we will use the moisture sensors which can be inserted in the soil, in order to measure the moisture content of the soil.
Figure: 2.3 Sensor
Soil electrical conductivity is simply measured using two metal conductors spaced apart in the soil except that dissolved salts greatly alter the water conductivity and can confound the measurements. An inexpensive fix is to embed conductors in a porous gypsum block which releases calcium and sulphate ions to swamp the soil background level of ions. The water absorbed by the block is correlated with soil water potential over the range -60 to -600 kPa providing a tertiary indicator for use in medium to heavy soils. Non-dissolving granular matrix sensors are now available with a more exacting specification for the range 0 to -200 kPa and use internal calibration methods to offset variations due to solutes and temperature.
Methods for exploiting soil dielectric properties actually measure proxy variables that more or less include a component due to the soil electrical conductivity and are thus inherently sensitive to variations in soil salinity and temperature as well as water. Measurements are also affected by soil bulk density and the proportion of bound and free water determined by the soil type. Nevertheless, good accuracy and precision can be achieved under specific conditions and some sensor types have become widely adopted for scientific work.
2.4.1 Functional Description of Sensor
For conversion of change in resistance to change in voltage, the sensor is connected with a 200kΩ resistor in series to form a potential divider arrangement.
It gives a voltage output corresponding to the conductivity of the soil. The conductivity of soil varies depending upon the amount of moisture present in it. It increases with increase in the water content of the soil. The higher the water contents of the blocks, the lower the electrical resistance.
The voltage output is taken from the output terminal of this circuit. The moisture sensor is immersed into the specimen soil whose moisture content is under test.
The soil was examined under three conditions:
1. Dry condition:
The sensor is placed in the soil under dry conditions and embedded up to a fair depth of the soil. In dry condition, as there is no conduction path between the two copper leads the sensor gives a high resistance value (nearly 700 kΩ). The voltage output of the potential divider in this case ranges from 2.2 V to lower optimum level (3 V).
2. Optimum condition:
When water is added to the soil, it percolates through the successive layers of it and spreads across the layers of soil due to capillary force. This increases the moisture content of the soil. Thus a conductive path is established between the two copper leads. This leads to a decrease in resistance of sensor. The optimum condition of the soil can be set manually depending on the type of soil.
3. Excess wet condition:
With the increase in water content beyond the optimum level, there is drastic increase in the conductivity of the soil and the sensor resistance is further decreased to around 50kΩ. The voltage output of the potential divider in this case ranges from upper optimum level 5V to 10V.
In general, conversions from raw sensor readings to volumetric moisture content or water potential using secondary or tertiary methods tend to be sensor or soil specific, affected or precluded at high salinity levels and dependent on temperature. Research-grade instruments typically have laboratory measured accuracy worse than +/- 4% when relying on factory settings or as good as +/- 1% when calibrated for the specific soil. Sensors based on the TDR method seem to require least calibration but may be unsuitable for soils with very high salinity or clay content. There are no comparable laboratory specifications for granular matrix sensors, possibly because they are technically more difficult to calibrate, their response times are relatively slow and the output is hysteretic for wetting and drying curves.
Soil dielectric measurement is the method of choice for most research studies where expertise is available for calibration, installation and interpretation, but scope for cost reduction through sensor multiplexing is limited due to the possibility of stray capacitances. A lower manufacturing cost is possible through development of application specific integrated circuits (ASICS), though this requires a high level of investment. Multiple sensors are required to provide a depth profile and cover a representative area, but this cost can be minimized through use of a computer model to extend the measurements in a predictive way. Thus, by using the moisture sensors, the over-riding factor will be reliable, cost- effective sensors and electronic systems for accessing and interpreting the data.
2.4.2 Soil Moisture Sensor Has the Following Specifications
Name
Specification
Vcc power supply
3.3V or 5V
Current
35mA
Signal output voltage
0-4.2V
Digital Outputs
0 or 1
Analog
Resistance ( )
Panel Dimension
3.0cm by 1.6cm
Probe Dimension
6.0cm by 3.0cm
GND
Connected to ground
Table 1: Soil Moisture Sensor Specifications
Irrigation is the most important cultural practice and most labor intensive task in daily greenhouse operation. Knowing when and how much to water is two important aspects of irrigation. To do this automatically, sensors and methods are available to determine when plants may need water. (Dr. Peter Ling, 2005)
In this project, it suggested we use soil moisture detector to do irrigation. Two suggested soil moisture detector are tensiometer and dielectric sensor. Advantage of a tensiometer is that they are not affected by the temperature of the soil water solution or the osmotic potential (the amount of salts dissolved in the soil water), as the salts can move into and out of the ceramic cup freely. Therefore tensiometer readings are not affected b y electro-conductivity (EC) o r soil temperature. But, this type of sensor will need maintenance. Water in the tensiometer cavity needs frequent refilling when tensiometers are used in dry environments where the tensiometer becomes a source of water that seeps out due to drier surrounding soil.
2.4.3 Soil Moisture Sensors Equation
A soil moisture sensor is a device that measures the volumetric water content (VWC) of soil. Mathematically VWC, θ, is given as follows;
Where: Vw is the water volume and
VT is the total volume (soil volume + water volume).
Soil moisture sensors are classified according to how they measure the soil moisture content. Two methods are used in determining the volumetric water content (VWC); direct and indirect. The direct method entails drying a known volume of soil in an oven and weighing it. The direct method of measuring VWC is done using the following mathematical notation:
Where:
Mwet is soil sample before drying in the oven
Mdry is soil sample after drying in the oven
ρw is water density
Vb is the volume of soil sample before
Indirect method is based on correlating soil physical and chemical properties with water content. Three techniques are used in this method namely: chemical titrations, geophysical sensing and satellite remote sensing.
Chemical titration determines the moisture loss in sample soil after freeze drying or heating. Satellite remote sensing uses microwave radiation to check on the difference in dielectric properties of dry and wet soils. Geophysical sensing uses physical devices which are inserted in the soil to determine the soil moisture content. Techniques used in this method include: electrical resistance, electrical conductivity, soil dielectric, soil tension, TDR, FDR, soil capacitance among others.
A controlled irrigation system can include a control device for determining whether to irrigate soil and at least one irrigation structure having an actuator for controlling water flow. The actuator can be communicably coupled to the control device for delivering water to irrigate a region. The controlled irrigation system further can include at least one time domain reflectometry sensor ("TDRS") located in the soil and communicably coupled to the control device for measuring soil moisture where the control device determines whether to irrigate the soil based on data from the at least one TDRS. Additionally, a method for controlling an irrigation system can include providing multiple. TDRS's having probes, distributing each TDRS at a different soil depth, measuring soil moisture content, and irrigating soil based on the measuring step. (Dukes, Michael D. et al., 2005)
2.4.4 Sensor Installation
A single sensor can be used to control the irrigation for many zones (where an irrigation zone is defined by a solenoid valve) or multiple sensors can be used to irrigate individual zones. In the case of one sensor for several zones, the zone that is normally the driest, or most in need of irrigation, is selected for placement of the sensor in order to ensure adequate irrigation in all zones.
Some general rules for the burial of the soil moisture sensor are:
Sensors should be buried in the root zone of the plants to be irrigated, because this is where plants will extract water. Burial in the root zone will help ensure adequate turf or landscape quality. For turf grass, the sensor should typically be buried at about three inches deep.
Sensors need to be in good contact with the soil after burial; there should be no air gaps surrounding the sensor. Soil should be packed firmly but not excessively around the sensor.
If one sensor is used to control the entire irrigation system, it should be buried in the zone that requires water first, to ensure that all zones get adequate irrigation. Typically, this will be an area with full sun or the area with the most sun exposure.
Sensors should be placed at least 5 feet from the home, property line, or an impervious surface (such as a driveway) and 3 feet from a planted bed area.
Sensors should also be located at least 5 feet from irrigation heads and toward the center of an irrigation zone.
Sensors should not be buried in high traffic areas to prevent excess compaction of the soil around the sensor.
2.5 Valve
Solenoid valves are electromechanical valves that are controlled by stopping or running an electrical current through a solenoid, in order to change the state of the valve. A solenoid is a coil of wire that is magnetized when electricity runs through it. The solenoid valve makes use of this solenoid in order to activate a valve, thus controlling water flow, airflow and other things with electricity. Basically, there are three types of solenoid valves: the general-purpose type, low- pressure steam type and the high pressure steam type. (Jimmy Sturo, 2006)
In this article, it stated that there are three types of solenoid valve which are general-purpose type, low pressure steam type and the high pressure steam type. Valve is one the components that will need maintenance. The solenoid valve can get damaged after a period of time. Thus, a replacement solenoid will be needed.
2.6 Water Level Monitoring
The model consists of a series of tanks arranged one below the other. The volume of the tanks is in descending order (The highest tank being the largest). Water flows from the top tank through outlets at the bottom. Three tanks or trophic levels chosen for the model is the optimum number required to analyze the effect of top down and bottom up controls. Each tank has two outlets, outlet a. and outlet b. Each outlet has the water flow through it regulated by means of valves. These valves are controlled by floats in the tanks. Valve of each tank is controlled by the level of water in the tank above it (preceding) while valve b is controlled by the level of the water in the given tank itself. The water from the last tank and outlets a flow into a large basin from which the water is re-circulated to the 1st tank. (Maurice S. D, 2005)
In this journal, it discuss on the mod el of a flow control. This model can used to control the flow control of the water in the tank. From this model, the idea for monitoring water level is produced. This is to ensure that the plant will always get water even though drought happens.
2.7 Arduino Uno Micro Controller Description
The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.
2.7.1 ATmega328P
Features:
28-pin AVR Microcontroller
Flash Program Memory: 32 Kbytes
EEPROM Data Memory: 1 Kbytes
SRAM Data Memory: 2 Kbytes
I/O Pins: 23
Timers: Two 8-bit / One 16-bit
A/D Converter: 10-bit Six Channel
PWM: Six Channels
RTC: Yes with Separate Oscillator
MSSP: SPI and I²C Master and Slave Support
USART: Yes
External Oscillator: up to 20MHz
Figure 2.7.1 ATMEGA 328 (Pin Configuration)
2.7.2 Physical Characteristics
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB connector and power jack extending beyond the former dimension. Four screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 16 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins. Interface almost anything; the best choice for beginners – this is the Arduino UNO board. Using an ATmega328 microcontroller and 14 I/O pins, Arduino UNO is one of the most popular development boards in robotics and electronics as well. We take a look around and select the best tutorials to start working with the board. From tutorials to setup Arduino UNO, and up to blink an LED or how to control a robot wirelessly using an Android phone. This article is a good starting point and a good introduction to Arduino UNO board.
Figure: 2.7.2 ArduinoUno IDE
2.7.3 Steps for Using Arduino IDE
Step 1
Arduino microcontrollers come in a variety of types. The most common is the Arduino UNO, but there are specialized variations. Before you begin building, do a little research to figure out which version will be the most appropriate for your project.
Step 2
To begin, you'll need to install the Arduino Programmer, aka the integrated development environment (IDE).
Step 3
Connect your Arduino to the USB port of your computer. This may require a specific USB cable. Every Arduino has a different virtual serial-port address, so you'll need to reconfigure the port if you're using different Arduinos.
Step 4
Set the board type and the serial port in the Arduino Programmer.
Step 5
Test the microcontroller by using one of the preloaded programs, called sketches, in the Arduino Programmer. Open one of the example sketches, and press the upload button to load it. The Arduino should begin responding to the program: If you've set it to blink an LED light, for example, the light should start blinking.
Step 6
To upload new code to the Arduino, either you'll need to have access to code you can paste into the programmer, or you'll have to write it yourself, using the Arduino programming language to create your own sketch. An Arduino sketch usually has five parts: a header describing the sketch and its author; a section defining variables; a setup routine that sets the initial conditions of variables and runs preliminary code; a loop routine, which is where you add the main code that will execute repeatedly until you stop running the sketch; and a section where you can list other functions that activate during the setup and loop routines. All sketches must include the setup and loop routines.
Step 7
Once you've uploaded the new sketch to your Arduino, disconnect it from your computer and integrate it into your project as directed.
Step 9
Upload the program now; simply click the "Upload" button in the environment. Wait a few seconds - you should see the RX and TX lids on the board flashing. If the upload is successful, the message "Done uploading." will appear in the status bar.
2.8 Liquid Crystal Display (LCD)
Liquid Crystal Display (LCD) screen is an electronic display module. An LCD has a wide range of applications in electronics. The most basic and commonly used LCD in circuits is the 16x2 display. LCDs are commonly preferred in display because they are cheap, easy to programme and can display a wide range of characters and animations. A 16x2 LCD have two display lines each capable of displaying 16 characters. This LCD has Command and Data registers. The command register stores command instructions given to the LCD while the Data register stores the data to be displayed by the LCD.
Figure 2.8 LCD (16X2)
When using 8-bit configuration all 8 data pins (DB0-DB7) are used while only 4 data pins (DB4- DB7) are used in a 4-bit configuration.
Pin number
Function
Symbol
1
Ground (0V)
VSS
2
Supply voltage (5V)
VDD
3
Contrast adjustment; through a variable resistor(potentiometer)
V0
4
Selects command register when low; and data register when
High
RS
5
Low to write to the register; High to read from the register
RW
6
Sends data to data pins when a high to low pulse is given
E
7
8-bit data pins
D0
8
8-bit data pins
D1
9
8-bit data pins
D2
10
8-bit data pins
D3
11
8-bit data pins
D4
12
8-bit data pins
D5
13
8-bit data pins
D6
14
8-bit data pins
D7
15
Backlight VCC (5V)
A
16
Backlight Ground (0V)
K
Table 2: LCD Pin configuration
2.9 Water Pump
The water pump is used to artificially supply water for a particular task. It can be electronically controlled by interfacing it to a microcontroller. It can be triggered ON/OFF by sending signals as required. The process of artificially supplying water is known as pumping. There are many varieties of water pumps used. This project employs the use of a small water pump which is connected to a H-Bridge.
Figure 2.9 Water Pump
The pumping of water is a basic and practical technique, far more practical than scooping it up with one's hands or lifting it in a hand-held bucket. This is true whether the water is drawn from a fresh source, moved to a needed location, purified, or used for irrigation, washing, or sewage treatment, or for evacuating water from an undesirable location. Regardless of the outcome, the energy required to pump water is an extremely demanding component of water consumption. All other processes depend or benefit either from water descending from a higher elevation or some pressurized plumbing system.
2.10 Active Components
2.10.1 Transistor
A transistor is a semiconductor device used to amplify and switch electronic signals and electrical power. It is the modern miniature semiconductor equivalent of the harmonic value and was invented in 1947 by Bardeen, shocking at USA. Transistors are packaged as separate and discrete-component. There are two basic types of transistor, the bipolar junction transistor (BJT) and Field Effect transistor (FET)
It is composed of semiconductor material with at least three terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals changes the current flowing through another pair of terminals. Because the controlled (output) power can be higher than the controlling (input) power, a transistor can amplify a signal.
From the project in study, the type of transistor used belongs to the class of bipolar junction transistor. Bipolar transistor consists of three pieces of semiconductor material Sandwiched together known as base, collector and emitter. It is known as a three-terminal device. The Bipolar junction transistor (BJT) can be sub-grouped into:
1. NPN 2. PNP
(a) (b)
Fig 2.10.1: (a) NPN and (b) PNP
NPN is one of the two types of bipolar transistors, consisting of a layer of P-doped semiconductor (the "base") between two N-doped layers. A small current entering the base is amplified to produce a large collector and emitter current. That is, when there is a positive potential difference measured from the emitter of an NPN transistor to its base (i.e., when the base is high relative to the emitter) as well as positive potential difference measured from the base to the collector, the transistor becomes active. In this "on" state, current flows between the collector and emitter of the transistor. Most of the current is carried by electrons moving from emitter to collector as minority carriers in the P-type base region. To allow for greater current and faster operation, most bipolar transistors used today are NPN because electron is mobility higher than hole mobility.
The type of transistor used is the C945 that amplify electrical signal for switching the relay device. Its maximum current IC is 500mA.
Figure: 2.10.2 NPN Transistor
2.11 Silicon Diode
A diode is two terminal active, non-linear device used in containing voltage and current in a circuit. It allows current to flow in one direction, the device is said to be forward current biased when the voltage applied the diode is positive related to the cathode. The direction of forward biased the effective resistance across the diode is very low. But when reversed biased would be a perfect conductor for forward current and a perfect insulator for reverse current.
Carrying such currents requires a large junction area so that the forward resistance of the diode is kept as low as possible. Even so the diode is likely to get quite warm. The black resin case helps dissipate the heat.
The resistance to current in the reverse direction (when the diode is "off") must be high, and the insulation offered by the depletion layer between the P and N layers extremely good to avoid the possibility of "reverse breakdown", where the insulation of the diode fails due to the high reverse voltage across the junction.
Silicon diodes are made in many different forms with widely differing parameters. They vary in current carrying ability from milli-amps to tens of amps, some will have reverse breakdown voltages of thousands of volts; others use their junction capacitance to act as tuning devices in radio and TV tuners. Look in suppliers lists to see the many types available.
Fig 2.11: Diode Symbol
2.12 Passive Components
2.12.1 Resistor
A resistor is a device designed to have a specific amount of resistance to the passage of current. Resistor is used in circuit to limit current flow, provide a voltage drop or other related functions like limiting current passing through some components like the liquid crystal display (LCD), transistor and diodes. The value of each resistor determines the current flowing through it and the value can be determined by the color band on the resistor. The resistance of a resistor is a fundamental property of such resistor as shown.
R = V/I
Where;
R = Resistance of the resistor
V = voltage of the resistor
I = Current of the resistor
Resistor can be connected in series or parallel depending on the need. Its unit is measured in Ohms ()
2.12.2 Resistor in Series
The resistors are joined end-on-end as shown below. It can be proved that the equivalent resistance or total resistance between points A and D is equal to the sum of the three individual resistances.
RT = R1 + R2 + R3 + ………
2.12.3 Resistor in Parallel
They are joined in parallel, in this case the potential difference across one resistance is the same and the current in each resistor is different and is given by ohm's law
I/RT = I/R1 + I/R2 + I/R3 + ……
2.12.4 Resistor Colour Codes
Plate 1: Resistor Colour Code
The colors brown, red, green, blue, and violet are used as tolerance codes on 5-band resistors only. All 5-band resistors use a colored tolerance band. The blank (20%) "band" is only used with the "4-band" code (3 colored bands + a blank "band").
2.12.5 Potentiometer
A potentiometer, informally a pot, is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider. If only two terminals are used, one end and the wiper, it acts as a variable resistor or rheostat.
(a) External View (b) Internal View
2.13 Quartz Crystal Oscillators
An electronic circuit or electronic device that is used to generate periodically oscillating electronic signal is called as an electronic oscillator. The electronic signal produced by an oscillator is typically a sine wave or square wave. An electronic oscillator converts the direct current signal into an alternating current signal. The radio and television transmitters are broad casted using the signals generated by oscillators. The electronic beep sounds and video game sounds are generated by the oscillator signals. These oscillators generate signals using the principle of oscillation. One of the most important features of any oscillator is its frequency stability, or in other words its ability to provide a constant frequency output under varying load conditions. Crystal Oscillator symbol and picture;
(a) Symbol (b) Picture
2.13.1 Microprocessor Oscillator
Fig 2.13.1: Microprocessor Oscillator connection
Most microprocessors, micro-controllers and PIC's have two oscillator pins labelled OSC1 and OSC2 to connect to an external quartz crystal circuit, standard RC oscillator network or even a ceramic resonator. In this type of microprocessor application the Quartz Crystal Oscillator produces a train of continuous square wave pulses whose fundamental frequency is controlled by the crystal itself. This fundamental frequency regulates the flow of instructions that controls the processor device.
2.13.2 Quartz Crystal Oscillator Calculation
A quartz crystal has the following values after being cut, Rs = 1kΩ, Cs = 0.05pF, Ls = 3H and Cp = 10pF. Calculate the crystals series and parallel oscillating frequencies.
The series oscillating frequency is given as:
The parallel oscillating frequency is given as:
Then the frequency of oscillation for the crystal will be between 411kHz and 412kHz
2.14 Capacitor
A capacitor essentially consists of two conducting surface separated by a layer of an insulating medium called dielectric. The conducting surface may be in the form of either circular (or rectangular) plates or be of spherical or cylindrical shape. The purpose of a capacitor is to store electrical energy by electrostatic stress in the dielectric. Its plates are at different potential and it is referred to as capacitance of the capacitor. The unit of capacitance is farads (f), which may be defined as the capacitance of a capacitor between the plates of which there appears a potential difference of 1volt when it is charged by 1 coulombs of electricity.
Charge (coulombs) = capacitance (farads)
Applied p.d (volts)
Or symbol Q/V = C
Therefore Q = CV coulombs
Capacitors can be connected in parallel or in series. The resultant of capacitance of capacitors in parallel is the arithmetic sum of their respective capacitances.
CT = C1 + C2 + C3 +……….
While the reciprocal of the resultant capacitance of capacitors connected in series is the reciprocal of their respective capacitance.
I/CT = I/C1 + I/C2 + I/C3
Factors that affect the value of a capacitor depend primarily on:
Area of plates
Separation distance between plates and
The dielectric constant of the dielectric material between the plates.
2.14.1 Capacitor symbols
Capacitor Polarized capacitor
Fig 2.14.1: How to find Ceramic Capacitor
Multiplier Table (Ceramic)
Number
Multiply By (Additional # of Zeros)
0
None (0)
1
10 (1)
2
100 (2)
3
1,000 (3)
4
10,000 (4)
5
100,000 (5)
6
1,000,000 (6)
Common Temperature Coefficient Codes (Ceramic)
Code
Tolerance
C
±0.25pF
J
±5%
K
±10%
M
±20%
D
±0.5pF
Z
+80% / -20%
Table 2.14.2 General Table
Table 2.14.3: Ceramic Capacitor General Table
CHAPTER THREE
DESIGN AND IMPLEMENTATION
3.0 Introduction
The system has three major parts; Moisture sensing part, control section and the output section. The soil humidity was detected using YL-69 soil sensor (a resistance type sensor). The control unit was achieved using ATMega328 microcontroller based on arduino platform. 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; hardware and software.
3.1 Block diagram of the System
Fig 3.1: Block diagram
3.1.1 Block Diagram Description
There are three functional components in this project. They are the moisture sensors, gravity tank & reservoir sensor and the motor/water pump. Thus the Arduino Board is programmed using the Arduino IDE 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.
This project uses Arduino Uno to controls the motor. Follow the schematic to connect the Arduino to the motor driver, and the driver to the water pump. The motor can be driven by 230volt. The moisture sensor measures the level of moisture in the soil and sends the signal to the Arduino if watering is required. The motor/water pump supplies water to the plants until the desired moisture level is reached.
3.2 Hardware (System Design and Analysis)
3.2.1 Power Supply
Electrical power is the rate of movement of electrons that create energy. As a result of the electronic age many products need electrical power to perform certain activities. Being able to manipulate electrical power comes at a cost. In today's world there is always the bottom line, cost. Power supplies are the devices that can manipulate electrical power to be used in various applications. Power supplies can be expensive but there are cheaper alternative solutions that can produce the same output. A power supply includes conversion steps and has to be reliable enough not to damage what it is hooked up to. Both aspects need specific parts in a certain orientations to create those specific outputs.
3.2.2 Design of Power Supply (12V & 5V Combo 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 you will give voltage greater than 5V than your micro controller may get damaged. For avoiding this we always use a 5V power supply for micro controller circuits.
Below is a block diagram of dc power supply in which four steps are given named as:
Fig 3.2.2: Block Diagram of Power Supply
1. Transformer (Stepping Down)
2. Rectifier (ac to dc conversion)
3. Filter (Removing ripples from dc current)
4. Voltage Regulator (To set regulated dc supply)
Stepping down voltage:-First step is scale down the voltage by a step down transformer. Step down transformer converts the 230 AC voltages to the lower AC voltage. Maximum people think that a transformer give dc output voltage because we do not get shock by touching its output wire. But this is totally wrong. A step down transformer gives (alternating current) at output
Fig 3.2.3 Transformer
Mathematically:
NsNp=EsEP , Ns=Np x EsEP
And for current, I IPIS=NsNp=EsEP
Where, Ns = Secondary Turns
Np = Primary Turns
Es = Secondary Voltage
Ep = Primary Voltage
Is = Secondary Current
Ip = Primary Current
Rectifier: These are the equipment that converts the alternating current into direct current. T process of conversion from ac (alternating current) to dc (direct current) is known a rectification. These are very important circuits in the designing the dc power supply. In our power supply we are using full wave bridge rectifier. This rectifier is made up of pn-junction diodes.
Fig 3.2.4 Full Bridge Rectify Connection
When terminal 1 is positive with respect to 2, diodes D1 and D3 conduct. When terminal 2 is positive with respect to 1, diodes D2 and D4 would conduct, thereby giving a pulsating D.C output as shown below:
Voltage, V
Voltage, V
Time, t
Time, t
Fig 3.2.5 Rectifier Output
Filter: After rectification a filtering process of dc current is carried out with the help of fill because the output of the Rectifier contains some ripples or you can say distortion. So we ne to filter these distortions, in our power supply we are using a 50V 1000uF capacitor. You can also use a 25V 1000uF or 35V 1000uF capacitor instead of 50V 1000uF capacitor.
Fig 3.2.6: Capacitor Filtering connection
Fig 3.2.7 Rectified and Filtered Output Waveform
Equation below refers to the relationship between the filter capacitor and other supply parameters.
Vdc=Vs1+ Idc4FCVs
It is preferable to choose a filtering capacitor that will hold the peak-to-peak ripples at approximately 10% of the peak voltage. Therefore;
Vripple = 0.1Vpeak
Vripple = 0.1 × 16.97
Vripple = 1.697V
But also, Vripple = I/2fC for full wave
Where; I = current taken by the load, f = frequency of supply
C = filtering capacitor, C = I /2fVripple
= 0.17/ (2 × 50 × 1.697) = 1001.7µF
From this calculation, a standard capacitor of 2200µF was chosen.
Where,
Vdc = Expected DC output from the regulator
f = Supply frequency
Idc = Output current of regulator
Vs = Transformer Secondary Voltage
C = Capacitance of the filter capacitor
Voltage Regulator IC: The regulator is a single chip that regulates the ripple free rectified voltage to give a constant output voltage. Since the circuit needs a supply voltage of 12V and 5V, a 12V and 5V regulators were used. The percentage regulation or simply regulator of a power supply is given by:
% Regulation = [(Vmax – Vmin)/Vmax] × 100
Where; Vmax = maximum dc output voltage
Vmin = minimum dc output voltage
In a general form
% Regulation = [(Vno load – Vfull load)/Vfull load] × 100
The voltage regulator provides the regulated output. There are many voltage regulator ICs available in the market. For 5V dc output we are using LM7805 and for 12V dc power supply we are using LM7812.
Description:
This is a simple approach to obtain a 12V and 5V DC power supply using a single circuit. The circuit uses two ICs 7812(IC1) and 7805 (IC2) for obtaining the required voltages. The AC mains voltage will be stepped down by the transformer T1, rectified by bridge B1 and filtered by capacitor C1 to obtain a steady DC level. The IC1 regulates this voltage to obtain a steady 12V DC. The output of the IC1 will be regulated by the IC2 to obtain a steady 5V DC at its output. In this way both 12V and 5V DC are obtained. Such a circuit is very useful in cases when we need two DC voltages for the operation of a circuit. By varying the type number of the IC1 and IC2, various combinations of output voltages can be obtained. If 7806 is used for IC2, we will get 6V instead of 5V.Same way if 7809 is used for IC1 we get 9V instead of 12V.
Fig 3.2.8: Power Supply Circuit Diagram
Notes:
Assemble the circuit on a good quality PCB or common board.
The transformer T1 can be a 230V primary, 15V secondary, 1A step-down transformer.
The fuse F1 can be of 1A.
The switch S1 can be a SPST ON/OFF switch.
The LED D1 acts as a power ON indicator.
If 1A bridge B1 is not available, make one using four 1N4007 diodes.
78XX series ICs can deliver only up to 1A output current.
3.3 Switching Unit
This unit consists of a transistors (BC109) operating as a switch, relays and a DC motor.
3.3.1 Transistor
This is a three terminal, three layer device formed by adding a second p or n region to a p-n junction diode. With two n-regions and one p-region, two junctions are formed and it is known as an NPN transistor. The common emitter configuration for an NPN transistor is generally used in switching applications and it is shown below;
NPN
Fig 3.3.1: NPN Transistor
3.4 Relay Switching Circuit/Connection
This is an electromagnetic switch which is activated when a current is applied to it. A relay uses small currents to switch huge currents. Most relays use principle of electromagnetism to operate but still other operating principles like solid state are also used. A contactor is a type of relay which can handle a high power required to control an electric motor or other loads directly. Solid state relays have no moving parts and they use semiconductor devices to perform switching.
Figure 3.4: 5VDC Coil Relay
Relays are switches and thus terminologies applied to switches are also applied to relays. A relay switches one or more poles, each of whose contacts can be thrown by energizing the coil in one of three ways.
NO contacts connect the circuit when the relay is activated; the circuit is disconnected when the relay is inactive.
NC contacts disconnect the circuit when the relay is activated; the circuit is connected when the relay is inactive.
CO or double-throw (DT), contacts control two circuits: one normally-open contact and one normally-closed contact with a common terminal.
A contact relay switches one or more poles each of whose contacts can be thrown by energizing the coil in three ways namely; normally open(NO), normally closed(NC) or change over(CO). Just like manual switches the relay switch part is available in various configurations. Double pole, double throw (DPDT) configuration is most common configuration. DPDT means that the relay separately controls two switches that work together. Both switches have a normally NO and NC contacts. Other commonly used configurations are:
SPST – Single Pole Single Throw. This relay configuring has four terminals. Two of the terminals are coil terminals.
SPDT – Single Pole Double Throw. This configuring has five terminals. One of the terminals is a common terminal which connects to either of the two others.
Figure 3.4.1: Inside a SPST relay
DPST (Double Pole Single Throw):- This relay configuring has six terminals. It is equivalent to SPST in that it is actuated by a single coil.
A simple example of relay switching unit (application) where a 12VDC circuit can be used to turn on/off a 230v
Figure 3.4.2: Simple relay interfacing
Whenever a relay is driven from a circuit that has delicate components such as integrated circuits or transistors, a diode is always included across the relay coil to prevent the relay from damaging the circuit.
The working of the relay for various test conditions is tabulated below
S/ N
Voltage range
Soil condition
Q
Amplifier output (digital)
Relay
reference pin voltage
Relay
'NO' contact
Water pump operation
1
> 5V
Excess wet
0
1
1
open
OFF
2
< 5V &
> 3V
Optimally
Wet
0
1
1
open
OFF
Optimally
Dry
1
0
0
closed
ON
3
< 3V
Dry
1
0
0
closed
ON
Table 3.4: Operation of relay for various soil moisture conditions
3.5 Sensing Unit
3.5.1 Soil Moisture Sensor Connection to Arduino
Soil moisture sensor was interfaced to the arduino through a digital a PCB drive. The PCB drive has a digital potentiometer. The digipot is used to alter the sensitivity of the sensor when connected in digital mode. The out of the PCB drive has four connections pins as shown in the table below.
Sign
Connect
Vcc
Connected to 5VDC
GND
Connected to ground
A0
Analog value output connector
D0
Digital value output connector(0 or 1)
Table 3.5.1: PCB pins
The analogue configuration was selected as its more stable compared to the digital configuration. The PCB drive pin A0 was connected to the arduino analog pin A0.
Figure 3.5.1: Connection to arduino board
The output of the sensor to the arduino analog pin A0 was resistance. 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 (Iout) for different soils and different soil moisture levels was calculated as shown below:
Iout = Vcc{Soil Resistance value (RS)}
Equation 3.5 Current calculation
3.6 Output Units
3.6.1 Testing LCD interface with Arduino
To affect display a 16x2 Liquid Crystal Display (LCD) was chosen. LCD pins D4, D5, D6 and D7 were used as data lines in a 4 bit mode configuration. These pins were connected to arduino pins 5, 4, 3 and 2 respectively. Pin 15(A) was connected to Vcc and pin 16 (K) was connected to GND. These pins (A and K) are for the LEDs integrated on the LCD circuit board. LCD's pin E (Enable) was connected to digital pin 11 on the arduino board. Pin RS (Register Select) on the LCD was connected to arduino digital pin 12. R/W pin of the LCD was connected to GND (ground). The figure below shows the LCD-microcontroller interface.
Figure 3.6.1: LCD Connection to Arduino Board
3.7 Testing Water Pump Connection to the Arduino
To implement the final bit of the automated irrigation system an electric motor (240VAC) 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 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. As was the case with LEDs ohms law was used as shown below.
Rmin= 5-0.7V40mA = 107.5
A resistor of 470 was selected and thus the current through the transistor was limited to;
I = 4.3V / 470 = 9.12 mA
To protect the microcontroller from back e.m.f during switching a diode was connected across the relay. The connection was as shown below.
Figure 3.7 Relay interfacing of arduino to the 230VAC pump
3.8 Software Design (Programming)
3.8.1 Proteus ISIS
Proteus allows engineers to run interactive simulations of real designs for circuit simulation. It has a range of simulator models for popular micro-controllers and a set of animated models for related peripheral devices such as LED and LCD displays, keypads and more. It is possible to simulate complete micro-controller systems and thus to develop the software for them without access to a physical prototype.
It has simulated our hardware model using the software Proteus ISIS. The simulator models such as Atmega328, LED, LCD display, Switches, pot, Relay, Resistors, Transistor and sources were used and results were verified with hardware results.
3.8.2 Programming
The Arduino Uno can be programmed with the Arduino IDE software. The Arduino microcontroller is an easy to use yet powerful single board computer that has gained considerable traction in the hobby and professional market. The Arduino is open-source, which means hardware is reasonably priced and development software is free. The Arduino Uno board features an Atmel ATmega328 microcontroller operating at 5 V with 2 Kb of RAM, 32Kb of flash memory for storing programs and 1 Kb of EEPROM for storing parameters. The clock speed is 16 MHz, which translates to about executing about 300,000 lines of C source code per second. The board has 14 digital I/O pins and 6 analog input pins. There is a USB connector for talking to the host computer and a DC power jack for connecting an external 6-20 V power source, for example a 9 V battery, when running a program while not connected to the host computer. Headers are provided for interfacing to the I/O pins using 22 g solid wire or header connectors.
The Arduino programming language is a simplified version of C/C++. If you know C, programming the Arduino will be familiar. If you do not know C, no need to worry as only a few commands are needed to perform useful functions. An important feature of the Arduino is that you can create a control program on the host PC, download it to the Arduino and it will run automatically. Remove the USB cable connection to the PC, and the program will still run from the top each time you push the reset button. Remove the battery and put the Arduino board in a closet for six months. When you reconnect the battery, the last program you stored will run. This means that you connect the board to the host PC to develop and debug your program, but once that is done, you no longer need the PC to run the program.
3.8.3 Flow Chart of the System
Initialize ProcessorIs Tank Full?Is Tank Dry?Is Soil WET?Monitor Soil Sensor InputSTART
Initialize Processor
Is Tank Full?
Is Tank Dry?
Is Soil WET?
Monitor Soil Sensor Input
START
Yes
Close Tap,Turn off pump, Turn ON LEDClose Tap,Turn ON pump, Turn ON LEDOpen Tap,Turn ON pump, Turn ON LEDOpen Tap,Turn OFF pump, Turn ON LED No
Close Tap,
Turn off pump, Turn ON LED
Close Tap,
Turn ON pump, Turn ON LED
Open Tap,
Turn ON pump, Turn ON LED
Open Tap,
Turn OFF pump, Turn ON LED
No Yes No Yes
3.6.4 Source Code
Figure 3.8.3: Flowchart of Program Executed by Microcontroller
CHAPTER FOUR
TESTS, RESULTS AND DISCUSSION
4.0 Introduction
This chapter deals with the description of tests performed on the various sections of the overall system and their corresponding results as well as the result of the overall system. In order to verify the correct functionality of the system, each component had to be tested individually. To achieve the effective testing of these various components, the following tools were used:
Digital Multimeter
Vero board/Bread board
Sensor Probes
Soldering Iron & Lead Cable
Light emitting diodes
Proteus and Multisim LAB simulation software
Designing the PBC board, mounting the component and soldering them
Arduino Uno board
USB programming cable (A to B)
Solid wire for connections
The testing was done on each and every components/sections that make up the circuit to ensure proper and satisfactory operation of the safe lock. The debugging was done using the Arduino Uno and Proteus LAB simulation software; Each and every section of the code was debugged properly to ensure proper functionality thus a step debugging was done. This is a facility in the Arduino Uno and Proteus LAB simulation software that enables you step into program and at the same Time views the registers and flag settings.
4.1 Working Principle of the Overall System
The system consists of Soil Moisture Sensor, a PIC Microcontroller and a Relay interface board. The irrigation system consists of lanes through which each segment of the land is flooded and the flooding is controlled using valves as shown in the Figure 5. There is also a motor pump that is used to fill the water Tanker.
Fig: 4.1: Simple wiring diagram of the system
4.2 Power Supply
The power supply unit of +5V and +12V were tested for the output voltage under no-load and full-load conditions.
Under no-load, the voltage of the +5V supply section was measured to be 4.95V while that of the +12V supply was measured to be 11.94V. At full- load, the respective voltages were measured as 4.85V and 11.83V.
4.2.1 Voltage Regulation (V.R)
V .R VNL VFL 100 %
VNL
Where,
VNL = No-load Voltage
VFL = Full-load Voltage
For the units operating on +5V,
V .R 4.95 4.85 100 % = 2.02 %
4.95
For the units operating on +12V,
V .R 11.89 11.41 100 % = 4.03 %
11.89
From the results obtained above, the performance of the power supply is satisfactory.
4.3 Result Analysis
4.3.1 Simulation results using MultiSim
By varying the resistance (700 kΩ) in the potential divider circuit as a representation for the dry/wet condition of the sample soil, the circuit was tested and the results are tabulated below:
S/N
Soil Moisture level
Output of the sensor circuit (in Volts)
Output of the main pump controlling circuit (in Volts)
1
Below lower level
2.375
0
2
Increasing but below higher level
3.262
0
3
More than higher level
5.265
10
4
Decreasing but higher than lower level
4.372
10
Table 4.3.1: Simulation results
4.3.2 The working of the relay for various test conditions is tabulated below
S/N
Voltage range
Soil condition
Q
Amplifier output (digital)
Relay
reference pin voltage
Relay 'NO' contact
Water pump operation
1
> 5V
Excess wet
0
1
1
open
OFF
2
< 5V &
> 3V
Optimally wet
0
1
1
open
OFF
Optimally dry
1
0
0
closed
ON
3
< 3V
Dry
1
0
0
closed
ON
Table 4.3.2: Operation of relay for various soil moisture conditions
4.3.3 Soil Condition Analysis
The VWC Of sand soil, red soil and black soils were calculated. The raw data collected from the soil moisture sensor was recorded as shown in table 4.4.3. The soil was measured in equal amount of 250gramms. Water was added in the soils in steps and the sensor values recorded.
Soil water content (cm3 )
Sensor Reading
Loam soil Sand soil
Red soil
0
1021 1022
1020
50
580 546
781
75
360 234
568
100
237 243
295
125
203 184
274
150
191 180
235
175
180 170
220
The data obtained from the sensor reading and recorded in table 3.1 was used to plot a graph
of Soil water content against sensor reading.
Figure 4.3.3: Graph of Soil Condition
Comment:
The SMS (YL-69) used is a resistance sensor type. Its output is the resistance in the soil between the two SMS probes. The obtained graph is an exponential one. The value of the soil resistance decreases with increase in water content to a certain point.
To come up with the results the three soils were dried using a frying pan until all the moisture content was lost. 250 grams was measured for the red soil, black soil and the sand soil. Water was added in steps of 25cm3 and sensor value recorded. The value of soil sensor at dry soil was almost equal for the three soils at 1021, 1022, 1020 for black soil, sand soil and red soil respectively. On adding 50cm3 the resistance value reduced drastically to the range of 500. On adding more water the resistance value kept reducing. At around 100cm3 of water the reduction on the soil resistance stated reducing at a much 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 via a relay circuit. The three states were indicated using three different LEDs and an LCD. The LCD also indicated when the pump was running. The control circuit and the sensor circuit were powered using a 9V alkaline battery which was connected via a voltage regulator with an output of 5V.
4.4 Discussion
In this design, not all benchmark elements have been fully studied and tested. This was mostly due to time constraints. However, the following observations were made:
The installation of the automated irrigation system is very simple. The layout of the geotextile is the most cumbersome step. No technician is required. An installation manual should be provided to the user as well as a chart of the water needs of common houseplants and a list of compatible soil types. The pipe network should also be easy to set up. A tank and a compatible pipe may be included or recommended by the manufacturer. More elaborate work may be required to connect the valve to the water mains.
Water savings have not been studied for the system as a whole. Nevertheless, the performance of the geotextile and of the moisture probe has been demonstrated by previous experiments in real agricultural contexts.
An experiment showed that it is difficult to maintain a constant soil moisture level with only human feedback. In the short periods over which this system has been tested, virtually no human intervention was required. The user must only verify that the system is operational and that the water tank, if used, is not empty. On the other hand, there is no way to inform the user of emergencies such as overflow, empty tank, component failure, etc.
Further testing should be done in a real home or greenhouse environment to assess the reliability and durability of the system. These tests should also be prolonged to determine the significance of the savings in water and labour. Furthermore, all measurements and tests were done on a very limited collection of plants of a single species. Different plants have different water requirements and are unequally resistant to deficiencies in the water supply.
All the components were selected to achieve some degree of power efficiency. All the electronic components consume less than 400mW on a constant basis. The probe consumes a maximum of 41mW, but only for one minute per 5:20-hour duty cycle; in average, it should require less than a milliwatt. The valve is the element that uses the most power (8.41W maximum, 26mW average). On average, the whole system should require less than 450mW of electricity with peak consumption of less than 8.9 W.
Regular maintenance of the irrigation system is not required, except to refill the water tank (if used), to clean the geotextile, pipes and valve, and to replace parts when broken. Most replacement components can be found in an electronic shop or a hardware store.
CHAPTER FIVE
SUMMARY, CONCLUSION AND RECOMMENDATION
5.0 Introduction
The entire system will act as a crop and garden insurance system, as it will protect the crops by shielding it from untimely rain, hail stones, and temperature, thereby helping the farmers to get optimum cultivation. Also, it will help to make proper use of water, as the soil moisture level differs from crops to crops and this will be taken care of by the soil moisture sensor. As the entire system will be powered by solar energy which will be stored in the rechargeable batteries, one need not think of the electricity consumption, as life of solar panel which is available these days is 25 years.
5.1 Summary
The basic concept of a soil moisture sensor system is to place a sensor in a representative part of the lawn and allowing the sensor to "sense" if there is sufficient moisture in the soil for the grass. If there is sufficient moisture, then the sensor will prevent the sprinkler system from activating and applying water. However, if it senses that the soil is dry, it allows irrigation to take place. The following information is to help explain in simple terms, the different types of soil moisture sensors that are available and how they work. Also included is a short summary report of a comparative demonstration of soil moisture sensors controlling irrigation for turfgrass.
The Microcontroller based irrigation system monitors and controls all the activities of drip irrigation system efficiently. The moisture of the soil and the temperature of the surroundings will be measured and water is supplied to the crop accordingly which prevents water clogging. This system saves water because the water is directly fed to the root and the quality of the crop gets improved. It also helps in time saving, removal of human error in adjusting available soil moisture levels and to maximize their net profits.
5.2 Conclusion
Thus, the "AUTOMATIC SOIL MOISTURE SENSOR IRRIGATION SYSTEM USING MICROCONTROLLER" has been designed and tested successfully. It has been developed by integrated features of all the hardware components used. Presence of every module has been reasoned out and placed carefully, thus contributing to the best working of the unit. Thus, the Automatic Soil Moisture Sensor Irrigation System Using Microcontroller has been designed and tested successfully. The system has been tested to function automatically. The moisture sensors measure the moisture level (water content) of the different plants. If the moisture level is found to be below the desired level, the moisture sensor sends the signal to the IC (Microcontroller) which triggers the Water Pump to turn ON and supply the water to respective plant using the Rotating Platform/Sprinkler. When the desired moisture level is reached, the system halts on its own and the Water Pump is turned OFF. Thus, the functionality of the entire system has been tested thoroughly and it is said to function successfully.
5.3 Recommendation
To improve on the effectiveness and efficiency of the system the following recommendations can be put into considerations:
Cost effective techniques to overcome the limitation of requiring a soil specific calibration should be employed.
An automated irrigation was successfully designed and assembled. It serves to reduce the consumption of water used, the human monitoring time and the labour associated with standard methods.
Integrating a technology which can be used, such that whenever the water tank and reservoir is finished, it trigger the LED and alarm indicating "Empty" regarding the status of the pump.
The system can also be controlled automatically or manually.
The system can be integrated with temperature and humidity sensors to monitor the weather conditions in the farm.
This design uses a timed feedback control to measure the soil moisture and turn on the valve on demand, in regular intervals.
Such a system can be manufactured at a relatively low cost using simple electronic parts. The soil moisture probe is the most expensive component.
It can be installed easily in a home environment and requires little resources.
The design is still in a prototype stage. More tests need to be conducted before the efficiency, durability, and reliability can be demonstrated. Additionally, many improvements can be made to make the system more versatile, customizable, and user-friendly.
REFERENCE
A. Khriji et al, and B. Karuppanan, "Remote Sensing and Control for Establishing and Maintaining Digital Irrigation", International Journal of Advanced Information Technology, Vol. 2, No.1, pp.11-25, February 2012.
Christos "Maximizing Water Use Efficiency of Pearl Millet by Water and Drip Irrigation Management" Natural Resources Dept., Ins. of African Research and Studies, Cairo Univ., Egypt.., published in the 2nd International Conf. on Water Resources & Arid Environment (2014).
Farid e-tal Irrigation System Based on Wireless Network", International Conference on Control and Automation, ICCA, 2010, pp.2120-2125.
J.S. Awati and V.S. Patil, "Automatic Irrigation Control by Using Wireless Sensor Networks", Journal of Exclusive Management Science, Vol. 1, Issue 6, pp. 1-7, June 2012.
M. Yildirim and M. Demirel, "An Automated Drip Irrigation System Based on Soil Electrical Conductivity", The Philippine Agricultural Scientist, Vol. 94, No. 4, p.343-349, December, 2011.
M.A. Mazidi, R.D. McKinlay and D. Causey, PIC "Microcontroller and Embedded Systems: Using Assembly and C for PIC18", Pearson Education Inc., Upper Saddle River, New Jersey, 2008.
Mohamed Said Abdall El Marazky, Fawzi Said Mohammad and Hussein Mohamed Al-Ghobari., "Evaluation of Soil Moisture Sensors under Intelligent Irrigation Systems for Economical Crops in Arid Regions", American Journal of Agricultural and Biological Sciences 6 (2): 287-300, 2011ISSN 1557-4989.
Nolz et al and Govinda Bhandari, "EFFECT OF PRECIPITATION AND TEMPERATURE VARIATION ON THE YIELD OF MAJOR CEREALS IN DADELDHURA DISTRICT OF FAR WESTERN DEVELOPMENT REGION, NEPAL" published in International Journal Of plant, Animal and Environmental Science-Volume 3, Issue 1..
Robert, T. Boutraa, A. Akhkha, A. Alshuaibi and R. Atta, "Evaluation of the Effectiveness of an Automated Irrigation System Using Wheat Crops", Agriculture and Biology Journal of North America, Vol. 2, No. 1, pp.80-88, 2013.
R.M. Faye, F. Mora-Camino, S. Sawadogo, and A. Niang, "PC- Based Automation of a Multi-Mode Control for an Irrigation System, International Symposium on Industrial Embedded Systems", Lisbon, 4-6 July, 2007, pp.310-315.
S. Singh, and N. Sharma, "Research Paper on Drip Irrigation Management Using Wireless Sensors", International Journal of Computer Networks and Wireless Communications, Vol. 2, No. 4, pp.461-464, August 2012.
Tahar Boutraa, Abdellah Akhkha, Abdulkhaliq Alshuaibi, Ragheid Atta; "Evaluation of the effectiveness of an automated irrigation system using wheat crops." AGRICULTURE AND BIOLOGY JOURNAL OF NORTH AMERICA; ISSN Print: 2151-7517, ISSN Online: 2151-7525,doi:10.5251/abjna.2011.2.1.80.88
Rafael Muñoz-Carpena and Michael D. Dukes., "Automatic Irrigation Based on Soil Moisture for Vegetable Crops" Published in 2nd international conferrance on Irrigation And Drainage/ May 12-15./ #AE354.
Benzekri, A, Refoufi, L "Design and Implementation of a Microprocessor Based Interrupt-Driven Control for an Irrigation System",10.1109/ICELIE.2006.347214, 2006, pp: 68 – 73.
Ashok & K.Ashok,; " Microcontroller based drip irrigation system", published in technical paper in www. Engineers.com on April 30th, 2010.
Xin et al, Herbert Bryan, and Waldemar Klassen., "Automatic soil moisture based drip irrigation for improving tomato production." Proc. Fla. State. Hort. Soc. 116:80-85,2013
K.Prathyusha1, M. Chaitanya Suman2.., "DESIGN OF EMBEDDED SYSTEMS FOR THE AUTOMATION OF DRIP IRRIGATION", International Journal of Application or Innovation in Engineering & Management (IJAIEM) Volume 1, Issue 2, October 2012 ISSN 2319 -4847
APPENDIX A
Source Code
#include
#include
// LCD CONNECT (RS, E, D4, D5, D6, D7) AND RW, D3-D0 CONECT TO GND
LiquidCrystal lcd(11, 10, 8, 7, 6, 5);
const int PUMP = 13;
const int VALVE = 12;
int alarm = 1;
//ECHO AND TRIGGER PINS
const int reserviorPin= A0;
const int moisturePin= A3;
const int overheadPin = A5;
//INITIAL SETUPS
void setup()
{
pinMode(alarm, OUTPUT);
pinMode(VALVE, OUTPUT); // SET VALVE PIN AS OUTPUT
pinMode(PUMP, OUTPUT); // SET PUMP PIN AS OUTPUT
digitalWrite(alarm, LOW);
digitalWrite(VALVE, LOW);
digitalWrite(PUMP, LOW);
lcd.begin(16, 2); // 16X2 LCD TYPE
lcd.clear(); // CLEAR ALL LCD CONTENT
lcd.setCursor(0,0); // SET CHARACTER FROM COLM_4 AND LINE_1 (COLM_4 TO COLM_15)
lcd.print("Microcontroller");
lcd.setCursor(0,1); // SET CHARACTER FROM COLM_0 AND LINE_2
lcd.print("Irrigation System");
delay(5000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("By: Adamu Muh'd");
lcd.setCursor(0,1);
lcd.print("PGS/15-16/2579");
delay(5000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Supervised By:");
lcd.setCursor(0,1);
lcd.print("Engr. Musa Idi");
delay(5000);
}
void loop() {
float moisture = analogRead(moisturePin);
float moistureLevel = (300*moisture)/1024;
float overhead = analogRead(overheadPin);
float overheadLevel = (300*overhead)/1024;
float reservior = analogRead(reserviorPin);
float reserviorLevel = (300*reservior)/1024;
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moist.=");
lcd.print(moistureLevel,0);
lcd.print("% ");
lcd.setCursor(0,1);
lcd.print("Res=");
lcd.print(reserviorLevel,0);
lcd.print("% ");
lcd.print("Tnk=");
lcd.print(overheadLevel,0);
lcd.print("% ");
delay(1000);
//all low
if (moistureLevel <= 20 && overheadLevel >=30){
digitalWrite(VALVE, HIGH);
delay(10); // wait for a second
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Low Moisture");
lcd.setCursor(0,1);
lcd.print("VALVE is ON");
delay(1000);
}
if (moistureLevel >= 100){
digitalWrite(VALVE, LOW);
delay(50);
}
if (reserviorLevel >= 30 && overheadLevel <=20){
digitalWrite(PUMP, HIGH);
delay(10); // wait for a second
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Low Overhead");
lcd.setCursor(0,1);
lcd.print("PUMP is ON");
delay(1000);
}
if (reserviorLevel <= 30 && overheadLevel <=20){
digitalWrite(PUMP, LOW);
digitalWrite(alarm, HIGH);
delay(10); // wait for a second
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Low Reservior");
lcd.setCursor(0,1);
lcd.print("Alarm is ON");
delay(500);
digitalWrite(alarm, LOW);
delay(500);
}
if (overheadLevel >= 100){
digitalWrite(PUMP, LOW);
delay(50);
}
if (reserviorLevel >= 50){
digitalWrite(alarm, LOW);
delay(50);
}
}
APPENDIX B
External View of the System
Internal View of the System
Side View of the Complete System