Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

160117733-146

WEEK-9
AIM:
To implement a Rain Sensing system using NodeMCU which sends the notification
to the Blynk App and to Develop Rain-Sensing Automatic Wiper System.

DESCRIPTION:
Blynk is a Platform with IOS and Android apps to control NodeMCU, Arduino,
Raspberry Pi, and the likes over the Internet. It’s a digital dashboard where you can
build a graphic interface for your project by simply dragging and dropping widgets.
It can control hardware remotely, it can display sensor data, it can store data,
visualize it and do many other cool things.

REQUIRMENTS:
Hardware:
❏ NodeMCU ESP8266
❏ USB cable to connect
❏ BreadBoard and Jumper wires
❏ Buzzer
❏ Servo motor
❏ Rain Detection Sensor

Software:
❏ Arduino IDE
❏ Blynk Application
160117733-146
METHODOLOGY:

Bakelite or Mica board should be made completely flat and aluminum wire should be
pasted on the flat board. There should be no spaces between the wire and the board.

If there is no rain, the resistance between the contacts will be very high as
there will be no conduction between the wires in the sensor.

If there is rain, the water drops will fall on the rain sensor, which will form a
conductive path between the wires and it also decreases the resistance between the
contacts.

As a result, the wires on the sensor board will conduct and trigger the NE555
timer through the transistors circuitry. Once NE555 is triggered, it will make the
output pin high and which will make the buzzer to make alarm.

We should configure the Blynk App for this project. We add the notification widget
to get notifications on our mobile.
160117733-146
CODE:
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "vaSE63fBU_m7hHQBl68kKjWKljE9wUAs"; //Auth Token in Blynk App


char ssid[] = "varun"; // WiFi credentials.
char pass[] = "799791040";

#define buzzer D5
#define rainPin D2
int pirValue;

void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);

pinMode(buzzer, OUTPUT);
pinMode(rainPin, INPUT);
}

void loop()
{
getPirValue();
Blynk.run();
}

void getPirValue(void)
{
int rainValue = digitalRead(rainPin);
if (!rainValue)
{
Serial.println("Rain is detected");
Blynk.notify (“Rain is detected");
digitalWrite(buzzer, 1);
}
else
{
Serial.println("Rain not detected");
digitalWrite(buzzer,0);
}
delay(500);
}
160117733-146
OUTPUT:

CONCLUSION:

Rain detection will detect the rain and make an alert; it is used in the irrigation field,
home automation, communication, automobiles, etc. This project will give the alarm
when there is rain so that we can make some actions for rainwater harvesting and
also save the rainwater for using it later. With the help of saving this rain water
through rain water harvesting, we can increase the levels of underground water by
using underwater recharge technique.

In the irrigation, it will detect the rain and immediately alert the farmer.

In automobiles, when the rain detector detects the rain it will immediately activate
the wipers and inform the driver.

You might also like