

EcoSMRTv1
a trash can which sorts its waste
- Size
- 25 × 41.5 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 5
- Nets
- 14
- Pads
- 21
- Tracks, vias
- 22, 0
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 21 Mar 2026
- Updated
- 13 Jul 2026
Overview
EcoSMRTv1 is an open-source printed circuit board by leongu11, from the leongu11/ecoSMRT-trash-sort repository on GitHub. It is a 2-layer board of 25 × 41.5 mm with 5 parts on 14 nets, routed with 22 tracks and 0 vias.
Its parts include 3 connectors, 1 capacitor and 1 diode.
README
README.mdecoSMRT
Overview
(this is my second README for this project -- I accidentally deleted the first one) ecoSMRT is an edge AI project which determines if an article of trash is a recyclable (bottle) or not and sorts it accordingly. It uses a refined version of MobileNetV2's CNN (convolutional neural networks) specifically for this task to make quality inferences. The model is around 60-70% accuracy when it comes to strong confidences over the 90% threshold. I have logged nearly 45+ hours working on ecoSMRT as part of Hackclub's program, STASIS. Journal entries after every work session are also posted on the repository.
Incentive
Often times, managing waste can be overwhelming and done incorrectly. At the recycling level, nearly 76% of recyclables are lost at the household level (https://recyclingpartnership.org/residential-recycling-report/), and even those which are put into the recycling bin can be wrongly classified. As these wrongly-sorted articles of trash add up, the recycling process loses its efficiency, inflating unnecessary costs to over $3.5 billion yearly for the US (https://www.federalrecycling.com/industry-insights/common-recycling-mistakes-and-how-to-avoid-them/). As a direct result, recycling becomes more of a burden than a tool. Human error is exacerbating what recycling aims to fix: bettering the environment. Instead of looking towards refining the system, we should look to fix the root of the cause, our inaccuracies, by removing ourselves from the equation. AI is better than humans probably so like make a trash sorter ig 🤷♂️.
Assembly Instructions
Use .stl files to print all 3d parts -- this includes the lid, the two edge mount pieces, the servo-lid adapter piece, and the camera mount (which is fixed to one of the edge mounts). NOTE: THE SERVO-LID ADAPTER PIECE REQUIRES A PAUSE IN THE PRINT TO SNAP ON THE HORN IN ORDER TO SEAL IT INSIDE THE PRINT! Slide the lid between the mounts to fix it in the center of the bin. Fasten the servo to the edge mount with two servo horn screws (which should have come with the servo) and connect the servo-lid adapter with the horn inside to the servo. Connect the adapter and the lid's extensions together-- glue is reccomended. The lid should now not rotate freely and rotating it should turn the servo, too. Attach a usb-c to usb-c onto the esp32 and camera and tape/glue to the top of the mount, allowing the camera to rest on the side of the mount. Connect the usb-c and flash the test-camera sketch onto the Xiao. It should return an IP to visit on the web to check the positioning of the camera. Adjust accordingly in order to have a clear view of the center of the bin. Using three jumper wires, solder the ends to both a capacitor and diode (optional, but recommended) using the schematic as a guide. Connect these jumpers to the servo, matching the power, ground, and signal accordingly. Once complete, flash the ecoSMRT-code onto the xiao. You should see inferences in the serial monitor and the lid rotating when those inferences pass the .95 -- or 95% -- threshold. Use the usb-c to power with any wall plug adapter or even laptop.
How ecoSMRT was made
I had originally settled for a more complex mechanical sorter, but the AI proved to be a challenge, so I simplified its design down to focus on firmware. The AI and curating a dataset which could yield decent results was also hard: At first, I was taking pre-existing datasets online, but the models were terrible. I did a lot of research and realized that I should probably use the native camera and setup for the training data, which turned out to work much better. Also, I switched from FOMO to MobileNet because like a month in I realized that image detection and classification were completely different (explanation found in journal). Everything else was relatively smooth sailing.
Bill of Materials
| Component | Description | Cost | Link |
|---|---|---|---|
| XIAO ESP32S3 Sense | Microcontroller with camera | $23.99 | link |
| MG90 servo | Sorting | $8.88 | link |
Hardware
- MCU - Xiao ESP32S3-Sense w/ built-in camera module: The Xiao ESP32 felt like the suitable choice because of its dual-core processors and built-in camera, which allowed the classification model to run smoothly locally, along with its GPIO capabilities. Camera - OV2640
- MG90 Microservo: I have had my fair share of bad experience with the SG90 on multiple accounts, so I opted for its counterpart with metal-geared teeth, which seemed to be a good idea for tourque.
Electronic Framework
I designed a schematic and PCB for this project in KiCAD
Schematic for wiring on perfboard:
PCB:
I plan to use a perfboard using these as references for the physical project.
CAD / 3d Printed Parts
Parts are printed in PLA, amounting to around 300 grams of filament (although all my prototypes summed up to a kg spool) These consist of the bin's lid, which revolves on small axis extensions. These pass through bores that connect to the edges of the lid, and, when connected to the servo, keep the lid at the set position. The mount for the ESP32 slides around the servo's housing and attach to its walls. Additionally, I have modeled small attachments to connect the two halves of the lid if it cannot be printed as one part.
Software & Dependencies
- Arduino IDE
- Edge Impulse CLI
- ESP32 Arduino Core 2.0.8+
bottleclassifications_inferencing(included in/lib) (refined w/ Edge Impulse)- servo/webserver libraries used for testing/deployment
here are some crappy inferences from my first few models:
Image Classification VS Object Detection (written in a journal entry)
Classification observes the image as a whole and returns a confidence score; its only question to ask is: What is this thing in front of me? Detection has to decide three things: Are there multiple objects? What are the objects? Where are the objects? In this case, the model has to consider spatial data when moving forwards for its confidence, which takes a lot more computing power and is way too overkill for my project.
How Image Classification Works
Image classification is tuning a pre-trained model for a specific need. My model, MobileNetV2 has already been trained on ImageNet with millions of classification data – its weights have already adjusted to finding curves, textures, and colors within an image. What the refining does is simply re-run these weights over the image (or vector with the image data) – there is a series of these filters (matricies which are averaged out to make smaller maps) that alter the feature map that compound on one another, so they take the last feature’s map, instead of the old image. In this way the filters are able to distinguish curves, then textures, then shapes, then the image itself – again stacking over itself. The result is a confidence score that can be achieved even with little data.
Dataset
- Trained on Edge Impulse
How It Works & Usage
Frames are fed into the CNN, which returns inferences for classifications in real time. If an inference exceeds the 90% confidence threshold, the servo adjusts lid in one direction or another, 'sorting' the article of trash.
To use, place the trash on the lid in front of the camera and in any orientation and wait for the bin to sort before placing the second article of trash down.
Future Improvements
- Improving vision model by manually training on pytorch or by expanding dataset
- adding feet to the bin to stabilize and prevent shaking from disturbing classifications 💀
- adaptability
Parts
5| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | Conn_01x07_Socket | Connector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_Vertical_SMD_Pin1Right | J1, J2 |
| 1 | 1N4007 | Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal | D1 |
| 1 | C_Polarized | Capacitor_THT:C_Radial_D5.0mm_H11.0mm_P2.00mm | C2 |
| 1 | Conn_01x03_Pin | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J3 |
Similar boards
- 2 layers98 × 27 mm

- 2 layers21 × 33 mm

24g2usb pico2w
joypad-ai/joypad-os
Universal controller firmware for building adapters, dongles, and custom controllers.
5 parts1.7kApache-2.0 - 2 layers53.2 × 59.6 mm

A10 OLinuXino Lime Rev B SHIELD TEMPLATE
OLIMEX/OLINUXINO
OLINUXINO is Open Source / Open Hardware, low cost from EUR 24 Linux Industrial grade Single Board Computer capable to operate -25+85C
5 parts1.5k - 2 layers30 × 11 mm

Main control board servo tester
jamro/tiny-engineer
A small desktop robot that brings an AI coding assistant to life, physically acting out when it reads files, thinks, writes code, and finishes work.
5 parts1.1k - 2 layers78.8 × 35.3 mm

KiCadTest
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
5 parts915 - 2 layers50 × 23 mm

- 2 layers43.2 × 28.5 mm

- 2 layers20.3 × 15.2 mm

L0 light sensor
Luos-io/luos_engine
Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.
5 parts546MIT
Questions
How big is the EcoSMRTv1 PCB?
It measures 25 × 41.5 mm and has 2 copper layers, 1.6 mm thick.
What parts does the EcoSMRTv1 use?
5 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the EcoSMRTv1 KiCad files?
From the leongu11/ecoSMRT-trash-sort repository on GitHub, at the commit this page was made from: the board is schematics/newschematic&pcb/ecoSMRTv1.kicad_pcb and its schematic schematics/newschematic&pcb/ecoSMRTv1.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the EcoSMRTv1 design in my own project?
Its repository states no licence, so its author keeps all rights: ask leongu11 before reusing the design.