SMART DUSTBIN

What is an smart Dustbin?

Simply a smart dustbin is a modern dustbin that opens up when you want to use the dustbin and notifies us when it is filled.
Now a day’s man needs everything to be automated and simple to do work.

This idea will also help in leading a modern life. This will help in the waste management in the apartments, institutions, offices and many more organizations. From one place we can monitor the amount of waste in all the dustbins from a single place which in turn helps in handling the waste easily.

How to make a smart Dustbin?

Components required:

Software components:

1. Arduino IDE
2. Blynk mobile app

Hardware components:

1.Node MCU
2. Ultrasonic sensor – 2 no
3. Connecting wires
4. Battery – 9v
5. Dustbin

How to build the circuit?

Follow the below circuit diagram and connect the sensors to the nodemcu.

The circuit can be built as per the users need because there may be the usage of different batteries and it is not necessary to have a breadboard you can make the wires short and connect them.

Why the circuit is built in this way?

  • Here two ultrasonic sensors are used one is to measure the waste content in the dustbin and the other one is to find the need to open dustbin lid or not.
  • The need for using the nodemcu here is to send the notification to the smartphone about the amount of waste in the dustbin.
The below illustrations help to understand more to you.

Illustration of smart dustbin

Figure 1 indicates lid is closed as there is no one in front of the sensor.

Figure 2 indicates lid is open as the distance is less in front of the dustbin.

  • Fig 3 is Dustbin fill up to 25%
  • Fig 4 is Dustbin fill up to 50%
  • Fig 5 is Dustbin fill up to 75% and the lid is open indicating to empty the bin.

Working:

         The working of a smart Dustbin is so simple. The Dust bin will identify the amount of waste present in the dustbin by measuring the distance of waste from the top and indicate to us using the Blynk app which is connected over wifi via the Blynk server. The lid of the dust bin opens up by the action of the servo when there is a person in front using an ultrasonic sensor but this can be done by an IR sensor also to minimize the cost. The lid of the dustbin closes automatically after 10 seconds as programmed. Thus it helps in adding little more automation in our life.

Let’s set up the Blynk app for this project:

Firstly let us create a new project as indicated

Let us add a dustbin waste level indicator as shown below
Set the pin as virtual and as V2 as per the code below.
Then let us add a led on the screen to indicate whether the bin is full or not as shown below:
We attach the led to the V6 pin according to the code.
Enter the authentication code received in your mail while creating the new project. Here we are assuming that you already know the basics of the Blynk app else visit our previous articles for details on creating an authentication code.
Now dump the code into the nodemcu and build the dust bin as shown in the above illustration.

How does the output screen look?

The output screen looks like as below
smart dustbin
                                                                                   Fig a                                                           Fig b
Fig a: When dustbin is filled below 75%
Fig b: When the dustbin is filled above 75% the bulb glows as an indication to empty the bin.

Where it can be used?

  • Household purposes
  • Offices
  • Institutions etc.

Conclusion:

         We can say that the dustbin with little automation can be useful to the modern man stepping into the age of automation and artificial intelligence.
Code:
/********************Intelligent Dustbin*************************/
#define BLYNK_PRINT Serial   
#include
#include
#include
Servo myservo;
charauth[] = "****************************";//Paste your token here
// Your WiFi credentials.
// Set password to "" for open networks.
charssid[] = "*******";
char pass[] = "*******";
void setup()
{
Serial.begin (9600);
Blynk.begin(auth, ssid, pass);
pinMode(D0, OUTPUT);//ultrasonic for measuring the waste
pinMode(D1, INPUT);
pinMode(D2, OUTPUT);//ultrasonic sensor for finding the person
pinMode(D3, INPUT);
myservo.attach(D4);//servo for opening the lid
}
void loop() {
long duration,dist,bin_level,dist1,person;
digitalWrite(D2, LOW); 
delayMicroseconds(2);
digitalWrite(D2, HIGH);
delayMicroseconds(10);
digitalWrite(D2, LOW);//Intialized the trigger
duration = pulseIn(D3, HIGH);
  dist1 = (duration/2) / 29.1;
if (dist1<=25) {
myservo.write(90);//lid is open
delay(10000);
myservo.write(0);//lid is closed
}
else {
myservo.write(0);//lid is closed
  }
digitalWrite(D0, LOW); 
delayMicroseconds(2);
digitalWrite(D1, HIGH);
delayMicroseconds(10);
digitalWrite(D0, LOW);//Intialized the trigger
duration = pulseIn(D1, HIGH);
dist = (duration/2) / 29.1;
if (dist<=25) {
Blynk.virtualWrite(V6,255);//V6 is given to LED in Blynk
myservo.write(90);
}
else {
Blynk.virtualWrite(V6,0);
  }
bin_level=100-dist; //I assumed dustbin length as 100cm for easy calculations
Serial.println("Centimeter:");
Serial.print(dist);
Blynk.virtualWrite(V2,bin_level);//V2 is given to the Vertical level indicator with lowest value 0 and highest as 100
delay(2000);
Blynk.run();
}

Also check:
Arduino projects

Spread knowledge

Leave a Comment

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