0 Comments

Introduction:

In this project emphasis has given to protect our dress from rain by using modern engineering and technology. This system is simple, effective, economic and reliable. It automatically takes our dress to a dry place when rain starts. The status of dress can be observed in a mobile phone with the help of internet.

Materials required:

Resistor

Transistor

Microcontroller

L.E.D

Servo Motor

Adaptor

Conducting wire

Working:

By using an adaptor we get 5 volt dc. When a rain drop touches the sensor, it sends an analog signal to microcontroller. Then the microcontroller rotates the servo motor for a specific angle. Here it is 90 degree. This makes the bar attached to the motor shaft to turn immediately towards roof shade. So, the dress do not get wet and kept dry under the shading. With the help of internet, on a web browser we can see whether the clothes are under the sun or under the shade even staying far away from home.

Circuit diagram:

Advantages:

  1. This protects the dress materials from rain without making those wet.
  2. This also reduces human effort.
  3. This system is simple, effective, economic and reliable.

Code for microcontroller:

//Su-Din Technology  "PROTECTION OF DRESS FROM RAIN"
#include<Servo.h>
Servo s1;
int i;
int readPin=A0;
int readVal;
float V=0;
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
const int Read = A0; //sensor to analog pin A0
float sensorValue;
ESP8266WebServer server(80);
#include "html_page.h"
const char* ssid     = "Hotspot name";
const char* password = "Hotspot password";

void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
  Serial.print("\n\r \n\rWorking to connect");
  while (WiFi.status() != WL_CONNECTED) {delay(500); Serial.print(".");}
  Serial.println("");
  Serial.println("ESP8266 Web Server");
  Serial.println("Connected to WiFi");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
  server.on("/", html_page);
  server.begin();
  Serial.println("HTTP server started");

s1.attach(16);//Control wire of servo to PWM pin #16 or D0 OF NODEMCU
s1.write(i=0);// set servo angle 0 degree
pinMode(readPin,INPUT); }
void loop() {
readVal=analogRead(readPin);/*We have to read the analog 
                             voltage value at pin A0
                             which is developed at anode of led
                             of water sensor circuit*/
V=(5./1023.)*readVal;  
Serial.print(V);
Serial.println("volts");
delay(1000);
//Condition when sensor touches water drop
if(V<4.0){s1.write(i=180); delay(2000);} 
//Condition when sensor is dry
else{s1.write(i=0); delay(2000);}
server.handleClient();}

//Place the main code and html code in one directory
//HTML page code
void html_page()
{
  String page_title, Dress_status ;
  //---------------------------------------------------------------------------
  page_title = "<h1 style=color:blue;>"
               "<body bgcolor=\"#FFFF00\">"
               "<p style=font-family:verdana>"
               "My dress status <br>____________________</p>"       
               "<meta http-equiv=\"refresh\" content=\"1\">";
  //---------------------------------------------------------------------------
  if(V<4.0){
  Dress_status = String("Dress status : ") + String(" Under the shade");}
  Dress_status = "<p style=font-family:arial>" + Dress_status;

  if(V>4.0){
  Dress_status = String("Dress status : ") + String(" Exposed to sunlight");}
  Dress_status = "<p style=font-family:arial>" + Dress_status;
  
  server.send(200, "text/html", page_title + Dress_status);
}

Designer:
Er. Anil Kumar Prusty
WhatsApp: +91 9861004895

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts