Features :
· SMS notifications
· Valuable information collection
· Detailed data analysis
· Cost effective
· Easy to implement
Components Required:
· Arduino UNO
· Wiz750SR
· Analog Soil Moisture Sensor
· Motor
· Rain Sensor
· DHT11 sensor
· PIR sensor
· LED
· Buzzer
· Bread board and connecting wire
SOFTWARES REQUIRED
· Arduino software
· MBED compiler
· ISP Tool
· Hercules
· MIT App maker
SOURCE CODE
ARDUINO CODE
#include<SoftwareSerial.h>
#include<dht.h>
#include"DHT.h"
#definedht_apin A2
dht DHT;
intPIR_output=5;
int led=13;
intbuzzer=12;
SoftwareSerialmySerial(10, 11); // RX, TX
intnRainIn=A1;
intnRainDigitalOut = 2;
intnRainVal;
booleanbIsRaining = false;
StringstrRaining;
const intVAL_PROBE = 0; //Analog pin 0
const intMOISTURE_LEVEL = 500; // the value after the LED goes on
void setup(){
// Open serial communications and wait forport to open:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect.Needed for native USB port only
}
// set the data rate for the SoftwareSerialport
mySerial.begin(9600);
pinMode(2,OUTPUT);
pinMode(PIR_output,INPUT);
pinMode(led,OUTPUT);
pinMode(buzzer,OUTPUT);
pinMode(8,OUTPUT);//motor
pinMode(7,INPUT);//moisture
}
void loop(){
motor();
rain();
temp();
pir();
}
void rain()
{
nRainVal = analogRead(A1);
bIsRaining = !(digitalRead(nRainDigitalOut));//Checks Digital Pin 2, Output D0
if(nRainVal<450){ //Checks Digital Pin 2, Output D0
strRaining = "yes";
}
else
{
strRaining = "no";
}
mySerial.print("Raining: ");
mySerial.print(strRaining);
mySerial.print(" Moisture Level:");
mySerial.println(nRainVal);
delay(2000);
}
void temp(){
DHT.read11(dht_apin);
mySerial.print("Current humidity=");
mySerial.print(DHT.humidity);
mySerial.print("% ");
mySerial.print("Temperature= ");
mySerial.print(DHT.temperature);
mySerial.print("C ");
delay(5000);
}
void pir(){
if(digitalRead(5) ==HIGH)
{
digitalWrite(13,HIGH);
digitalWrite(12,HIGH);
mySerial.println("motiondetected");
}
else{
digitalWrite(13,LOW);
digitalWrite(12,LOW);
mySerial.println(" no motiondetected");
}
}
void motor()
{
int moisture= analogRead(VAL_PROBE);
mySerial.print("Moisture= ");
mySerial.println(moisture);
if(moisture< MOISTURE_LEVEL)
{
digitalWrite(8,LOW);
}
else
{
digitalWrite(8,HIGH);
}
}
MBED COMPILER CODE
#include ”mbed.h”
DigitalOut myled(LED1);
Serialpc(USBTX,USBRX);
Serialdevice(D1,D0);
intmain() {
while(1) {
while(device.readable())
pc.putc(device.getc());
while(pc.readable())
device.putc(pc.getc());
}
}
ABSTRACT
IoT based Greenhouse Farming incorporates Arduino UNO unit that provides base for live monitoring of temperature and humidity , soil moisture, intensity of rain,motion detection and automatic water pumping and rain water harvesting.All the datas are collected by the Arduino and sent to the cloud by using a gateway called Wiz750SR. The Serial communication protocols connect the server to the smart devices using a particular IP address, so that all the data are displayed on the user’s smart device and is alerted about the status of the crop.
Comments
Please log in or sign up to comment.