Smart Dustbin

Introduction

A Smart Dustbin is an automated waste management system that opens its lid automatically when it detects a person nearby. This project promotes hygiene by minimizing physical contact and is widely used in smart cities, hospitals, offices, and homes.

The Smart Dustbin uses sensors and a microcontroller to make waste disposal more convenient and hygienic.


Objective of the Project

The main objectives of this project are:

  • To reduce physical contact with dustbins.
  • To promote cleanliness and hygiene.
  • To automate waste disposal using sensors.
  • To understand sensor and motor interfacing with Arduino.

Working Principle

The Smart Dustbin works on the principle of distance measurement using an ultrasonic sensor.

Step-by-Step Working

  1. The ultrasonic sensor continuously measures distance.
  2. When a person comes close to the dustbin, the sensor detects the object.
  3. Arduino processes the distance data.
  4. If the distance is below a preset value, Arduino activates the servo motor.
  5. The servo motor opens the dustbin lid.
  6. After a few seconds, the lid closes automatically.

Components Required

  • Arduino Uno
  • Ultrasonic Sensor (HC-SR04)
  • Servo Motor (SG90)
  • Jumper Wires
  • Breadboard
  • Power Supply (5V)
  • Dustbin (for mounting the system)

Circuit Diagram

Connections

Ultrasonic Sensor:
VCC  -> 5V (Arduino)
GND  -> GND
Trig -> D9
Echo -> D10

Servo Motor:
VCC  -> 5V
GND  -> GND
Signal -> D6

Arduino Code for Smart Dustbin

#include <Servo.h>

Servo lidServo;

int trigPin = 9;
int echoPin = 10;
int servoPin = 6;

long duration;
int distance;

void setup() {
  lidServo.attach(servoPin);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  lidServo.write(0); // Lid closed
}

void loop() {
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);

  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  duration = pulseIn(echoPin, HIGH);
  distance = duration * 0.034 / 2;

  if (distance > 0 && distance < 20) {
    lidServo.write(90); // Open lid
    delay(3000);
    lidServo.write(0);  // Close lid
  }
  delay(500);
}

Code Explanation

  • Ultrasonic sensor measures distance.
  • Arduino calculates distance in centimeters.
  • If distance is less than 20 cm, servo motor rotates.
  • Servo opens the lid and closes it after 3 seconds.

Advantages

  • Touch-free operation
  • Hygienic and user-friendly
  • Energy efficient
  • Easy to implement

Applications

  • Smart homes
  • Hospitals
  • Offices
  • Public places
  • Smart city projects

Future Enhancements

  • Add garbage level detection
  • IoT-based monitoring
  • Mobile app alerts
  • Solar power support

Conclusion

The Smart Dustbin is an innovative and practical electronics project that encourages cleanliness and smart living. It demonstrates the use of sensors, microcontrollers, and automation in real-life applications and serves as a foundation for advanced smart city solutions.

Leave a Reply

Shopping cart

0
image/svg+xml

No products in the cart.

Continue Shopping