Introduction: Smart Dustbin Using Arduino, Ultrasonic Sensor & Servo Motor

In this project, I will show you How to Make a Smart Dustbin using Arduino, where the lid of the dustbin will automatically open when you approach with trash. The other important components used to make this Smart dustbin are an HC-04 Ultrasonic Sensor and an SG90 TowerPro Servo Motor.

Step 1: Components Required:

1. Arduino UNO

2. Breadboard

3. LCD 16*2( potentiometer & resistor)

4. Ultrasonic sensor

5. Servo motor

Step 2: Circuit Diagram:

When a person comes near to dustbin the lid of the dustbin will automatically get open and when the person goes away the lid will close automatically. The lid of the dustbin is connected with a servo motor for opening and closing the lid.

The following image shows the circuit diagram of the Smart Dustbin using Arduino. It is a very simple design as the project involves only three components other than Arduino.

For LCD connections visit:

Servo motor is connected with pin 7

Ultrasonic trigger =10;

Ultrasonic echo =9;

Step 3: Code:

For credit, please follow my following accounts.

For more interesting projects connect with me on:


Facebook page:


Arduino Contest 2020

Participated in the
Arduino Contest 2020