Innovate, Automate, and Simplify Your Life

IIST Bihar is a leading project and research platform specializing in Embedded Systems, Robotics, IoT etc.. With a strong focus on academic and industrial innovation, we deliver cutting-edge, practical solutions for real-world challenges.

Main Hero
Robot
Cars
7+
Project Categories
10+
Latest Blog
12+
Internship Programme
7+
Trainings

Shaping Future Innovators through Projectovation

Founded in 2020, PROJECTOVATION is committed to advancing innovation through Embedded Systems and IoT. With a strong emphasis on academic and industrial projects, we deliver smart solutions while nurturing future ready skills among students and professionals. Supported by experts, educators, and industry leaders, PROJECTOVATION bridges the gap between emerging technologies and real-world applications—empowering the next generation of innovators.

Innovative Features for Smart Living
Internship Programme
Web Development Internship
Web Development Internship
IoT Engineering Collaboration
IoT Engineering Collaboration
Cybersecurity Hacking
Cybersecurity Hacking
Arduino & Embedded Systems Internship
Arduino & Embedded Systems Internship
Frontend Development
Frontend Development
 3D Printing
3D Printing

Empowering Kids with the Right Future Skills

We are creating a tool that helps you be more productive and efficient when building websites and webapps

MOU With
Logo 1
Logo 2
Logo 3
Logo 4
Logo 5
Logo 6
Get Inspiration for Learning AI
Inspiration
How to Make a Smart Dustbin Using Arduino Uno, Servo Motor and an Ultrasonic Sensor

How to Make a Smart Dustbin Using Arduino Uno, Servo Motor and an Ultrasonic Sensor

 

Introduction

In this tutorial, we will learn how to make a smart dustbin using Arduino Uno, Servo motor and an ultrasonic sensor. This project introduces a touchless solution for waste disposal, which is particularly useful in maintaining hygiene during the COVID-19 era and beyond.

Hardware Required

  • Arduino Uno
  • Ultrasonic Sensor HC-SR04
  • SG-90 Micro Servo Motor
  • Dustbin
  • Full Kit
 

Software Required

  • Arduino IDE
 

Component Details

1.    Arduino Uno


Arduino Uno is an open-source microcontroller board based on the ATmega328P processor. Key features include:

  • 14 digital input/output pins, 6 of which support PWM output
  • 6 analog inputs
  • USB connection, power jack, ICSP header, and reset button

It is economical and ideal for beginner-level projects, allowing users to experiment freely without worry.

 

2.    Ultrasonic Sensor HC-SR04


The HC-SR04 sensor measures distance using SONAR principles.

  • Components: Transmitter (emits ultrasound) and Receiver (listens for echo)
  • Applications: Obstacle avoidance, distance measurement
  • Working Principle: Emits an ultrasonic wave that bounces back after hitting an object. The time taken for the wave's return determines the distance.
 

3.    SG90 Micro Servo Motor


The SG90 is a lightweight, fast, and reliable servo motor, commonly used in:

  • Remote-controlled vehicles (cars, boats, planes)
  • Robotics projects
    It operates smoothly with most radio control systems and provides precise motion for the dustbin lid.
 

Working Concept

The smart dustbin automates the process of opening the lid when an object is detected. Here's how it works:

1.    Detection: The ultrasonic sensor HC-SR04 detects an object in front of the dustbin.

2.    Signal Processing: The sensor sends data to the Arduino Uno, which processes the signal.

3.    Actuation: The Arduino signals the servo motor to open the dustbin lid for a specified time (default: 3 seconds).

This project provides a contactless solution, making trash disposal more hygienic and efficient.

 

Circuit Diagram


The main components of the circuit are:

1.    Arduino Uno

2.    Ultrasonic Sensor HC-SR04

3.    SG90 Servo Motor

Connections:

  • HC-SR04:
    • Trig → Pin 5
    • Echo → Pin 6
    • VCC → 5V
    • GND → GND
  • Servo Motor:
    • Signal → Pin 7
    • VCC → 3.3V
    • GND → GND
  • Power Supply:
    • A 9V battery is connected to the VIN pin on Arduino Uno, with grounds connected together.
 

Program Code

Here’s the code for the smart dustbin. Upload it to the Arduino Uno using the Arduino IDE.

 

#include <Servo.h> // Servo library

Servo servo;

int trigPin = 5;

int echoPin = 6;

int servoPin = 7;

int led = 10;

long duration, dist, average;

long aver[3]; // Array for averaging distance measurements

 

void setup() {

    Serial.begin(9600);

    servo.attach(servoPin);

    pinMode(trigPin, OUTPUT);

    pinMode(echoPin, INPUT);

    servo.write(0); // Close the lid on startup

    delay(100);

    servo.detach();

}

 

void measure() {

    digitalWrite(led, HIGH);

    digitalWrite(trigPin, LOW);

    delayMicroseconds(5);

    digitalWrite(trigPin, HIGH);

    delayMicroseconds(15);

    digitalWrite(trigPin, LOW);

 

    duration = pulseIn(echoPin, HIGH);

    dist = (duration / 2) / 29.1; // Calculate distance

}

 

