How To Make Smart Dustbin with Arduino–Step by Step||Electronic Technology||

In this project , I will show you How to Make a Smart Dustbin using Arduino,When you bring dirty garbage in front of the dustbin, the lid will open automatically and if you remove the dirty garbage, it will close automatically. If you go to my  YouTube channel and watch the YouTube video, you will understand the subject better,Moreover, if you read the whole article with your mind, it will become a general idea about your smart dustbin.


You can make this smart dustbin by setting certain tools with the help of a small plastic bucket.You can use this dustbin in your home, office, road or exactly where the dustbin is used. By using this dustbin, you can create a disease-free environment. Moreover, by using this dustbin, you can keep all the members of your household, especially children, free from diseases.This project is very good ,to provide as a project school or college students.

Using component

  1. Arduino Uno[Buy Now]
  2. Ultrasonic Module[Buy Now]
  3. Servo Motor[Buy Now]
  4. Jumper Wire[Buy Now]

Amazon Link

Arduino Uno-

Ultrasonic Module-

Servo Motor-

Jumper Wire-

Circuit Diagram

I hope you can understand the project if you look at the diagram with a little mind.And if you have any doubts after seeing the diagram, then you must watch the video from YouTube. To watch video in youtube Click here.


Connect all components to the Arduino circuit according to the circuit diagram and upload the code to the computer.Now set up the appliance coolie with the dustbin (you can take the help of YouTube in this case, the YouTube link is inside the article).Home Office Road Where Dustbin Is Used, You Can Definitely Use This Smart Dustbin.

Full Video Tutorial (YouTube)

If you watch the full video, you will understand how the smart dustbin is being made.


Below is the code you will use to manage the arduino or others components. You must download the Arduino software to use coding.[Click Here]

DOWNLOAD[Click Here]

#include <Servo.h> //servo library
Servo servo;
int trigPin = 4;
int echoPin = 5;
int servoPin = 6;
int led= 10;
long duration, dist, average;
long aver[3]; //array for average

void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
servo.write(0); //close cap on power on

void measure() {
digitalWrite(trigPin, LOW);
digitalWrite(trigPin, HIGH);
digitalWrite(trigPin, LOW);
pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);
dist = (duration/2) / 29.1; //obtain distance
void loop() {
for (int i=0;i<=2;i++) { //average distance
delay(10); //delay between measurements

if ( dist<50 ) {
//Change distance as per your need


The Smart Dustbin Project is a digital project, that will help you protect your environment from pollution.

Since the lid in this dustbin automatically shuts off after disposal, there is no chance of mosquitoes, flies or other germs spreading.If you like this project, please comment ,and share it with all your friends.Thank You.


2 thoughts on “How To Make Smart Dustbin with Arduino–Step by Step||Electronic Technology||”

Leave a Comment

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