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.
- 🤖 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
- Raspberry Pi (any model with GPIO)
- HC-SR04 Ultrasonic Sensor
- SG90 Servo Motor
- Jumper wires
- Breadboard
- Power source
- Dustbin with attachable lid
- Python 3.x
- GPIO library for Raspberry Pi
- Tinkercad (for simulation/design)
- GitHub (version control & documentation)
-
Clone the repository:
git clone https://github.com/yourusername/smart-trash-bin.git cd smart-trash-bin
-
Install dependencies:
pip install -r requirements.txt
-
Run the Python script:
python smart_trash_bin.py
smart-trash-bin/
├── smart_trash_bin.py
├── requirements.txt
├── LICENSE
├── README.md
└── docs/
├── circuit diagram.png
└── notes.md
This project is licensed under the MIT License.
Feel free to use, modify, and distribute it for educational purposes.
Jalaluddin Khan
BSCS Student | Pakistan 🇵🇰
GitHub: @jalaluddin-firetps://github.com/jalaluddin-fire)