Controlling GreenHouse From The Arduino

Introduction

 
In this article, I am going to explain about controlling a greenhouse with the help of Arduino. From this, I am going to check the temperature and humidity in the greenhouse.
 
What is a greenhouse?
  • Green house is a glass-based structure or roof made of transparent material. In this greenhouse, we can plant vegetables and flowers naturally. There are installations, heating, cooling, lighting, etc. with which we can monitor the greenhouse by the computer to optimize the conditions for plant growth.
     
     
    Figure1 - GreenHouse. 
Parts Of Lists
  • Arduino Uno
  • Relays
  • DHT11 Sensor [Temperature+Humidity sensor]
  • LCD
  • Hook Wires
  • Bread Board.
Parts Explanation
 
Relay
  • A relay is simply an act as the switch, so we can use the relay as the electrical appliances for the circuit.
     
     
    Figure2 - Relay Box 
DHT11 Sensor
 
DHT11 is a known combination of temperature sensors and humidity sensors.
 
Temperature sensor
  • It is used to measure the amount of heat energy or even coldness.
  • It may be used to detect the analog and digital output. 
Humidity sensor
  • It is a sensor, which is used to sense and measure the percentage of the humidity in the air.
  • It can also measure air temperature.
  • Humidity sensor is used for capacitive measurement.
  • These voltages are the changes, which are converted into a digital reading. 
     
     
    Figure3 - DHT11 Sensor. 
LCD Display
  • LCD is Liquid Crystal Display (LCD).
  • It can have a flat-panel or an electronic display.
  • It is used in the hospital, showrooms, buses, railway stations, airports, etc.
     
     
    Figure4 - LCD Display.
Connection
 
Step 1
 
DTH11 Sensor To Arduino Uno
  • Connect the V to the 5v of the Arduino Uno.
  • Connect the G to the Gnd of the Arduino UNO.
  • Connect the S to any input pin of the digital side as u like. 
Step 2
 
LCD Display to Arduino Uno
  • Fix the LCD in the 16 to 2 on the bread board.
  • The 16 pin to the Gnd
  • The 15 pin to the Vcc
  • The 14 pin to the Digital pin 02
  • The 13 pin to the Digital pin 03
  • The 12 pin to the Digital pin 04
  • The 11 pin to the Digital pin 05
  • The 01 pin to the Gnd.
  • The 02 pin to the Vcc.
  • The 03 pin to the potentiometer.
  • The 04 pin to the Digital pin 07.
  • The 05 pin to the Gnd.
  • The 06 pin to the Digital pin 06.
Programming
  1. #include "DHT.h"    
  2.     
  3. #define DHTPIN 2         
  4. //#define DHTTYPE DHT11   // DHT 11     
  5. #define DHTTYPE DHT22   // DHT 22  (AM2302)    
  6. //#define DHTTYPE DHT21   // DHT 21 (AM2301)    
  7. void setup() {    
  8.   Serial.begin(9600);     
  9.   Serial.println("DHTxx test!");    
  10.      
  11.   dht.begin();    
  12. }    
  13.     
  14. void loop() {    
  15.   // Wait a few seconds between measurements.    
  16.   delay(2000);    
  17.     
  18.   float h = dht.readHumidity();    
  19.   // Read temperature as Celsius    
  20.   float t = dht.readTemperature();    
  21.   // Read temperature as Fahrenheit    
  22.   float f = dht.readTemperature(true);    
  23.   if (isnan(h) || isnan(t) || isnan(f)) {    
  24.     Serial.println("Failed to read from DHT sensor!");    
  25.     return;    
  26.   }    
  27.     
  28.       
  29.   float hi = dht.computeHeatIndex(f, h);    
  30.     
  31.   Serial.print("Humidity: ");     
  32.   Serial.print(h);    
  33.   Serial.print(" %\t");    
  34.   Serial.print("Temperature: ");     
  35.   Serial.print(t);    
  36.   Serial.print(" *C ");    
  37.   Serial.print(f);    
  38.   Serial.print(" *F\t");    
  39.   Serial.print("Heat index: ");    
  40.   Serial.print(hi);    
  41.   Serial.println(" *F");    
  42. }   
    Explanation
    • In this article, I explained the control of the green house effect in the Arduino Uno. It will detect the temperature at the greenhouse in the LCD display. From this, we can monitor the temperature by using the DTH11 sensor in the greenhouse, if the temperature and humidity are not in good condition, it will display in the LCD display. 
    Output
     
     
    Figure5 - LCD Display