A Proposed Approach to Utilizing Esp32 Microcontroller for Data Acquisition

data acquisition digital filters fast Fourier transforms microcontroller spectrogram

Authors

  • Vy-Khang Tran Faculty of Automation Technology, College of Engineering, Can Tho University, 3/2 street, Can Tho city 94100, Vietnam , Viet Nam
  • Bao-Toan Thai Faculty of Automation Technology, College of Engineering, Can Tho University, 3/2 street, Can Tho city 94100, Vietnam , Viet Nam
  • Hai Pham Aerospace Engineering and Aviation Discipline, School of Engineering, RMIT University, La Trobe street, Melbourne, VIC 3000, Australia, Viet Nam
  • Van-Khan Nguyen Deparment of Electrical Engineering and Energy, College of Electrical Engineering - Electronic - Telecommunications, Can Tho University of Technology, Nguyen Van Cu street, Can Tho city 94100, Vietnam, Viet Nam
  • Van-Khanh Nguyen
    vankhanh@ctu.edu.vn
    Faculty of Automation Technology, College of Engineering, Can Tho University, 3/2 street, Can Tho city 94100, Vietnam , Viet Nam
August 6, 2024

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.