Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering

Green House Monitoring Using Arduino

By Salman Khan

 

In today’s greenhouses, many parameter measurements are required to monitor and control for the good quality and productivity of plants. But to get the desired results there are some very important factors which come into play like Temperature, Humidity, Light and Water, which are necessary for a better plant growth. Keeping these parameters in mind I have built an Automatic Green House Controlling and Monitoring System over GSM module using Arduino. This system is very efficient for growing good quality plants. The other important part of this project is that it is fully automatic. Arduino automatically turns on and turns off the appliances. Firstly to Make this project reader needs knowledge about getting start with arduino and LCD interface with arduino.

 

Prototype of Arduino based Greenhouse Monitoring System

Fig. 1: Prototype of Arduino based Greenhouse Monitoring System

These days GSM Module is widely used in Green House Monitoring. Here in this project by using GSM Module we can keep information about the  effects of climate on plants.  The system shall also demonstrate climatic changes which affect the plant in its productivity and quality etc. The main purpose of coming up with this project is to build an Automatic Green House Monitoring in which GSM module sends the information about Temperature, Humidity, Light intensity, Soil moisture and status of appliances (Fan, Sprays, Artificial Lights and Water pump) that are connected with circuit for controlling Green House effects or Green House parameters (Temperature, Humidity, Light intensity and Water supply for plants).
 

Block Diagram of Arduino based Greenhouse Monitoring System

Fig. 2: Block Diagram of Arduino based Greenhouse Monitoring System

The four parameters that we are going to discuss are:

Temperature

The temperature sensor is used for sensing temperature. When temperature exceeds from a defined level or critical level, the system automatically turns on the fan and a message is also sent to the owner or the operator with information of all parameters (Temperature, Humidity, Light intensity and Electrical appliance on off status). And when the temperature comes in normal range or comes below the defined level the fan turns off automatically.

Humidity

Humidity is measured by using the humidity sensor. If the humidity of the environment is below the defined levels, sprays are automatically turned on and if the humidity level exceeds from the defined level sprays are automatically turned off. But here in this project instead of a spray I have used CFL light to denote the spray.   A status or notification message is also sent to the owner by the system using GSM Module.

Light Intensity

Light intensity is an important factor for the plant growth. If the light intensity is low then it affects the growth of the plants.  To resolve the problem of low light, artificial lights are used. Here in this project 100 watt bulb is used for demonstration. When light intensity is lower than a defined level, the artificial lights turns on, and when the light intensity comes in normal range artificial lights automatically turns off and a notification message is also sent to the owner.

Circuit Diagram of Light Sensing Voltage Divider Network

Fig. 3: Circuit Diagram of Light Sensing Voltage Divider Network

For detecting light intensity LDR is used. Generally light intensity is measured in LUX and therefore for demonstration 100 LUX light is used as defined or threshold level. If light intensity exceeds from 100 LUX, the artificial lights automatically turns on.

 
For more detail about light intensity circuit and measurements, please read “Solar Power Measurement System using Arduino”.

Soil Moisture

Water supply for plants is very important for good growth. So here in this demonstration I have used a water pump and a soil moisture sensor, for detecting soil moisture. Two probes of soil moisture sensor are used and placed in soil. When  the sensor does not sense moisture in soil then the system turns on the water pump until  it reaches the required level. A notification is also sent to the owner with status of water pump like Motor On or Motor Off. Here for sensing soil moisture a transistor is used as a switch.

Circuit Diagram of Soil Moisture Sensor

Fig. 4: Circuit Diagram of Soil Moisture Sensor

 

Circuit Description & Programming

Circuit Description

In this system Arduino is the heart of whole system which takes control over the process. When sensors sense any change in environment or in soil Arduino comes in action and process the required operation.
 
When soil moisture sensor does not sense moisture in soil then Arduino turns on the water pump and sends a message to the owner of status that the motor is turned on.
 
And if LDR senses low light then Arduino takes control and turns on the artificial lights.

In this system a 16×2 LCD is used for displaying status for all operations like Motor turned  on or  off, temperature, humidity and light status. The LCD’s data pins are connected in 4-bit mode (data pin d5, d6, d7, d8 pin of LCD is directly connected with pin no. 4, 5, 6, 7 of Arduino and command pin of LCD’s Rs and En is connected with pin no. 2, 3 of Arduino). LDR is used for sensing light intensity and  its output is connected to Analog pin A0 of Arduino  while the artificial light is connected using  relay. The relay is operated by using ULN2003 and controlled using pin number 10 of arduino. Humidity and temperature sensors are used for sensing humidity and temperature that are connected directly with Analog pin A1 of Arduino. Fan is directly connected with pin 8 of Arduino and CFL light (in place of Sprays) is connected with pin 11 of arduino by using Relay. Water pump is also connected by using relay and is  controlled by Arduino’s pin number 12 and the sensor for measuring the soil moisture, pin number 9 is used.

GSM module is also connected with this circuit for sensing message alert of the status to be sent to the owner. GSM module’s Rx pin is directly connected with Tx pin of Arduino. For detailed information of sending message using GSM please have a look on our previous projects related to Sending Messages using GSM module and Arduino.

Programming

Programming part of this project is very easy. In this program DHT library is used for reading the Humidity and Temperature from the humidity and temperature sensor (DHT11 basic), which is displayed on LCD and  sent to the owner by using GSM module. Here for sending message, 9600 baud rate is used by using class “Serial.begin(9600)”.

Circuit Diagram

For circuit kindly refer to the Circuit Diagram Tab of Green House Monitoring and Controlling System

Components Used

1.   Arduino Pro Mini

2.   GSM Module
 
3.   16×2 LCD
 
4.   Humidity and Temperature (DHT 11 basic)
 
5.   LDR
 
6.   Bulb
 
7.   CFL light in place of spray
 
8.   Relay 5 volt
 
9.   ULN 2003
 
10. BC 547
 
11. 50 k POT
 
12. 1 k resistor
 
13. Bread Board

14. Connecting Wire
 
15. Power Supply

Project Source Code

###

#include<LiquidCrystal.h>
#include<dht.h>

#define dht_dpin A1
#define LUX A0
LiquidCrystal lcd(2,3,4,5,6,7);

dht DHT;

#define light 10
#define fan 8
#define spray 11
#define motor 12
#define soil 9

int temperature, humidity, temp,Temp;
int check;
int test,test1,test2,test3;
float volt,lux,value;

byte degree[8] =
              {
                0b00011,
                0b00011,
                0b00000,
                0b00000,
                0b00000,
                0b00000,
                0b00000,
                0b00000
              };

void setup()
{
  Serial.begin(9600);
  lcd.begin(16,2);
 
  pinMode(soil, INPUT);
  pinMode(light, OUTPUT);
  pinMode(fan, OUTPUT);
  pinMode(spray, OUTPUT);
  pinMode(motor, OUTPUT);
 
  lcd.createChar(1, degree);
  lcd.setCursor(0,0);
  lcd.print("Green House   ");
  lcd.setCursor(0,1);
  lcd.print("  Monitering");
  delay(2000);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("By Saddam Khan");
  lcd.setCursor(0,1);
  lcd.print("ENGINEERS GARAGE");
  delay(2000);
  lcd.clear();
}

