Introduction Touchless Dust Bin
A Smart Touchless Dustbin is a type of dustbin which automatically opens it's lid or cap when there is someone in place of the Dustbin. It closes it's lid after some delay.It uses a Ultrasonic sensor, so when any body who wants to throw trash into dustbin comes in sensor range, the lid opens, and closes after some delay. Delay time of opening and closing lid can be set accordingly from code.
Dustbins (or Garbage bins, Trash Cans, whatever you call them) are small plastic (or metal) containers that are used to store trash (or waste) on a temporary basis. They are often used in homes, offices, streets, parks etc. to collect the waste.
In some places, littering is a serious offense and hence Public Waste Containers are the only way to dispose small waste. Usually, it is a common practice to use separate bins for collecting wet or dry, recyclable or non-recyclable waste.
Working Principle of Smart Touchless Trash bin or Dustbin
Here is the video of this Smart Touchless
Below are my Amazon Associate links:-
Parts List:-
Just Copy the Arduino code and paste it in Arduino IDE
// https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g//
// Smart Dustbin //
// MOHD SOHAIL //
#include <Servo.h>
Servo servo;
int trigPin = 5;
int echoPin = 6;
int servoPin = 9;
long duration, dist, average;
long aver[3];
void setup() {
servo.attach(servoPin);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
servo.write(0);
delay(100);
servo.detach();
}
void measure() {
digitalWrite(trigPin, LOW);
delayMicroseconds(5);
digitalWrite(trigPin, HIGH);
delayMicroseconds(15);
digitalWrite(trigPin, LOW);
pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);
dist = (duration/2) / 29.1;
}
void loop() {
for (int i=0;i<=2;i++) {
measure();
aver[i]=dist;
delay(50);
}
dist=(aver[0]+aver[1]+aver[2])/3;
if ( dist<40 ) {
servo.attach(servoPin);
delay(1);
servo.write(90);
delay(5000);
servo.write(0);
delay(1000);
servo.detach();
}
}
Conclusion:-
So, In this Project we have successfully created a Smart Touchless Trash Can or Dustbin which automatically opens and close lid.
0 Comments