Skip to content

This project uses an ultrasonic sensor and servo motor with a Raspberry Pi to automatically detect nearby objects and open/close a trash bin lid. Ideal for smart homes, hygiene automation, or IoT learning.

License

Notifications You must be signed in to change notification settings

jalalakbar47/Smart-Trash-Bin

Repository files navigation

🗑️ Smart Trash Bin (IoT-Based)

Python

🗑️ Smart Trash Bin (IoT-Based)

Python License Status

An IoT-based smart trash bin that opens automatically using an ultrasonic sensor and servo motor controlled by a Raspberry Pi. Designed for touchless, hygienic waste disposal in homes, schools, hospitals, and public places.


📸 Circuit Diagram

Smart Trash Bin Circuit


🧠 Features

  • 🤖 Automatic lid control using distance sensing
  • 🔊 Ultrasonic sensor to detect hand proximity
  • ⚙️ Servo motor to open/close the bin lid
  • 🧾 Python script to handle sensor input and motor output
  • 🌐 IoT concept – part of smart city and automation systems

🛠️ Hardware Required

  • Raspberry Pi (any model with GPIO)
  • HC-SR04 Ultrasonic Sensor
  • SG90 Servo Motor
  • Jumper wires
  • Breadboard
  • Power source
  • Dustbin with attachable lid

💻 Software / Tools

  • Python 3.x
  • GPIO library for Raspberry Pi
  • Tinkercad (for simulation/design)
  • GitHub (version control & documentation)

🚀 How to Run

  1. Clone the repository:

    git clone https://github.com/yourusername/smart-trash-bin.git
    cd smart-trash-bin
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the Python script:

    python smart_trash_bin.py

📂 File Structure

smart-trash-bin/
├── smart_trash_bin.py
├── requirements.txt
├── LICENSE
├── README.md
└── docs/
    ├── circuit diagram.png
    └── notes.md

📜 License

This project is licensed under the MIT License.
Feel free to use, modify, and distribute it for educational purposes.


🙋‍♂️ Author

Jalaluddin Khan
BSCS Student | Pakistan 🇵🇰
GitHub: @jalaluddin-firetps://github.com/jalaluddin-fire)

About

This project uses an ultrasonic sensor and servo motor with a Raspberry Pi to automatically detect nearby objects and open/close a trash bin lid. Ideal for smart homes, hygiene automation, or IoT learning.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages