Dispositivo de ultra-bajo costo para la clasificación de licores usando tecnología TinyML
Palabras clave:
TinyML, Clasificación de licores, Redes neuronales artificiales, sensor MQ135, Microcontrolador ESP32Contenido principal del artículo
Objetivo: Diseñar e implementar un sistema de identificación de licores mediante TinyML, empleando un sensor MQ-135 y un microcontrolador ESP32 de Espressif Systems. El objetivo es optimizar el procesamiento local para lograr alta precisión y baja latencia, validando así su viabilidad como solución accesible en entornos con recursos limitados.
Metodología: La metodología empleó una Red Neuronal Artificial (RNA) para clasificar licores según los compuestos volátiles detectados por el sensor. Se recopiló un conjunto de datos con 6000 mediciones y el modelo de RNA se entrenó en MATLAB® R2018a. Para la evaluación del rendimiento, el conjunto de datos se dividió en un 70 % para entrenamiento, un 15 % para validación y un 15 % para pruebas, utilizando el Error Cuadrático Medio (EMM) como métrica principal.
Resultados: El modelo de ANN implementado convergió tras 375 épocas, alcanzando un Error Cuadrático Medio (EMM) mínimo de 1,05 × 10⁻⁹ y un coeficiente de correlación (R) de 1,0. Sintetizado en el microcontrolador ESP32, el modelo utilizó solo el 24,8 % de la memoria Flash y el 6,3 % de la RAM. El tiempo de inferencia registrado para la ejecución fue de 2,43 ms, lo que arroja una precisión de clasificación del 84,4 %. Esta solución rentable, con un precio de 15 USD, supera las opciones comerciales existentes.
Conclusiones: Alcanza un tiempo de inferencia excepcionalmente rápido de 2,43 ms con un consumo energético operativo mínimo, de entre 5 mA y 10 mA. Este rendimiento, sumado al bajo coste de fabricación (15 USD), contrasta marcadamente con las soluciones comerciales, que a menudo superan los cientos de dólares. En consecuencia, el sistema es muy viable para su implementación en aplicaciones integradas de control de calidad y de la industria alimentaria.
1. Saraan A, Hussain N, Zahara SM. Tiny Machine Learning (TinyML) Systems [Internet]. 2024 [cited in mar 2025]. Available in: https://www.researchgate.net/publication/386579238_Tiny_Machine_Learning_TinyML_Systems
2. Murshed MGS, Murphy C, Hou D, Khan N, Ananthanarayanan G, Hussain F. Machine learning at the network edge: A survey. ACM Comput Surv [Internet]. 2021 [cited in mar 2025]; 54(8):Article 170, 1-37. https://doi.org/10.1145/3469029 DOI: https://doi.org/10.1145/3469029
3. Schizas N, et al. TinyML for ultra-low power AI and large scale IoT deployments: A systematic review. 2022. https://doi.org/10.3390/fi14120363 DOI: https://doi.org/10.3390/fi14120363
4. Tsoukas V, Gkogkidis A, Boumpa E, Papafotikas S, Kakarountas A. A gas leakage detection device based on the technology of TinyML. En: 2023 12th International Conference on Modern Circuits and Systems Technologies (MOCAST); 2023. p. 1-4. IEEE. https://doi.org/10.1109/MOCAST54814.2022.9837510 DOI: https://doi.org/10.1109/MOCAST54814.2022.9837510
5. Bagheri M, Farshforoush N, Bagheri K, Shemirani AI. Application of TinyML in water environments. Environ Monit Assess. 2023;195(5):1-14.
6. Atanane O, Mourhir A, Benamar N, Zennaro M. Smart buildings water leakage detection using TinyML. Sensors. 2023;23(9):4473. https://doi.org/10.3390/s23229210 DOI: https://doi.org/10.3390/s23229210
7. Zhou Q, Zhang S, Li Y, Xie C, Li H, Ding X. A Chinese liquor classification method based on liquid evaporation and a metal oxide gas sensor. Sens Actuators B Chem. 2011;158(1):241-6. https://doi.org/10.1016/j.snb.2011.08.015 DOI: https://doi.org/10.1016/j.snb.2011.08.015
8. Zhang Q, Xie C, Zhang S, Wang A, Zhu B, Wang L, et al. Identification and pattern recognition analysis of Chinese liquors by doped nano ZnO gas sensor array. Sens Actuators B Chem. 2005;110(2):370-6. https://doi.org/10.1016/j.snb.2005.02.017 DOI: https://doi.org/10.1016/j.snb.2005.02.017
9. Scorsone E, Pisanelli AM, Persaud KC. Development of an electronic nose for fire detection. Sens Actuators B Chem. 2006;116(1-2):55-61. https://doi.org/10.1016/j.snb.2005.12.059 DOI: https://doi.org/10.1016/j.snb.2005.12.059
10. Zhang Q, Zhang S, Xie C, Zeng D, Fan C, Li D. Characterization of Chinese vinegars by electronic nose. Sens Actuators B Chem. 2006;120(2):694-9. https://doi.org/10.1016/j.snb.2006.01.007 DOI: https://doi.org/10.1016/j.snb.2006.01.007
11. Wongchoosuk C, Wisitsoraat A, Tuantranont A, Kerdcharoen T. Portable electronic nose based on carbon nanotube-SnO₂ gas sensors and its application for detection of methanol contamination in whiskeys. Sens Actuators B Chem. 2010;147(2):392-9. https://doi.org/10.1016/j.snb.2010.03.072 DOI: https://doi.org/10.1016/j.snb.2010.03.072
12. Vega-Luna JI, Lagos-Acosta MA, Salgado-Guzmán G. Monitoreo de concentración de monóxido de carbono usando tecnología long-range. In: Congreso Internacional sobre Innovación y Desarrollo Tecnológico (CIINDET); 2017. p. 1-6. IEEE. https://doi.org/10.17163/ings.n18.2017.09 DOI: https://doi.org/10.17163/ings.n18.2017.09
13. Nagy AS, Polanco Risquet A, Martínez de la Cotera OL, Carralero Ibargollen O. Medición simultánea de gases con sensores MQ. RIELAC Revista de Ingeniería Electrónica, Automática y Comunicaciones. 2020;41(1):34-43. Disponible en: http://scielo.sld.cu/pdf/eac/v41n1/1815-5928-eac-41-01-34.pdf
14. Jiang X, Liu X, Wu Y, Yang D. White wine quality prediction and analysis with machine learning techniques. Highlights in Science, Engineering and Technology. 2023;39(1):321-326. doi: https://doi.org/10.54097/hset.v39i.6548 DOI: https://doi.org/10.54097/hset.v39i.6548
15. Botero-Valencia JS, Barrantes-Toro C, Márquez-Viloria D, Pearce JM. Low-cost air, noise, and light pollution measuring station with wireless communication and TinyML. HardwareX. 2023;14:e00422. https://doi.org/10.1016/j.ohx.2023.e00477 DOI: https://doi.org/10.1016/j.ohx.2023.e00477
16. Hayajneh AM, et al. Tiny Machine Learning on the edge: A framework for transfer learning empowered UAV-assisted smart farming. 2023. https://doi.org/10.1049/smc2.12072 DOI: https://doi.org/10.1049/smc2.12072
17. Karras A, et al. TinyML algorithms for big data management in large-scale IoT systems. 2024. https://doi.org/10.3390/fi16020042 DOI: https://doi.org/10.3390/fi16020042
18. Dutta L, Bharali S. TinyML meets IoT: A comprehensive survey. 2021. https://doi.org/10.1016/j.iot.2021.100461 DOI: https://doi.org/10.1016/j.iot.2021.100461
19. Srinivasagan R, Mohammed M, Alzahrani A. TinyML-Sensor for shelf life estimation of fresh date fruits. Sensors. 2023;23(16):7081 https://doi.org/10.3390/s23167081 DOI: https://doi.org/10.3390/s23167081
20. Capogrosso L, Cunico F, Cheng DS, Fummi F, Cristani M. A machine learning-oriented survey on Tiny Machine Learning. IEEE Access. 2024;12:3365349. https://doi.org/10.1109/ACCESS.2024.3365349 DOI: https://doi.org/10.1109/ACCESS.2024.3365349
21. Banbury CR, Zhou W, Fedorov I, Matas R, Thakker U, Gope D, et al. Benchmarking TinyML systems: Challenges and direction. arXiv preprint arXiv:2003.04821. 2020. Available in: https://arxiv.org/abs/2003.04821
22. Hymel S, Banbury CR, Montemerlo R, Reddi VJ. Edge Impulse: An MLOps platform for Tiny Machine Learning. arXiv preprint arXiv:2212.03332. 2023. Available in: https://arxiv.org/abs/2212.03332
23. Lê MT, Bouzid Y, Miloud B, Hajjaji MA, Bensrhair A. Efficient neural networks for Tiny Machine Learning: A comprehensive review. arXiv preprint arXiv:2311.11883. 2023. Available in: https://arxiv.org/abs/2311.11883
24. Ray PP. A review on TinyML: State-of-the-art and prospects. J King Saud Univ Comput Inf Sci. 2022;34(4):1595-623. https://doi.org/10.1016/j.jksuci.2021.11.019 DOI: https://doi.org/10.1016/j.jksuci.2021.11.019
25. Sze V, Chen Y, Yang T. Efficient processing of deep neural networks: A tutorial and survey. Proc IEEE. 2017;105(12):2295-329. https://doi.org/10.1109/JPROC.2017.2761740 DOI: https://doi.org/10.1109/JPROC.2017.2761740
26. Henan Hanwei Electronics Co. Ltd. Technical Data MQ-135 Gas Sensor. Hanwei Electronics. 2013. Available in: https://www.electronicoscaldas.com/datasheet/MQ-135_Hanwei.pdf
27. Biglari A, Tang W. A review of embedded machine learning based on hardware, application, and sensing scheme. Sensors. 2023;23(4):2131. https://doi.org/10.3390/s23042131 DOI: https://doi.org/10.3390/s23042131
28. MathWorks. nntraintool Neural network training tool - MATLAB. 2025 Feb 19 [cited in Mar 2025]. Available in: https://www.mathworks.com/help/deeplearning/ref/nntraintool.html
29. Bagheri M, Farshforoush N, Bagheri K, Shemirani AI. Applications of artificial intelligence technologies in water environments: From basic techniques to novel tiny machine learning systems. Process safety and environmental Protection. 2023;180(1):10-22. doi: https://doi.org/10.1016/j.psep.2023.09.072 DOI: https://doi.org/10.1016/j.psep.2023.09.072
30. Espressif Systems. ESP32 series datasheet. Espressif Systems. 2025 Feb 19 [cited in Mar 2025]. Available in: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
31. Lourakis MIA. A Brief Description of the Levenberg-Marquardt Algorithm Implemented by levmar. Institute of Computer Science, Foundation for Research and Technology - Hellas (FORTH); Heraklion, Greece; 2005. Disponible en: https://users.ics.forth.gr/lourakis/levmar/levmar.pdf
32. Aljohani JL, Alaidaorous ES, Raja MAZ, Alhothuali MS, Shoaib M. Backpropagation of Levenberg-Marquardt artificial neural networks for wire coating analysis in the bath of Sisko fluid. Ain Shams Engineering Journal. 2021; 12(4): 4133-4143. doi: https://doi.org/10.1016/j.asej.2021.03.007 DOI: https://doi.org/10.1016/j.asej.2021.03.007
33. Ciuffoletti A. Low-Cost IoT: A Holistic Approach. Journal of Sensor and Actuator Networks. 2018; 7: 19. https://doi.org/10.3390/jsan7020019 DOI: https://doi.org/10.3390/jsan7020019
34. Cubic Instruments. Portable Headspace Analyzer (MAP) Gasboard-3210Plus. 2025 Mar 5 [citado 2025 Mar 5]. Available in: https://www.gasanalyzers.com/ProcessGasAnalyzer/info190
35. Anton Paar. Alcohol and Extract Meter for the Beverage Industry. 2025 Mar 5 [cited in Mar 2025]. Available in: https://www.anton-paar.com
Downloads

Esta obra está bajo una licencia internacional Creative Commons Atribución-NoComercial-CompartirIgual 4.0.
Los autores que publican en esta revista están de acuerdo con los siguientes términos:
Los autores ceden los derechos patrimoniales a la revista y a la Universidad del Valle sobre los manuscritos aceptados, pero podrán hacer los reusos que consideren pertinentes por motivos profesionales, educativos, académicos o científicos, de acuerdo con los términos de la licencia que otorga la revista a todos sus artículos.
Los artículos serán publicados bajo la licencia Creative Commons 4.0 BY-NC-SA (de atribución, no comercial, sin obras derivadas).