Students build, and program a smart recycling bin that automatically opens when a specific type of waste is recognised. Using a Micro:bit, a servo motor, and a machine learning model created with Teachable Machine, students explore how physical computing and artificial intelligence can be combined to solve real-world problems.
The lesson progresses from assembling the bin and manually controlling the servo, to training a machine learning model and integrating it into an automated system using serial communication and Make:AI Robots.
Students will:
Pre-lesson recommendation:
Materials and components:
For each smart bin:
Items to represent waste (one of each per group):
Electronics:
Tools: Side cutters, long nose pliers, screwdrivers
Markers or colouring pencils to design labels for the bins
Students workbook and teacher presentation

By the end of this lesson, students will be able to:
I have included the answer to the reflection questions on my Fab Learning Academy diary. Link to Reflection Questions
Students investigate the recycling guidelines used in their local area and apply this knowledge to sort everyday waste items into the correct recycling categories.
Provide students with access to local recycling information, such as the council website or a printed guide.
In pairs, ask them to identify the main recycling categories used in their area.
Then give each pair a set of everyday waste item cards and ask them to sort them according to the local recycling system.
Review the answers together and discuss any items that are more difficult to classify.
Students assemble the physical structure of the recycling bin and install the servo mechanism that will control the lid. They also connect the Micro:bit and expansion board, preparing the system for programming.
Check materials and tools
Assemble the bin structure
Install the servo motor
Understand servo positions
Connect electronics
Create the linkage


Students program the Micro:bit to manually open and close the bin using buttons. They learn about variables and how to control a servo motor.
Open MakeCode
Explain variables
Assign values
Program behaviour
Download and test
Adjust values
Students train an image recognition model using Teachable Machine to classify different types of waste.
Introduce machine learning
Open Teachable Machine
Create classes
Collect data
Train the model
Test the model
Improve model
Export the model
Students connect the trained model to the Micro:bit and automate the bin so it opens only for the correct type of waste.
Prepare Micro:bit code
Read incoming data
Add conditionals
Add automation
Upload code to Micro:bit
Students connect the Micro:bit to the machine learning model using Make:AI Robots and test the full automated system.
Open Make:AI Robots
Connect devices
Paste model URL
Check camera
Test system
Debug issues
Students evaluate their system, identify problems, and suggest improvements.
Reflect on performance
Identify issues

Propose improvements
Extension activity

Having trouble? Let us know by completing the form below. We'll do our best to get your issues resolved quickly.
"*" indicates required fields