user:munashe001
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
user:munashe001 [2021/09/02 03:21] – munashe001 | user:munashe001 [2021/09/02 12:04] – munashe001 | ||
---|---|---|---|
Line 1: | Line 1: | ||
| | ||
- | 1. === Introduction === | + | 1. |
+ | === Introduction === | ||
- | Soil Moisture refers to water contained within the soil and is also regarded as a measure of soil health. Soil moisture is affected by precipitation, | + | Soil Moisture refers to the amount of water contained |
- | Soil moisture is major variable in controlling | + | 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 the plant. It provides turgidity which gives the plant true stability and positioning. It further controls |
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. | 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. | ||
Line 68: | Line 69: | ||
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. | 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 dryairvalue | + | const int watervalue |
- | const int watervalue | + | int moisturevalue |
- | int moisturevalue | + | int moisturepercent= 0; |
- | int moisturepercent= 0; | + | |
- | const int Sensor | + | const int pumpPin |
- | const int pumpPin = 12; | ||
- | + | void setup() { | |
- | void setup() { | + | |
Serial.begin(9600); | Serial.begin(9600); | ||
| | ||
- | pinMode(Sensor, | + | pinMode(Sensor, |
- | pinMode(pumpPin, | + | pinMode(pumpPin, |
- | } | + | } |
- | void loop() { | + | void loop() { |
- | moisturevalue = analogRead(Sensor); | + | moisturevalue = analogRead(Sensor); |
- | Serial.println(moisturevalue); | + | Serial.println(moisturevalue); |
- | moisturepercent = map(moisturevalue, | + | moisturepercent = map(moisturevalue, |
- | if(moisturepercent >= 100) // if checks for | + | if(moisturepercent >= 100) // if checks for |
- | { | + | { |
- | Serial.println(" | + | |
digitalWrite(pumpPin, | digitalWrite(pumpPin, | ||
delay(5000); | delay(5000); | ||
- | } | + | } |
- | else if(moisturepercent <= 0) | + | else if(moisturepercent <= 0) |
- | { | + | { |
Serial.println(" | Serial.println(" | ||
digitalWrite(pumpPin, | digitalWrite(pumpPin, | ||
delay(5000); | delay(5000); | ||
- | } | + | } |
- | else if(moisturepercent >0 && moisturepercent < 100) | + | else if(moisturepercent >0 && moisturepercent < 100) |
- | { | + | { |
Serial.print(moisturepercent); | Serial.print(moisturepercent); | ||
- | | + | Serial.println(" |
- | } | + | } |
delay(250); | delay(250); | ||
- | } | + | } |
- | + | </ | |
user/munashe001.txt · Last modified: 2021/09/02 12:13 by munashe001