void loop()
{
  /*-----Light Intensity------*/
 
  DHT.read11(dht_dpin);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print(" humidity=");
  lcd.print(humidity=DHT.humidity);
  lcd.print(" % ");
// lcd.clear();
  lcd.setCursor(0,1);
  lcd.print("temperature=");
  lcd.print(temperature=DHT.temperature);
  lcd.write(1);
  lcd.print("C ");
  delay(2000);
  lcd.clear();
 
   value=analogRead(LUX);
   volt=(value/1023.0)*5;
   lux=((2500/volt)-500)/3.3;
   delay(10);
  
   if(lux<100)
   {
     digitalWrite(light, HIGH);
     Serial.println("AT+CMGF=1");
     Serial.println("AT+CMGS="9784398922"");
     Serial.println("LOW LIGHT ");
     Serial.println("LIGHT TURNED ON");
     Serial.print("Light Intensity: ");
     Serial.print(lux);
     Serial.println(" LUX");
     Serial.print("Temperature: ");
     Serial.print(temperature);
     Serial.println(" Degree Celsius");
     Serial.print("Humidity: ");
     Serial.print(humidity);
     Serial.println(" %");
     Serial.write(26);
     lcd.clear();
     lcd.setCursor(0,0);
     lcd.print("Low light ");
     lcd.print(lux);
     lcd.print(" LUX");
     lcd.setCursor(0,1);
     lcd.print("Lights turned ON");
     check=1;
     test=1;
     delay(2000);
   }
   else
   {
    if(check==1)
    {
    
     Serial.println("AT+CMGF=1");
     Serial.println("AT+CMGS="9784398922"");
     Serial.print("LIGHT TURNED OFF");
     Serial.print("Light Intensity: ");
     Serial.print(lux);
     Serial.println(" LUX");
     Serial.print("Temperature: ");
     Serial.print(temperature);
     Serial.println(" degree Celsius");
     Serial.print("Humidity: ");
     Serial.print(humidity);
     Serial.println(" %");
     Serial.write(26);
     check=0;
     lcd.clear();
     lcd.setCursor(0,0);
     lcd.print("light int: ");
     lcd.print(lux);
     lcd.print(" LUX");
     lcd.setCursor(0,1);
     lcd.print("Lights turned OFF");
    }
     digitalWrite(light, LOW);
     test=0;
     delay(2000);
   }
  
 
 
  if(temperature > 40)
  {
    digitalWrite(fan, HIGH);
     Serial.println("AT+CMGF=1");
     Serial.println("AT+CMGS="9784398922"");
     Serial.println("TEMPERATURE INCREASES FROM CRITICAL LEVEL");
     Serial.println("FAN TURNED ON");
     Serial.print("Light Intensity: ");
     Serial.print(lux);
     Serial.println(" LUX");
     Serial.print("Temperature: ");
     Serial.print(temperature);
     Serial.println(" degree Celsius");
     Serial.print("Humidity: ");
     Serial.print(humidity);
     Serial.println(" %");
  
     Serial.write(26);
     lcd.clear();
     lcd.setCursor(0,0);
     lcd.print("Temp increases ");
     lcd.setCursor(0,1);
     lcd.print("Fan Turned ON  ");
     delay(2000);
     lcd.clear();
     lcd.setCursor(0,0);
     lcd.print("Temperature");
     lcd.setCursor(0,1);
     lcd.print(temperature);
     lcd.write(1);
     lcd.print("C");
     check=2;
     test2=1;
     delay(2000);
   }
   else
   {
    if(check==2)
    {
     Serial.println("AT+CMGF=1");
     Serial.println("AT+CMGS="9784398922"");
     Serial.println("FAN TURNED OFF");
      Serial.print("Light Intensity: ");
     Serial.print(lux);
     Serial.println(" LUX");
     Serial.print("Temperature: ");
     Serial.print(temperature);
     Serial.println(" degree Celsius");
     Serial.print("Humidity: ");
     Serial.print(humidity);
     Serial.println(" %");
    
     Serial.write(26);
     check=0;
     test1=0;
    }
   digitalWrite(fan, LOW);
   delay(1000);
   }
 
  if(humidity < 30)
  {
     digitalWrite(spray, HIGH);
     digitalWrite(13, HIGH);
     Serial.println("AT+CMGF=1");
     Serial.println("AT+CMGS="9784398922"");
     Serial.println("HUNIDITY INCREASES FROM DEFINED LEVEL ");
     Serial.println("SPRAY TURNED ON");
      Serial.print("Light Intensity: ");
     Serial.print(lux);
     Serial.println(" LUX");
     Serial.print("Temperature: ");
     Serial.print(temperature);
     Serial.println(" degree Celsius");
     Serial.print("Humidity: ");
     Serial.print(humidity);
     Serial.println(" %");  
    
     Serial.write(26);
     lcd.clear();
     lcd.setCursor(0,0);
     lcd.print("Humidity increas");
     lcd.setCursor(0,1);
     lcd.print("Spray Turned ON  ");
     delay(2000);
     lcd.clear();
     lcd.setCursor(0,0);
     lcd.print("Humidity");
     lcd.setCursor(0,1);
     lcd.print(humidity);
     lcd.print(" %");
     check=3;
     test2=1;
     delay(2000);
   }
   else
   {
    if(check==3)
    {
     Serial.println("AT+CMGF=1");
     Serial.println("AT+CMGS="9784398922"");
     Serial.println("SPRAY TURNED OFF");
      Serial.print("Light Intensity: ");
     Serial.print(lux);
     Serial.println(" LUX");
     Serial.print("Temperature: ");
     Serial.print(temperature);
     Serial.println(" degree Celsius");
     Serial.print("Humidity: ");
     Serial.print(humidity);
     Serial.println(" %");
     Serial.write(26);
     check=0;
    }
     digitalWrite(13, LOW);
     digitalWrite(spray, LOW);
     test2=0;
     delay(2000);
  }
  
   if(digitalRead(soil)==1)
   {
    digitalWrite(motor, HIGH);
    Serial.println("AT+CMGF=1");
     Serial.println("AT+CMGS="9784398922"");
     Serial.println("WATER REQUIRED ");
     Serial.println("MOTOR TURNED ON ");
     Serial.print("Light Intensity: ");
     Serial.print(lux);
     Serial.println(" LUX");
     Serial.print("Temperature: ");
     Serial.print(temperature);
     Serial.println(" degree Celsius");
     Serial.print("Humidity: ");
     Serial.print(humidity);
     Serial.println(" %");
     Serial.write(26);
    check=4;
    test3=1;
    lcd.clear();
     lcd.setCursor(0,0);
     lcd.print("Water Required ");
     lcd.setCursor(0,1);
     lcd.print("Motor turned ON");
     delay(2000);
   }
    
  else
  {
    if(check==4)
    {
     Serial.println("AT+CMGF=1");
     Serial.println("AT+CMGS="9784398922"");
      Serial.println("WATER REQUIRED ");
     Serial.println("MOTOR TURNED OFF ");
      Serial.print("Light Intensity: ");
     Serial.print(lux);
     Serial.println(" LUX");
     Serial.print("Temperature: ");
     Serial.print(temperature);
     Serial.println(" degree Celsius");
     Serial.print("Humidity: ");
     Serial.print(humidity);
     Serial.println(" %");
     Serial.write(26);
     check=0;
    }
   digitalWrite(motor, LOW);
   test3=0;
  }
  delay(100);
}

