Introduction:
Polyhouse is a new developing technology used method of farming in present days. Poly house is made up of Polyethylene sheets used to stabilize the ultraviolet rays and helps in proper photosynthesis in crops. we can protect our crops from any harmful environment such as low humidity or high temperature. There is a facility in Poly house to control temperature or humidity.
The air temperature inside polyhouse through out day is higher than outside & minimum temperature is lower inside than outside. Inside polyhouse itself we can see major temperature gradient at different points.
Objective:
- To analyze temperature & humidity datalog inside polyhouse at four different positions.
Project description:
In Vigyan Ashram polyhouse we do have different kind of plants. For proper growth of plants we adapted method like cooling fan pad system to provide proper climatic conditions.But still we didn’t get optimized results because of temperature gradient inside polyhouse. So to analyze temperature & humidity at different points throughout day & night this project is came into consideration. To get temperature & humidity reading we can use DHT series from market. But these sensor was getting damage after 4-5 days. Temperature sensing was good but humidity sensing was too poor. So we are using DS18B20 temperature sensor which can be work on principle of dry bulb & wet bulb thermometer. And to get real time reading we are using RTC module and for storing data we are using SD card module interfaces with arduino uno.
Required material:
Sr.No. | Material description | Price | Quantity |
1 | Arduino uno | 400₹ | 1 |
2 | SD card module & Memory card | 350 ₹ | 1 |
3 | RTC module | 150 ₹ | 1 |
4 | Temperature sensor DS18B20 | 95 ₹ | 2 |
5 | DC power adapter 12V,1A | 200 ₹ | 1 |
6 | Chasing | 160 ₹ | 1 |
Connections:
For connection please refer below pin mapping file—.http://vadic.vigyanashram.blog/wp-content/uploads/2020/05/Pin-mapping-file.xlsx
#include <SPI.h> //for the SD card module
#include <SD.h> // for the SD card
#include <RTClib.h> // for the RTC
#include <OneWire.h>
#include <DallasTemperature.h>
#include <String.h>
#include <Wire.h>
#define ONE_WIRE_BUS 2
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4);
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float n, t;
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600);
sensors.begin();
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
}
void loggingTemperature()
{
// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
// Read temperature as Celsius
sensors.requestTemperatures(); // Send the command to get temperature readings
t = sensors.getTempCByIndex(0);
// Serial.println(sensors.getTempCByIndex(0));
// You can have more than one DS18B20 on the same bus.
// 0 refers to the first IC on the wire
//delay(4000);
float u = sensors.getTempCByIndex(1);
float d = ((17.502*t)/(240.97+t)); // Equation for Humidity
float e = 2.7183;
float g = 6.112*(pow(e,d));
float j = ((17.502*u)/(240.97+u));
float k = 2.7183;
Serial.print("\n Humidity: ");
Serial.print(n);
float m = 6.112*(pow(k,j));
n = (m-(0.6687*(1+0.00115*u)*(t-u)))/g*100; //Humidity upto 2 digit
delay(100); //Delay 2 sec.
//Serial.print("Temperature: ");
// Serial.print(t);
// Serial.println(" °C");
// Serial.print(" %");
// delay(1000);
float v1 = t;
Serial.print("PT: ");
Serial.print(v1);
float h1 = n;
Serial.print("PH: ");
Serial.print(h1);
// Serial.println(" °C");
//Serial.print(" %");
t = 0;
n=0;
//Serial.print("Temperature before delay: ");
//Serial.print(t);
lcd.setCursor(0,1);
lcd.print("PT:");
lcd.print(v1);
lcd.setCursor(8,1);
lcd.print("PH:");
lcd.print(h1);
//Serial.println(" °C");
// Serial.print(" %");
delay(1800000);
sensors.requestTemperatures();
t = sensors.getTempCByIndex(0);
float v2 = t;
Serial.print("Temperature after delay: ");
Serial.print(v2);
lcd.setCursor(0,0);
lcd.print("CT:");
lcd.print(t);
u = sensors.getTempCByIndex(1);
d = ((17.502*t)/(240.97+t)); // Equation for Humidity
e = 2.7183;
g = 6.112*(pow(e,d));
j = ((17.502*u)/(240.97+u));
k = 2.7183;
n = (m-(0.6687*(1+0.00115*u)*(t-u)))/g*100;
float h2 = n;
Serial.print("\n Humidity after delay: ");
Serial.print(h2);
lcd.setCursor(8,0);
lcd.print("CH:");
lcd.print(n);
delay(100); //Delay 2 sec.
// Serial.println(" °C");
//Serial.print(" %");
Serial.print("Temperature after diffrence: ");
float v3 =v2-v1;
Serial.print(v3);
Serial.print("Humidity diffrence: ");
float h3 =h2-h1;
Serial.print(h3);
Serial.println(" °C");
Serial.print(" %");
if(v3<-3 || v3>3 || h3<-5 || h3>5 )
{
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(120000); // wait for a second
}
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(100);
//Serial.print(f);
//Serial.println(" *F\t");
}
void loop()
{
loggingTemperature();
delay(100);
}