ADAPTIVE COLOR SORTING ROBOT APPLYING MACHINE LEARNING ON EMBEDDED SYSTEMS
DOI:
https://doi.org/10.62985/j.huit_ojs.vol26.no2E.416Keywords:
Adaptive Color Sorting, K-Nearest Neighbors, Embedded Machine Learning, PLC, Industrial AutomationAbstract
Automation in manufacturing relies heavily on accurate product classification. However, affordable color sensors often suffer from interference caused by ambient lighting changes, leading to errors in traditional systems based on fixed thresholds. This study presents an adaptive sorting robot arm integrated with a Programmable Logic Controller and an embedded microcontroller. The novelty of this research lies in the implementation of the K Nearest Neighbors machine learning algorithm directly on the microcontroller to process color data. Instead of using fixed logic, the system features a calibration mode where it learns reference color features in the current environment. During operation, the algorithm calculates the Euclidean distance between the detected object and the learned samples to perform classification. Experimental results demonstrate that this approach significantly improves recognition accuracy under varying lighting conditions compared to methods using static logic, offering a robust and economical solution for industrial automation.
References
[1] L. D. Xu, E. L. Xu, and L. Li, "Industry 4.0: State of the art and future trends," Int. J. Prod. Res., vol. 56, no. 8, pp. 2941–2962, 2018, doi: https://doi.org/10.1080/00207543.2018.1444806.
[2] R. Rakholia, A. L. Suarez-Cetrulo, M. Singh, and R. Simon Carbajo, “Advancing Manufacturing Through Artificial Intelligence: Current Landscape, Perspectives, Best Practices, Challenges, and Future Direction,” IEEE Access, vol. 12, pp. 131621–131637, 2024, doi: https://doi.org/10.1109/ACCESS.2024.3458830.
[3] E. R. Alphonsus and M. O. Abdullah, "A review on the applications of programmable logic controllers (PLCs)," Renew. Sustain. Energy Rev., vol. 60, pp. 1185–1205, Jul. 2016, doi: https://doi.org/10.1016/j.rser.2016.01.025.
[4] A. R. M. Khairudin, M. H. A. Karim, A. A. Samah, D. Irwansyah, M. Y. Yakob, and N. M. Zian, "Development of colour sorting robotic arm using TCS3200 sensor," in Proc. IEEE 9th Conf. Syst., Process Control (ICSPC), 2021, pp. 108–113, doi: https://doi.org/10.1109/ICSPC53359.2021.9689114.
[5] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, "You only look once: Unified, real-time object detection," in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Las Vegas, NV, USA, 2016, pp. 779–788, doi: https://doi.org/10.1109/CVPR.2016.91.
[6] I. Alrushidy, Y. Bahumid, R. Bin Shujaa, A. Abdullah, A. Kurd, and M. Abdullah, "Design and fabrication of color sorting machine based on computer vision," J. Sci. Technol., vol. 30, no. 6, pp. 107–115, May 2025, doi: https://doi.org/10.20428/jst.v30i6.2954.
[7] P. Warden and D. Situnayake, TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-low-power Microcontrollers. O’Reilly, 2020. [Online]. Available: https://books.google.com.vn/books?id=sB3mxQEACAAJ
[8] AMS-TAOS USA Inc., “TCS3200, TCS3210 Programmable Color Light-to-Frequency Converter,” 2009, Plano, TX, USA.
[9] R. O. Duda, P. E. Hart, and D. G. Stork, Pattern Classification. Wiley, 2012. [Online]. Available: https://books.google.com.vn/books?id=Br33IRC3PkQC
[10] T. M. Cover and P. E. Hart, "Nearest neighbor pattern classification," IEEE Trans. Inf. Theory, vol. 13, no. 1, pp. 21–27, Jan. 1967, doi: https://doi.org/10.1109/TIT.1967.1053964.


