A Proposed Approach to Utilizing Esp32 Microcontroller for Data Acquisition

Downloads
Accurate data acquisition is crucial in embedded systems. This study aimed to evaluate the data acquisition ability of the ESP32 Analog to Digital Converter (ADC) module when combined with the I2S module to collect high-frequency data. Sine waves at various frequencies and white noise were recorded in this mode. The recorded data were analyzed by the fast Fourier transform (FFT) to assess the accuracy of the recorded data and evaluate the generated noise. Digital filters are proposed to improve the quality of the collected signals. A 2D spectrogram imaging algorithm is proposed to convert the data to time-frequency domain images. The results showed that the ADC module could effectively collect signals at frequencies up to 96 kHz; frequency errors were proportional to the sampling rate, and the maximum was 79.6 Hz, equivalent to 0.38%. The execution time of the lowpass and highpass filters was about 6.83 ms and for the bandpass filter about 5.97 ms; the spectrogram imaging time was 40 ms; while the calculation time for an FFT transform was approximately 1.14 ms, which is appropriate for real-time running. These results are significant for data collection systems based on microcontrollers and are a premise for deploying TinML networks on embedded systems.
Rosiek S. & Batlles, F., A Microcontroller-based Data-Acquisition System for Meteorological Station Monitoring, Energy Conversion & Management, 49(12), pp. 3746-3754, 2008.
Boquete, L., Rodríguez-Ascariz, J.M., Barea, R., Cantos, J., Miguel-Jiménez, J.M. & Ortega, S., Data Acquisition, Analysis and Transmission Platform for a Pay-As-You-Drive System, Sensors, 10(6), pp. 5395-5408, 2010.
Mahjoubi, A., Fethi Mechlouch, R. & Ben Brahim, A., A Low Cost Wireless Data Acquisition System for a Remote Photovoltaic (PV) Water Pumping System, Energies, 4(1), pp. 68-89, 2011.
Panagopoulos, O. & Argiriou, A.A., Low-Cost Data Acquisition System for Solar Thermal Collectors, Electronics, 11(6), pp. 934, 2022.
Mobaraki, B., Komarizadehasl, S., Pascual, F.J.C., Lozano-Galant, J.A. & Soriano, R.P., A Novel Data Acquisition System for Obtaining Thermal Parameters of Building Envelopes, Buildings, 12(5), 670, 2022.
Babiuch, M., Foltýnek, P. & Smutný, P., Using the ESP32 Microcontroller for Data Processing, in 2019 20th International Carpathian Control Conference (ICCC) pp. 1-6, IEEE, 2019.
Krotov, A., Tarasov, S., Lunev, A., Borisov, R. & Kushevarova, D., Data Acquisition and Processing Algorithm for Total and Static Pressure Measurement System, Engineering Proceedings, 27(1), 23, 2022.
González, A., Olazagoitia, J.L. & Vinolas, J., A Low-Cost data Acquisition System for Automobile Dynamics Applications, Sensors, 18(2), 366, 2018.
Ryu, S. & Kim, S.C., Embedded Identification of Surface based on Multirate Sensor Fusion with Deep Neural Network, IEEE embedded systems letters, 13(2), pp. 49-52, 2022.
Kumar, S., Kolekar, T., Patil, S., Bongale, A., Kotecha, K., Zaguia, A. & Prakash, C., A Low-Cost Multi-Sensor Data Acquisition System For Fault Detection in Fused Deposition Modelling, Sensors, 22(2), 517, 2022.
Miquel, J., Latorre, L. & Chamaillé-Jammes, S., Addressing Power Issues in Biologging: An Audio/Inertial Recorder Case Study, Sensors, 22(21), 8196, 2022.
Nguyen, V.K., Tran, V.K., M.K., Thach, V.T.E., Pham, T.L.H. & Nguyen, C.N., Realtime Non-invasive Fault Diagnosis of Three-phase Induction Motor, Journal of Technical Education Science, 17(Special Issue 3), pp. 1-11, 2022.
Hoang, V.T., Nguyen, V.K. & Nguyen, C.N., Proposal of Noninvasive Failure Diagnosis of Electrical Motor using Googlenet, Journal of Technical Education Science, 16(5) pp. 83-93, 2021.
Rein, S. & Reisslein, M., Low-Memory Wavelet Transforms for Wireless Sensor Networks: A Tutorial, IEEE Communications Surveys & Tutorials, 13(2), pp. 291-307, 2010.
Mirghani, M., Implementation of Matched Filters using Microcontroller, in 2016 Conference of Basic Sciences & Engineering Studies (SGCAC), pp. 128-132, IEEE, 2016.
Tey, W.T., Connie, T., Choo, K.Y. & Goh, M.K.O., Cicada Species Recognition Based on Acoustic Signals, Algorithms, 15(10), 358, 2022.
Warden, P. & Situnayake, D., Tinyml: Machine Learning with Tensorflow Lite on Arduino and Ultra-low-power Microcontrollers, O'Reilly Media, 2019.
Llisterri Giménez, N., Monfort Grau, M., Pueyo Centelles, R. & Freitag, F., On-Device Training of Machine Learning Models on Microcontrollers with Federated Learning, Electronics, 11(4), 573, 2022.
Espressif, Inter-IC Sound (I2S) - ESP-IDF Programming Guide latest documentation, Retrieved from https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/i2s.html (May 25, 2023)
Majorkowska-Mech, D. & Cariow, A., Some FFT Algorithms for Small-Length Real-Valued Sequences, Applied Sciences, 12(9), 4700, 2022.
Cooley, J.W. & Tukey, J.W., An Algorithm for the Machine Calculation of Complex Fourier Series. Mathematics of Computation, 19(90), pp. 297-301, 1965.
Borgerding, M., from https://github.com/mborgerding/kissfft/ (May 25, 2023)
Karjadi, M., Salahuddin, N.S., Wibowo, E.P. & Afandi, H., Digital Filter Design of Infinite Impulse Response (IIR) Infrasound to Detect Fetal Heart Rate, Int. J. Eng. Res. Sci, 2, pp. 25-38, 2016.
Van Valkenburg, M.E., Analog Filter Design, Oxford, 1982.
Bosse, G., Siebketten ohne Dämpfungsschwankungen im Durchlassbereich (Potenzketten), Frequenz, 5(10), pp. 279-284, 1951.
Weinberg, L., Network Analysis and Synthesis, RE Krieger Publishing Company, 1975 .
Matthaei, G., Microwave Filters, Impedance-Matching Networks and Coupling Structures, Artech House Book, pp. 775-809, 1980.
Copyright (c) 2024 Journal of Engineering and Technological Sciences

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.