void loop() {

    for (int i = 0; i <= 2; i++) { // Average distance calculation

        measure();

        aver[i] = dist;

        delay(10);

    }

    dist = (aver[0] + aver[1] + aver[2]) / 3;

 

    if (dist < 50) { // Change threshold distance as needed

        servo.attach(servoPin);

        delay(1);

        servo.write(0); // Open the lid

        delay(3000); // Keep it open for 3 seconds

        servo.write(150); // Close the lid

        delay(1000);

        servo.detach();

    }

    Serial.print(dist);

}

 

Final Assembly

1.    Attach the Arduino Uno and the 9V battery to the dustbin wall using double-sided tape.

2.    Upload the code to the Arduino board via the Arduino IDE.

3.    Power on your setup, and your smart dustbin is ready to use!

 

Conclusion

With this smart dustbin, you have created a hygienic and contactless solution for waste disposal. Experiment further by customizing the code to adjust lid timings or sensor sensitivity. Enjoy building!

 

 

read more
Inspiration
How to Make Smart Stick for Blind People Using Arduino Nano, Ultrasonic Sensor, and Buzzer

Introduction

This project involves creating a smart walking stick to assist visually impaired individuals in detecting obstacles in their path. The smart stick uses an ultrasonic sensor to sense nearby objects and a buzzer to provide audio feedback, alerting the user about the obstacle's proximity.

 

Hardware Required

  • Arduino Nano
  • Ultrasonic Sensor HC-SR04
  • Buzzer
  • 9V Battery with Connector
  • Resistors (330Ω, optional for LED)
  • Small Breadboard or PCB (optional)
  • Jumper Wires
  • Stick or Cane

 

Software Required

  • Arduino IDE

 

Component Details

1.    Arduino Nano


The Arduino Nano is a compact microcontroller board based on the ATmega328P. Its small size makes it ideal for portable applications like this project. Key features include:

  • 14 digital I/O pins (6 can be used for PWM output)
  • 8 analog inputs
  • USB interface for programming

2.    Ultrasonic Sensor HC-SR04


This sensor measures distance using ultrasound waves. It has a transmitter that emits ultrasonic waves and a receiver that detects the reflected wave (echo). The time delay between transmission and reception determines the distance.

3.    Buzzer


A buzzer is used to provide audio feedback when an obstacle is detected. It emits a beeping sound whose frequency can be controlled programmatically.

 

Working Concept

1.    Obstacle Detection: The ultrasonic sensor emits an ultrasonic wave. If the wave hits an object, it bounces back and is received by the sensor.

2.    Distance Calculation: The Arduino Nano calculates the distance to the obstacle based on the time taken for the echo to return.

3.    Alert Mechanism: If the distance is below a predefined threshold, the buzzer activates, alerting the user.

 

Circuit Diagram

Connections:

1.    Ultrasonic Sensor (HC-SR04):

o   VCC → 5V (Arduino Nano)

o   GND → GND

o   Trig → D2

o   Echo → D3

2.    Buzzer:

o   Positive Pin → D9

o   Negative Pin → GND

3.    Power Supply:

o   Connect the 9V battery to the VIN pin of the Arduino Nano to power the entire system.

 

Program Code

Here’s the code to make the smart stick functional. Upload it to the Arduino Nano using the Arduino IDE.

 

Code

#define trigPin 2

#define echoPin 3

#define buzzerPin 9

 

long duration;

int distance;

 

void setup() {

    pinMode(trigPin, OUTPUT);

    pinMode(echoPin, INPUT);

    pinMode(buzzerPin, OUTPUT);

    Serial.begin(9600);

}

 

void loop() {

    // Send ultrasonic pulse

    digitalWrite(trigPin, LOW);

    delayMicroseconds(2);

    digitalWrite(trigPin, HIGH);

    delayMicroseconds(10);

    digitalWrite(trigPin, LOW);

 

    // Receive echo

    duration = pulseIn(echoPin, HIGH);

    distance = duration * 0.034 / 2; // Convert to cm

 

    if (distance < 50 && distance > 0) { // Threshold distance

        tone(buzzerPin, 1000); // Activate buzzer

        delay(100);

        noTone(buzzerPin);

    } else {

        noTone(buzzerPin); // Turn off buzzer if no obstacle

    }

 

    Serial.print("Distance: ");

    Serial.print(distance);

    Serial.println(" cm");

 

    delay(100);

}

Assembly

 

1.    Attach the components (Arduino Nano, ultrasonic sensor, and buzzer) to the stick or cane securely using tape or glue.

2.    Connect the ultrasonic sensor to the front end of the stick for obstacle detection.

3.    Use jumper wires to connect the components as per the circuit diagram.

4.    Power the system using the 9V battery.

 

Conclusion

This Smart Stick for Blind People provides a simple yet effective way to improve mobility and independence for visually impaired individuals. It can be further enhanced with GPS modules or voice assistance for more advanced features.

read more
Our Child Scientists
University of Southern California

Akshay Aarav

University of Southern California

Krish Bhagat

University of Southern California

Laxmi Kumari

Talk to our Experts

Connect with our team of experts for expert advice and solutions. Let us help you succeed.

Contact Us