Real-time color-based sorting and counting system for plastic bottle caps using esp32 and tcs3200 sensor - Andre Suwardana Adiwidya; Achmad Zuchriadi; Sargi Ginting; Silvia Angraeni (Jurnal Mantik, 2026)
Plastic waste has become a major environmental issue due to its increasing generation and the limited effectiveness of waste management systems. In recycling activities, sorting plastic materials by color is essential because it influences both the quality and economic value of recycled products. However, plastic bottle caps in waste banks and small-scale recycling facilities are still commonly sorted manually, making the process labor-intensive, time-consuming, and often inconsistent. This study presents an embedded system for real-time sorting and counting of plastic bottle caps based on color using an ESP32 microcontroller and a TCS3200 color sensor. The developed system integrates a conveyor mechanism, five servo motors, five infrared sensors, and a 16×2 LCD functioning as a human–machine interface. Plastic bottle caps were classified into five color categories: red, yellow, green, blue, and white. System performance was evaluated through 500 integrated experimental trials, with each color category tested 100 times. During each trial, color detection, object sorting, counting, and data visualization were performed simultaneously. The TCS3200 sensor correctly identified 487 out of 500 samples, resulting in an average accuracy of 97.4%. No counting errors were observed during the experiments, yielding 100% accuracy for the infrared-based counting system, while all servo actuations operated successfully throughout the testing process. The counting values displayed on the LCD were fully consistent with the readings obtained from the infrared sensors. These findings indicate that low-cost embedded components can be effectively integrated to support automated sorting and counting applications. The developed system offers a practical solution for waste banks and small-scale recycling facilities and may contribute to improving operational efficiency and promoting sustainable plastic waste management