I have worked with Riyaz on his poly house project. While working with his project, I have helped for connections of Arduino board and coding, temperature & Humidity sensor,
moisture sensor, and relay module etc.
Project Target: The Maintain good environmental conditions
for poly house crops through the temperature & humidity sensor and moisture
sensor also, it will help improve crops quality and quantity.
Automation: We have Maintain two loads Exhaust
fan and Water motor
- Temperature sensor connected with Exhaust Fan.
- Moisture sensor connected with drip irrigation.
- LCD connected an each two sensor.
Dripper (water Motor automation): The dripper switches ‘ON’ when the humidity
rises above 700 until the humidity drops down 600.
Used
components
Sr. No.
|
Components
|
Qty.
|
|
1.
|
Arduino
|
1
|
|
2
|
Temperature & humidity sensor
|
1
|
DHT11 sensor
|
3
|
Moisture Sensor
|
1
|
|
4
|
Relay – 5V
|
1
|
Two channel module
|
5
|
Fish tank Motor 230V
|
1
|
|
6
|
Jumper Wires for connection
|
||
7
|
12 Adaptor
|
1
|
|
8
|
LCD Display
|
1
|
|
9
|
MDF sheet
|
A box for circuit’s assembly.
|
Programming code :
Note:
Firstly we have to include library (DHT11) in our arduino software then code
will compile successfully. The program compile successfully. We took readings
on serial monitor.
We took
readings
#include
<LiquidCrystal.h>
#include
<dht.h>
int pos=0;
// variable to hold cursor position
LiquidCrystal
lcd(12, 10, 5, 4, 3, 2);
int greenPin
= A0;
dht sensor;
void setup()
{
lcd.begin(16,2); //16 by 2 character display
pinMode(8,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
Serial.begin(9600);
pinMode(9,OUTPUT);
}
void loop()
{
int sensorValue= analogRead(A1);
delay(1000); //wait a sec (recommended for
DHT11)
sensor.read11(greenPin);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Humidity = ");
lcd.print(sensor.humidity);
lcd.setCursor(0,1);
lcd.print("Temp = ");
lcd.print(sensor.temperature);
delay(1000); //wait a sec (recommended for
DHT11)
// print out the value you read:
Serial.println(sensorValue);
delay(1);
if(
40>sensor.humidity >60 && 22>sensor.temperature>30&&
600<sensorValue <400)
{
digitalWrite(8,HIGH);
delay(500);
digitalWrite(8,LOW);
delay(500);
lcd.setCursor(0,0);
lcd.print("EXHAUST ON ");
lcd.setCursor(0,1);
lcd.print("FOGGER ON ");
lcd.clear();
lcd.setCursor(0,0);
lcd.print("MOTOR ON");
}
else
{
digitalWrite(8,LOW);
}
if(
sensor.temperature>40)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("TEMP HIGH ");
lcd.setCursor(0,1);
lcd.print("FOGGER ON ");
digitalWrite(6,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
delay(500);
digitalWrite(8,LOW);
delay(500);
}
else if
(sensor.temperature>40)
{
digitalWrite(7,HIGH);
}
else if(sensor.temperature<35)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("TEMP LOW");
digitalWrite(6,LOW);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
delay(1000);
digitalWrite(8,LOW);
delay(1000);
}
else
{
digitalWrite(8,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);
}
if
(sensor.humidity >60)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("HUMIDITY HIGH ");
lcd.setCursor(0,1);
lcd.print("EXHAUST ON ");
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
delay(500);
digitalWrite(8,LOW);
delay(500);
}
else
if(sensor.humidity <20 && sensor.temperature <35)
{
lcd.clear();
lcd.setCursor(0,1);
lcd.print("HUMIDITY LOW ");
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
delay(500);
digitalWrite(8,LOW);
delay(500);
}
else
{
digitalWrite(8,LOW);
}
if(700<sensorValue)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("MOISTURE LOW");
lcd.setCursor(0,1);
lcd.print("MOTOR ON ");
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
delay(500);
digitalWrite(8,LOW);
delay(500);
} else if(sensorValue<300)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("MOISTURE HIGH");
lcd.setCursor(0,1);
lcd.print("MOTOR OFF ");
digitalWrite(9,LOW);
digitalWrite(8,HIGH);
delay(500);
digitalWrite(8,LOW);
delay(500);
}
else
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("MOISTURE GOOD");
lcd.setCursor(0,1);
lcd.print("MOTOR OFF");
digitalWrite(8,LOW);
digitalWrite(9,LOW);
}
}
We have done
proper connections with arduino board, relay, 12 volt adapter, LCD display etc.
We have made
proper box for assemble circuits. We have made in a box maker(designer) online
software.
For more details
follow the link.
Post a Comment