Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey 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
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Green House Monitoring Using Arduino

By Salman Khan November 11, 2014

 

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
 

Next Article

← Previous Article
Next Article →

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



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

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!


RSS EDABOARD.com Discussions

  • How to simulate a microstrip gap with such a reference plane
  • Phase Shift Full Bridge suffers spurious FET turn_ON
  • optimum spacing between feed and sub reflector
  • Equipment to see if household should buy battery/solar/inverter?
  • 'HERIC' pairs of IGBTs essential for Mains inverters

RSS Electro-Tech-Online.com Discussions

  • Epson crystal oscillators
  • Adhesive Defibrillator Pad Cable
  • Simple LED Analog Clock Idea
  • Fun with AI and swordfish basic
  • Microinverters and storeage batteries?

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • How to design a heart-rate pulse sensor BPM meter
  • Three-phase EMI filter with neutral provides >1 MOhm insulation resistance
  • Infineon adds 60 V and 150 V power MOSFETs with 30 krad(Si) TID and AEC-Q101 qualification
  • Microchip releases DSC families with 78 ps PWM resolution and 40 Msps ADCs
  • Silanna Semiconductor releases laser driver IC with 86% efficiency

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 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

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey 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
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe