SmartBin

by ÁlvaroM13 in Circuits > Raspberry Pi

132 Views, 0 Favorites, 0 Comments

SmartBin

logo_final_300.png

SmartBin: Intelligent and Gamified Waste Classification System in Schools


SmartBin is a project developed at Escola Secundária de Rio Tinto 3, within the scope of the Professional Aptitude Projects (PAP) of the vocational course in Electronics, Automation and Computers. The work is carried out by students and supervised by teachers, with the aim of applying technical skills while promoting sustainable practices within the school community.

The project proposes the creation of an intelligent and gamified system for the automatic classification of waste, using artificial intelligence and low-cost devices such as a Raspberry Pi and a simple camera. The system identifies and classifies waste in real time, providing immediate feedback to users.

Through a machine learning model, SmartBin monitors the types and quantities of waste produced, generating periodic reports and environmental impact indicators. The project also integrates a competitive platform between schools or teams, encouraging the adoption of good environmental practices in a playful and collaborative way.

The main objective is to increase environmental awareness, reduce the carbon footprint, and engage students and the educational community in adopting more sustainable behaviours, combining technology, education, and environmental citizenship.

Supplies

rpi_5.png
prox_1.jpg
prox_2.jpg
camera.png
hub.jpg
neo.jpg
caixote.png

Processing & Control

  1. Raspberry Pi 5 (1 unit)
  2. Memory Card (1 unit minimum 32Gb)
  3. Raspberry Pi Camera Module 3 (SC1223, 12 MP, 76° FOV) (1 unit)

Power Supply & Power Delivery

  1. Mean Well RS-25-5 Power Supply (5 V, 5 A, 25 W)(1 unit)
  2. DollaTek PD/QC/AFC Quick Charge Trigger Module (5 V / 9 V / 12 V / 15 V / 20 V fixed output)(1 unit)
  3. USB-C PD Cable (Aceyoon, 5 A, E-Marker, 15 cm + 50 cm, 90°) (1 unit)

Sensors

  1. JSN-SR0RT / AJ-SR04M Ultrasonic Sensor (1 unit)
  2. VL53L0X / VL53L1X Time-of-Flight Distance Sensors(3 unit)

Actuators & Indicators

  1. NeoPixel LED Strips (WS2812B) (6 led)

I²C & Expansion

  1. Seeed Studio I²C Hub (1 unit)

Electronic Components

  1. Resistors: 1.5 kΩ (1 unit, for voltage divider echo - AJ-SR04M)
  2. Resistors: 2.7 kΩ (1 unit, for voltage divider echo - AJ-SR04M)
  3. Resistors: 470 Ω (3 units, one per LED strip)
  4. Electrolytic Capacitor: 1000 µF (1 unit for strip of neopixel)
  5. Electrolytic Capacitor: 220 µF (1 unit for seeed hub)
  6. Header Male and Famale Pin Header ((whatever is necessary)
  7. Double-sided PCB Board Prototype - for powerspply hub

Mechanical & Structural

  1. IKEA Waste Bins (3 units)
  2. 1 leg from a table (1 unit)
  3. 3D-printed PLA parts (some ...)

Wiring & Assembly

  1. Electrical wires,solder (whatever is necessary)
  2. glue super 3 and hot glue
  3. screws (whatever is necessary, if you don't use glue ...)
  4. Some acrylic plates
  5. ...

Mind Map

mapamental.png

This diagram shows the overall architecture of the SmartBin system, divided into three main parts: Hardware, Software, and Data Records.

The Hardware consists of an intelligent waste bin equipped with sensors and visual indicators. These components detect when waste is placed in the bin, collect relevant information, and provide immediate feedback to the user through lights and signage. This real-time interaction helps users understand whether the waste was correctly sorted.

The Software is responsible for processing and managing the collected data. Information from the bin is sent to a server, where it is analysed and used to power two main features: a dashboard and a gamified experience. The dashboard displays statistics, usage data, and environmental indicators, while the game motivates users through quizzes, challenges, and rewards.

All system data is stored in the database, forming the Records layer. This includes waste types, quantities, user interactions, and game results. These records allow the system to generate reports and track environmental impact over time.

Together, these elements show how SmartBin combines low-cost hardware, software, and gamification to promote sustainable behaviour in an engaging and educational way.

First of All the Game

Captura de ecrã 2026-04-15, às 17.57.48.png
jogo.png
diagrama diagram-2026-01-25-093223.png
Wheel of Questions Flow-2026-01-24-191114.png

Game Objective and How to Play


The objective of the game is to engage users in learning about waste separation through a simple and interactive experience. By combining chance, knowledge, and immediate feedback, the game reinforces correct environmental practices in a playful way.

To play, the user presses the central button to spin the wheel. When the wheel stops, a random category is selected and a question related to waste classification is displayed on the screen. The player must answer the question by selecting Yes or No.

The system sends the answer to the server for validation. If the answer is correct, the player wins and receives positive visual feedback. If the answer is incorrect, the game displays a loss message and encourages the player to try again. After a short pause, the game automatically resets and is ready for a new round.

This is a simple game developed in Processing, with no complex mechanics. To play, just point your mobile phone at the screen and interact with the game, or access it directly at alvaro.linuxkafe.com/posto.php

As usual, you can always check the page source and download
the JavaScript file — it’s public.

sdasd


Structure Construction

aaaaa.jpg
PXL_20260124_185203878.jpg
PXL_20260119_173049576.jpg
PXL_20260119_173055015.jpg
PXL_20260119_173153560.jpg
PXL_20260119_173225440.jpg
PXL_20260119_173303201.jpg
PXL_20260124_185117438.jpg
PXL_20260124_185127129.jpg
PXL_20260124_185134556.jpg
PXL_20260124_185145314.jpg
PXL_20260124_185224142.jpg
PXL_20260124_185231363.jpg
PXL_20260124_185244401.MP.jpg
PXL_20260124_185424097.MP.jpg

The structure was built using a mix of custom 3D-printed parts and reused materials. The custom components were designed in Fusion 360, adapting the design as needed throughout the project rather than following a fixed plan.

The final look was inspired by a semi-humanoid style, somewhat similar to a simple Wall-E-like robot, making it more engaging and friendly for users.

To keep costs low and simplify construction, existing elements such as standard waste bins and a metal table leg were reused and integrated into the structure.

Wired Logic

logicacablada.png

Schematic Overview


This schematic shows the wired architecture of the SmartBin system. A 5 V power supply (Mean Well RS-25-5) powers the Raspberry Pi 5, the sensors, and the LED actuators. The Raspberry Pi acts as the central controller, managing sensor inputs, visual feedback through NeoPixel LED strips, and image capture using the Camera Module 3. An ultrasonic sensor is used to detect an object in front of the camera.

Multiple Time-of-Flight sensors are connected through an I²C hub, allowing system expansion and avoiding address conflicts. These sensors help detect when an object is correctly directed into the waste bin. Capacitors are included to stabilise the power supply and ensure reliable operation.

Yolo - Training and Google Colab

Captura de ecrã 2026-04-15, às 19.06.05.png

The object classification system was developed using YOLO (You Only Look Once), a deep learning model optimized for fast and efficient image classification. In this project, YOLO is used in classification mode to identify the type of waste placed in front of the camera.

The training process was carried out using Google Colab, a cloud-based platform that provides free access to GPU resources. This made it possible to train and test the model without requiring high-performance local hardware.

The dataset used for training was based on the public RealWaste dataset, combined with additional contextualised images captured by students in the school environment. These real-world images include different backgrounds, lighting conditions, and object positions, helping the model better adapt to real usage scenarios.

To ensure proper training and evaluation, the dataset was organised into different sets:

  1. Training set – used to train the model
  2. Validation set – used to monitor performance during training
  3. Test set – used to evaluate the final model

The images were grouped into three main classes, corresponding to the physical bins in the system:

  1. Yellow recycling
  2. Blue recycling
  3. General waste

This approach ensures that the model is aligned with the real system and provides reliable results in practical use.

Conclusion

Captura de ecrã 2026-04-15, às 19.41.41.png