To overcome the challenge of upcycling plastic waste into 3-D printing filament in the distributed recycling and additive manufacturing systems, this study designs, builds, tests and validates an open source 3-D filament diameter sensor for recycling and winding machines. The modular system for multi-axis optical control of the diameter of the recycled 3-D-printer filament makes it possible to analyze the surface structure of the processed filament, save the history of measurements along the entire length of the spool, as well as mark defective areas. The sensor is developed as an independent module and integrated into a recyclebot. The diameter sensor was tested on different kinds of polymers (ABS, PLA) different sources of plastic (recycled 3-D prints and virgin plastic waste) and different colors including clear plastic. The results of the diameter measurements using the camera were compared with the manual measurements, and the measurements obtained with a one-dimensional digital light caliper. The results found that the developed open source filament sensing method allows users to obtain significantly more information in comparison with basic one-dimensional light sensors and using the received data not only for more accurate diameter measurements, but also for a detailed analysis of the recycled filament surface. The developed method ensures greater availability of plastics recycling technologies for the manufacturing community and stimulates the growth of composite materials creation. The presented system can greatly enhance the user possibilities and serve as a starting
point for a complete recycling control system that will regulate motor parameters to achieve the desired filament diameter with acceptable deviations and even control the extrusion rate on a printer to recover from filament irregularities.