###

 


Circuit Diagrams

Circuit-Diagram-Arduino-Based-Green-House-Monitoring-System

Project Video


Filed Under: Electronic Projects
Tagged With: Arduino, bc 547, gsm, humidity sensor, ldr, temperature sensor, uln 2003
 

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Adjustable 0 to 30V 2A DC Power Supply Circuit (Part 1/13)
  • Adjustable +/- 1.25V to +/-22V 1A Power Supply Circuit (Part 2/13)
  • Adjustable 0 to 15V 1A Mini Power Supply (Part 3/13)
  • Constant 12V Power Supply for LED Circuits (Part 4/13)
  • Constant +/-9V DC Symmetrical Power Supply Circuit (Part 5/13)
  • Making a Circuit Breaker (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

“ee

“ee

“ee

“ee

“ee

“ee

Recent Articles

  • STMicroelectronics and MACOM announce successful RF GaN-on-Si prototypes
  • Infineon expands its CoolSiC portfolio
  • STMicroelectronics and AWS collaborate for secure IoT connections
  • Pet feeding system using WhatsApp (protocol bridging with MQTT)
  • STMicroelectronics launches new MDmesh MOSFETs

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd ldr led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics Research robot samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Space Vector PWM Help Needed
  • RFIC LNA cascode base and ground layout problem
  • Unable to launch virtuoso: libvisadev.so error
  • DIY test leads - source for lead ends?
  • P-Channel MOSFET always on

RSS Electro-Tech-Online.com Discussions

  • How to get lots of PCBs made cheap?
  • Adding Current Limit Feature to a Buck Converter
  • 24v dc relays not de-energising
  • How do I test amplifier speaker output polarity?
  • XOR Gate Circuit From Diodes
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering