Completed
Products
Plastic Scanner for 3D prints
To work towards a plastic scanner that can be used anywhere around the world we need to start small. For this we can start in the 3D printing world, why you might ask? well first of all because a lot of people are printing crap! secondly, because almost no one puts a plastic identification logo on their print, and third, because 3D print plastics are only a select group of plastics, mostly PLA,PETG, ABS,ASA,TPU,PA, This can help a lot to train an ML model since you do not need to take into account 1000 of possibilities (yes there are really 1000 types of plastic) Many of the 3D printers are used in makerspaces of fablabs, here failed prints are often collected for recycling. Nowadays there are more and more 3D print plastic recycling machines, where they initially did not work great, the projects nowadays seem to work very well. but for that, you still need a good clean source of materialresearchother machinesorting
More Information
Making a plan
Created 11 months agoUpdated 11 months ago
Phase 1:
Visualize: Chart common 3D print methods & plastics (FDM, SLA...; PLA, PETG...). Use Prusa Material Table.
Identify Sites: Confirm existing & find new ones (hobby groups, service bureaus, recycling centers).
Collect Samples: Gather filament/prints. Record source, plastic type, surface finish.
Phase 2:
Test Samples: 3D print controlled samples with varied finishes.
Prepare Samples: Clean, cut into consistent sizes.
Create Dataset: High-res images, labeled with plastic type, source, finish.
Phase 3:
Select Model: Choose ML model for image classification (consider pre-trained).
Train Model: Split dataset, train, monitor, adjust.
Test Model: Evaluate accuracy, iterate.
Phase 4:
Field Test: Predict plastic types in real-world, compare to known types.
Gather Feedback: Collect performance data, update model.
Project explainer
Created 11 months agoUpdated 8 months ago
Here is a quick intro video
0:00 Intro
0:19 Background
2:37 Plastic Scanner for 3D printing
3:50 Project breakdown
Phase one
Created 9 months agoUpdated 9 months ago
In this phase of our project, we're diving into the details—what we aim to achieve and where this project begins and ends. Our journey will take us through the world of 3D printing, explore the fascinating field of spectroscopy, and then focus on the practical aspects of setting up our test environment. Let's break down what each stage involves.
Understanding the World of 3D Printing
When it comes to 3D printing, there are multiple production methods available, each with its own strengths. However, the rise of home and desktop 3D printers, especially using Fused Deposition Modeling (FDM), has transformed the landscape, making it accessible to more people than ever before. Currently, the global 3D printing market is divided roughly as follows:
40% FDM
15% SLA
10% SLS
5% DLP
30% other 3D printing methods
This breakdown highlights FDM as the dominant method, especially in personal and small workshop settings. Although other methods like Stereolithography (SLA) and Selective Laser Sintering (SLS) are growing, FDM remains the go-to for many hobbyists and small businesses.
👉For our research, we’ll focus on FDM printing due to its accessibility and relevance. Additionally, FDM commonly uses thermoplastics, which are easier to recycle, aligning with our project’s sustainability goals.
FDM Printing Materials
In FDM printing, different plastics have different properties, making them suitable for various applications. Here's a snapshot of the most commonly used filaments:
40% PLA (Polylactic Acid)
25% PETG (Polyethylene Terephthalate Glycol)
12% ABS (Acrylonitrile Butadiene Styrene) or ASA
9% Nylon
8% TPU (Thermoplastic Polyurethane)
6% Other plastics
👉For our study, we’ll focus on the main players—PLA, PETG, ABS/ASA, and other widely-used filaments. These materials cover a broad range of properties and applications, offering us a solid foundation for our testing.
The World of Spectroscopy
To identify and categorize different plastics, we’ll leverage discrete infrared spectroscopy. This technique involves shining various wavelengths of infrared light onto the plastic filament and measuring the reflected light. The reflections help determine the type of plastic based on its unique spectral signature. However, several factors can influence these measurements:
Surface Finish: Smooth, textured, or lined surfaces may affect how light reflects.
Color: Different colors can absorb or reflect light in varying ways, impacting the results.
👉To accommodate these variables, we plan to test samples with different surface finishes, including a textured base, lined sides, and smooth tops.
A noteworthy shoutout to the Prusa Material Table, added as a picture.
https://help.prusa3d.com/materials
Gathering and Preparing Samples
Created 9 months agoUpdated 9 months ago
Now that we know the types of plastics we’re focusing on, the next step is to gather as many diverse samples as possible. There are two main approaches:
Online: Ordering filament samples online is convenient, though buying full spools for single test prints can be excessive. Fortunately, many manufacturers offer small sample packs, allowing us to acquire over 40 different filament types for testing.
Offline: Locally, we can source filament from makerspaces, companies, and private individuals who own 3D printers. Borrowing a few meters from these sources will add variety to our sample pool.
The goal is to collect around 80 samples, giving us a diverse range of PLA, PETG, and other plastic types to test. This wide range ensures our spectroscopy study accounts for different materials, colors, and surface finishes, resulting in more accurate and reliable findings.
Wrapping Up the Scope
In summary, this phase of the project sets a clear path for our research. By focusing on FDM printing and key filament types, combined with a robust spectroscopy setup, we’re positioning ourselves to generate valuable insights. Gathering a broad spectrum of samples will be key to our success, ensuring that our results are comprehensive and applicable to real-world scenarios.
While scouring the internet I also found this project: https://filamentcolors.xyz/about/ An open source project to make a database with all of the filament and make it possible to compare colors.
Video update
Created 9 months agoUpdated 8 months ago
A quick video marking the end of phase one, starting phase two
0:00 Intro
0:20 Conclusion of phase one
1:18 Start of phase two
2:33 Samples from StudioLab
3:37 Samples from ScienceCenter
4:42 Create sample shape
6:00 Start of printing
Phase two
Created 9 months agoUpdated 9 months ago
Creating a sample object
The surface finish plays a crucial role in determining the quality of a scan. To achieve a variety of finishes on a sample object, I focused on three key surfaces: the top layer, the bottom layer, and the side walls. The top layer is the final surface printed and typically has a smoother finish. The bottom layer, where the filament first adheres to the build plate, has a distinct texture. The side walls showcase the characteristic lines of a 3D-printed object, with a standard 0.2mm layer height.
To maintain consistent conditions, I opted for default print settings: no special top-surface treatment like ironing, standard layer heights, and a textured build plate for a varied bottom finish.
To ensure adequate space for measurements with the plastic scanner, I initially considered using a 40mm square sample. However, I found that this would take too long to print and require approximately 8 meters of filament.
To address this, I designed an L-shaped bracket with slots, allowing it to be printed in two parts. This design preserves the same surface finishes while reducing material consumption by two-thirds.
Documenting Samples
Created 8 months agoUpdated 8 months ago
All prints are done, time for some documentation🏁
I documented everything into a spreadsheet: https://docs.google.com/spreadsheets/d/1zlgsrU1E0cIq2NM2dMy5kTV33Zix6e02qapPu5VWNxE/edit?usp=sharing
All scans are ready:
https://github.com/Plastic-Scanner/Data/tree/main/data/20240915_3Dprintplastic
Phase three
Created 6 months agoUpdated 6 months ago
We've reached an good milestone in our plastic scanner project: machine learning! With all samples now carefully labeled 👉 https://docs.google.com/spreadsheets/d/1zlgsrU1E0cIq2NM2dMy5kTV33Zix6e02qapPu5VWNxE/edit?gid=0#gid=0 , each sample’s image captured 👉 https://github.com/Plastic-Scanner/Data/tree/main/data/20240915_3Dprintplastic/images , and scan data uploaded 👉 https://github.com/Plastic-Scanner/Data/tree/main/data/20240915_3Dprintplastic, it’s time to dive into data analysis!
For this analysis, I’m working with an interactive Python notebook. Google Colab is ideal because it doesn’t require any local setup, making it accessible to anyone who wants to follow along or contribute.
👉 https://colab.research.google.com/drive/1GaLQlNDY3vveR2tWvw4iABq8KrWooBZ3#scrollTo=gGJpvkGWe7yG
The Workflow
Here's an outline of the workflow we’re implementing:
Training Mode (one time)
On the Device:
1. Switch the device to training mode.
2. Scan a calibration sample.
3. Scan a target sample.
4. Normalize the scan by subtracting the calibration value.
5. Perform spectral normalization value (SNV) analysis.
6. Scale the SNV values to a 0–1 range.
7. Save the processed scans as data.
On the Computer:
1. Import the scan data.
2. Filter out any outliers.
3. Use oversampling to ensure all plastic types have an equal representation in the data.
4. Split data into training, testing, and validation sets (70%, 20%, and 10%, respectively).
5. Train the model with appropriate layers and epochs.
6. Visualize the model's performance.
7. Export the model in TensorFlow Lite format.
8. Convert the model to an Arduino-compatible header file.
9. Upload the model to the device.
Usage Mode (continuous)
On the Device:
1. Switch the device to usage mode.
2. Scan a calibration sample.
3. Scan a target sample.
4. Normalize the scan by subtracting the calibration value.
5. Perform SNV analysis and scale the values to a 0–1 range.
6. Feed the data into the trained model on the device.
7. Display the result.
Data processing
Created 6 months agoUpdated 6 months ago
## Program flow
1. Choose collection mode or interpretation mode
2. *Take a measurement* and save is as reference scan
-> sample moved? (to be implemented, if pre and post scan differ too much)
3. *Take a measurement* and save is as a new scan
-> sample moved? (to be implemented, if pre and post scan differ too much)
4. newscan/referencescan
-> scan too dark/too light
5. snv transform
6. snv scaling? (because float difficult to send?)
7. Upload scan or feed scan into ML model
8. display result.
## Take a measurement
1. do pre background scan (with leds off)
1.1 flush first 10 scans
1.2 take average over 10 new scans
2. take scan per led (with 1 led on)
2.1 flush first 10 scans
2.2 take average over 10 new scans
3. do post background scan (with led off)
1.1 flush first 10 scans
1.2 take average over 10 new scans
4. take off the average of the pre and post background scans
sensorReadingLed[i]= sensorReadingLed[i]-((prescan+postscan)/2)
Picture one, raw measurement
Picture two, compared to reference scan
Picture three, reference scan as 1
Picture four, rejecting outliers, to little light reflected
more pictures
Created 6 months ago
Picture one, before SNV transformation (light colored plastics have more amplitude)
Picture two, after SNV transformation (scans have the same amplitude)
Picture three, comparing to different plastics
Changing vibes
Created about 2 months agoUpdated about 2 months ago
Hi all,
The latest trend in the coding world is "Vibe coding" - collaborating with an AI companion to build innovative projects. With our Plastic Scanner project at a bit of a standstill, I decided to explore this approach, working interactively with an AI to develop a machine learning model for our 3D print plastic identification project.
Despite the exciting process, my attempts did not yield any breakthroughs. For now, this also marks the end of the project. The project resources will remain accessible:
- Sample data repository
- Metadata spreadsheet
- Initial ML notebooks
While active development is on hold, I'll continue monitoring technological advancements in spectroscopy and machine learning. If promising new techniques emerge that could improve our approach, I'm committed to revisiting the project.
If you successfully develop a local training method that shows significant promise, please share your approach. The collected samples are ready for testing!
Thoughts, suggestions, or insights are welcome.