Collecting the data from the following sensors
SOIL MOISTURE SENSOR:-
Firstly, the soil moisture is used to get the moisture content in soil. Soil moisture sensor consists of two probes which are used to meansure the volumetric content of water based on the dielectric constant.The dielectric constant can be thought of as the soil’s ability to transmit electricity. The two probes allow the current to pass through the soil and then it gets the resistance value to measure the moisture value.
Soil moisture sensor consists of 4 pins Analog pin,Digital pin,VCC and ground pin .Here, Digital pin is choosen as input pin .Dry soil conducts electricity poorly, so when there will be less water, then the soil will conduct less electricity which means that there will be more resistance. Therefore, the moisture level will be lower.If the moisture level is low,the relay gets activated and thus activate the water pump motor so that plants get sufficient amount of water.When there is more water, the soil will conduct more electricity which means that there will be less resistance. Therefore, the moisture level will be higher. If the moisture level is high again the information is sensed and relay gets deactivated and thus switches off the motor.
DHT11 sensor meaures the humidity and temperature.
DHT11 sensor consist of a humidity sensing component, a NTC temperature sensor (or thermistor) and an IC on the back side of the sensor.A thermistor is actually a variable resistor that changes its resistance with change of the temperature. Thermistor has “Negative Temperature Coefficient”, which means that the resistance decreases with increase of the temperature.
DHT11 sensor can measure temperature till 50degree.The optimal temperature required for Plants in GreenHouse is 16°-25°C.So, the threshold is set at 22°C. When the temperature is above the threshold relay gets activated and thus Fan gets switch ON and cools down the plants.When required temperatured is achieved Fan gets off automatically.
When light falls on the LDR then the resistance decreases, and increases in the dark.When a LDR is kept in the dark place, its resistance is high and, when the LDR is kept in the light its resistance is low.Threshold is set at 500.When LDR sensed value is less than 500 bulb gets automatically ON.This sensor main purpose is used save the power.