Resumen: Proprietary systems used to modernize Industry 4.0 usually involve high financial costs. Consequently, using low-cost devices with the same functionalities, capable of replacing these proprietary systems but at a lower cost, has become an incipient trend. However, these low-cost devices usually come with electromagnetic interference problems as they are encapsulated in electrical panels, sitting alongside electromechanical devices. In this article, we present Mode Binary Search, an algorithm specifically designed for use in a low-cost automated-industrial-productivity-data-collection system. Specifically, productivity data are obtained from the availability and sealing signals of the thermoplastic sealing machines in production lines belonging to the agri-food industry. Mode Binary Search was designed to cluster sealing signals, thus enabling us to identify which products have been made. Furthermore, the algorithm determines when the manufacturing of each product starts and ends, in other words, the exact moment a product change occurs and all this without the need for operator supervision or intervention. Finally, we compared our algorithm, based on binary search, with three clustering mechanisms: k-means, k-rms and x-means. Out of all the cases we analyzed, the maximum error committed by Mode Binary Search is limited to 2.69%, thereby outperforming all others. Idioma: Inglés DOI: 10.3390/electronics12153262 Año: 2023 Publicado en: Electronics 12, 15 (2023), 3262 [21 pp] ISSN: 2079-9292 Factor impacto JCR: 2.6 (2023) Categ. JCR: COMPUTER SCIENCE, INFORMATION SYSTEMS rank: 115 / 250 = 0.46 (2023) - Q2 - T2 Categ. JCR: PHYSICS, APPLIED rank: 81 / 179 = 0.453 (2023) - Q2 - T2 Categ. JCR: ENGINEERING, ELECTRICAL & ELECTRONIC rank: 157 / 353 = 0.445 (2023) - Q2 - T2 Factor impacto CITESCORE: 5.3 - Hardware and Architecture (Q2) - Control and Systems Engineering (Q2) - Electrical and Electronic Engineering (Q2) - Signal Processing (Q2) - Computer Networks and Communications (Q2)