0 Comments

Introduction

In this project we are making an automatic system in which the toilet is kept clean. By taking the help of modern engineering and technology we have designed a bound toilet in which the user is locked inside the toilet until he/she has not pushed the flush switch. This is a step towards cleanness and hygienic life.

Block Diagram

Apparatus Required

  1. Battery
  2. Resistor
  3. Capacitor
  4. LED
  5. Relay
  6. Microcontroller
  7. Servo motor
  8. Water pump


Working principle

The user enters into the toilet by pressing the switch to open the toilet door. The door is controlled by a servo motor. After getting inside the toilet, the door is closed automatically. The status of the toilet is shown outside by indicators. Now the door can be opened only after pressing the flush switch. This is a process to force the user to maintain the toilet clean for the next user.

Advantage

This is a step towards cleanness and hygienic life.

Microcontroller code

// Su-Din Technology, contact 9861004895
// Bound to clean toilet code
#include<Servo.h>
#define relayPin 4  // D4 is responsible for pump operation
#define green 2
#define red 3
Servo sv;  // sv represents servo motor here.
int i;
int readPin1=A0;  //A0 pin acts as input signal for Toilet door switch 
int readPin2=A1;  //A1 pin acts as input signal for flush switch
int readVal1;
int readVal2;
float V1=0;
float V2=0;

void setup() {
Serial.begin(9600);
  sv.attach(9);//Control wire of servo to PWM pin D9
  sv.write(i=0);
  pinMode(readPin1,INPUT);
  pinMode(readPin2,INPUT);
  pinMode(red,OUTPUT);
  pinMode(green,OUTPUT);
  pinMode(relayPin,OUTPUT);
  digitalWrite(red, LOW);//nobody is inside the toilet
  digitalWrite(green, HIGH);//toilet is empty
  digitalWrite(relayPin, LOW);
}

void loop() {
readVal1=analogRead(readPin1);
V1=(5./1023.)*readVal1; 
Serial.print("V1="); 
Serial.print(V1);
Serial.println(" volts");
delay(500);

readVal2=analogRead(readPin2);
V2=(5./1023.)*readVal2;  
Serial.print("V2=");
Serial.print(V2);
Serial.println(" volts");
delay(500);

if(V1>3.0)//condition when door switch is pressed.                          
 {
 sv.write(90);
 delay(5000);//Toilet DOOR OPENS FOR 5 sec
 sv.write(0);
 digitalWrite(red, HIGH);//Indicates somebody is inside Toilet
 digitalWrite(green, LOW);
 delay(1000);
}
if(V2>3.0) //condition when FLUSH switch is pressed.                          
 { 
 digitalWrite(relayPin, HIGH);
 delay(4000);//PUMP IS ACTIVATED FOR 4 SEC
 digitalWrite(relayPin, LOW);
 sv.write(90);
 delay(5000);//Toilet DOOR OPENS FOR 5 sec
 sv.write(0);
 delay(500);
 digitalWrite(red, LOW);
 digitalWrite(green, HIGH);//Indicates nobody is inside Toilet
 delay(1000);
}
}

Designer:
Er. Anil Kumar Prusty
Phone No. :- 9861004895

One Reply to “Bound to clean toilet

  1. Just wish to say your article is as surprising The clearness in your post is just cool and i could assume youre an expert on this subject Fine with your permission allow me to grab your RSS feed to keep updated with forthcoming post Thanks a million and please keep up the enjoyable work

Leave a Reply to 9gag downloader Cancel reply

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

Related Posts