User Tools

Site Tools


user:munashe001

SOIL MOISTURE: AUTOMATIC PLANT WATERING SYSTEM

1.

Introduction

Soil Moisture refers to the amount of water contained or held within the soils. It is regarded as a measure of soil health and is a key climate variable. Soil moisture is affected by precipitation, temperature, soil characteristics and many other variables which play a part in the environment. It plays an important role in the development of plants and their performance. The availability of fertile soils does not guarantee healthy thriving plants, if the soil moisture present does not meet the requirements of the plant to optimize its daily operations. According to an article by Greenway Biotech, the optimum soil moisture level which the plants need for survival ranges between 20% to 60%.

Soil moisture is major variable in plant functions. It acts as a solvent where nutrients and minerals are broken down for easy absorption by the roots of plant. It provides turgidity which gives the plant true stability and positioning. It further controls the exchange of heat energy and water between the land surface and the atmosphere through evaporation and transpiration. Furthermore soil moisture plays a crucial role in the development of weather patterns and the formation of precipitation. As a result soil moisture information can be taken into consideration for reservoir management, early warning of droughts, irrigation scheduling and crop yield forecasting.

As soil moisture availability declines, the functionality and growth of plants is disrupted resulting in lower crop yields. As the climate changes, moisture availability is becoming more variable. As a result the automatic plant watering system project takes into account the measurement of soil moisture of house plants by a capacitive soil moisture sensor. If the soil moisture values obtained by the sensor are below a certain value the sensor will automatically turn on the water pump which is responsible for delivering the water requirements of the plant until the optimum moisture content is achieved by the soil.

2.

Materials and Methods

The following materials and components were brought together to drive the project.

• Arduino Uno R3

• ESP32 Wrover-B Module

• Capacitive Soil Moisture Sensor

• 5V water submersible pump

• 2N2222 NPN Transistor

• Breadboard

• Jump Wires

2.1

Capacitive Soil Moisture Sensor

The capacitive soil moisture sensor determines the amount of soil moisture by measuring changes in capacitance to determine the water content of the soil. With a capacitor having the ability to store charge, a capacitive moisture sensor further measures the change in capacitance which is contributed by the changes in the dielectric. The moisture sensor rather measures the ions that are dissolved in the moisture, meaning it does not take into account the measurement of moisture directly. It mainly focuses on the dielectric which is created between the soil and water. Furthermore, the ion concentration can be affected by various factors, such as fertilizers which decrease the resistance of the soil.

Specifications • Operating Voltage: 3,3 -5,5 VDC

• Output Voltage: 0 -3.0VDC

• Operating Current: 5mA

• Interface: PH2.0-3P

• Dimensions 3.86 * 0.905 inches(L x W)

Capacitive soil moisture measuring has some advantages over the resistive soil moisture sensor. There is reduced corrosion of the probe and there is an improved reading of the moisture value as opposed to using a resistive moisture sensor.

2.2

The Arduino Uno Elegoo R3

The Arduino Uno micro-controller was considered as the core of the operations of the automatic plant watering system after the Esp32 Wrover b module failed to establish an internet connection to the internet of things. It is based on the At mega 328, meaning it is a high performance, lower power microcontroller. It has an operating voltage of 5V and can draw power via the USB connection to the computer. Compared to the esp32 the Arduino Uno can not connect to the internet of things as it does not come with an Integrated WIFI and Bluetooth

2.3

Transistor NPN 2N2222

It is regarded as of the most common NPN bipolar junction transistors meaning, it is a type of transistor which makes use of both electrons and electron holes as charge carriers. It permits a trivial current administered at one of its terminals to control a much larger current flowing between the the two terminals resulting in the switching of a particular device. The 2N2222 transistor was taken into consideration to facilitate the switching of the 5V submersible water pump. The transistor has three pins which come with it. These pins have different purposes to deliver its intended use. The bipolar junction transistor uses the terms; collector, base and emitter.

• Collector: this is the pin where the power flows in.

• Base: this is the trigger pin which is connected to the micro controller and which will be used as an output pin.

• Emitter: this is the ground side of the transistor.

Fig1. Shows how current flows from the collector to the emitter. https://www.rs-online.com/designspark/basics-of-2n2222

As a result the base which is the middle leg of the transistor is connected to digital pin 12 of the micro-controller which will be set to output as the pin mode. The emitter is connected to the ground while the collector is connected to the other leg of the 5V submersible pump.

3.

Results

Below is the the final code which is part of the results. It drives the whole project by sending instructions to Arduino micro controller to execute the performance of the components mentioned in the materials and methods.

 const int dryairvalue = 570;// this the air value of the capacitive soil moisture sensor 

 const int watervalue = 275;// this is the water value of the soil moisture sensor 

 int moisturevalue = 0; //

 int moisturepercent= 0;

 const int Sensor = A0;

 const int pumpPin = 12; 


 void setup() {

  Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
  
 pinMode(Sensor, INPUT); //Sets moisture sensor connected to analogue pin A0 to behave as an input while measuring soil moisture

 pinMode(pumpPin, OUTPUT); // Sets the pumpin connected to digital pin 12 as an Output
 }

 void loop() {

 moisturevalue = analogRead(Sensor);  //Read sensor value from the moisture sensor. The readings will be stored in the soilmoisturevalue variable.

 Serial.println(moisturevalue); // prints the value from moisture sensor to the serial monitor
 
 moisturepercent = map(moisturevalue, dryairvalue, watervalue, 0, 100);// maps the analogue values obtained from the sensor to a percentage

 if(moisturepercent >= 100) // if checks for 
 {
 Serial.println("Pump is off");
  digitalWrite(pumpPin, LOW);// the pump will maintain the off state if the soil moisture is 
  delay(5000);
 }
 else if(moisturepercent <= 0)
 {
  Serial.println("Pump is On");
  digitalWrite(pumpPin, HIGH);
  delay(5000);
 }
 else if(moisturepercent >0 && moisturepercent < 100)
 {
  Serial.print(moisturepercent);
   Serial.println("%");
 }
  delay(250);
 }
user/munashe001.txt · Last modified: 2021/09/02 12:13 by munashe001