Skip to content
esp-labsESP32-S3 bench guide

ESP32-S3 track guide · 8 hands-on labs

ESP32-S3 I2S Audio & Microphone Labs: DSP, FFT & Synthesis

Compare analog ADC1 microphones (KY-037) against 24-bit digital I2S MEMS microphones (INMP441), measure room dBFS levels, build a clap state machine, stream voice recordings, plot real-time FFT spectrums on the TFT, and drive a MAX98357A I2S Class-D amplifier.

Hardware needed for this track

Browse full parts library

Base requirement: ESP32-S3-DevKitC-1 board and a USB-C data cable.

  • 1.9″ ST7789 screen
  • KY-037 analog microphone
  • INMP441 I²S microphone
  • MAX98357A amp + speaker
  • LED + 220–330 Ω resistor
  • 2.4 GHz Wi-Fi network

All labs in this track

  1. See your voice and a clap as a wave, compare the two microphones, read the bias (or the bits), and tune the comparator so it fires only with loud sounds.

    • analog vs digital mic
    • I2S
    • bias voltage
    • ADC attenuation
    • continuous ADC + DMA
    • ring buffer
    • 6 dB per bit, headroom
    • comparator & hysteresis
    • dBFS
  2. Read your room's level (in dB SPL with the INMP441), see the difference between fast and slow, keep a diary, and set off (and silence) the alarm.

    • decibels (+6 = ×2)
    • RMS
    • dB SPL needs a known sensitivity
    • unweighted vs dBA
    • 85 dB risk line
    • fast / slow smoothing
    • noise floor
    • echo guard
  3. Make 1, 2, 3 and 4 claps do four different things, prove that talking doesn't trigger them, and tune the detector to your own claps.

    • onset detection
    • a clap's shape
    • hysteresis
    • grouping in time
    • calibrating from data
    • NVS map
    • sound as feedback
    • echo guard
  4. Record a sentence hands-free, see the pre-roll, play it on your phone, and pull one clip to your Mac as a WAV file.

    • pre-roll from a ring
    • trigger + hold
    • PSRAM clip store
    • WAV format
    • streaming responses
    • base64 + CRC-32
    • playback speed = pitch
    • tokens & visible recording
  5. Find the frequency of your whistle, see why finer bins are slower, and score in the steer game.

    • FFT bins
    • Hann window & leakage
    • Nyquist (8 kHz)
    • resolution vs speed
    • log frequency
    • notes & cents
    • reference tones
    • log sweep
  6. Open the lock with your secret knock (and fail with a wrong one), get past 5 pipes in Clap Bird, and make the party follow a song's tempo.

    • tempo-free rhythm
    • tolerance
    • fixed-step game physics
    • latency (onset vs clap)
    • beat detection
    • median tempo
    • one sensor, many uses
  7. Hear the difference between the five waves, play a chord and a tune, change the envelope until a note plucks, and fire every game sound.

    • I2S out
    • class-D amplifier
    • timbre = harmonics
    • aliasing at 16 kHz
    • ADSR vs clicks
    • semitones & chords
    • tempo
    • procedural sound
    • squared volume
  8. Make the parrot repeat you in three voices, talk through the live echo without a howl, and explain why a chipmunk talks fast.

    • resampling = pitch + speed
    • ring modulation f±c
    • bitcrush
    • delay + feedback
    • loop gain < 1
    • howl detection
    • latency budget
    • echo guard

ESP32-S3 peripherals covered

Check all 17 ESP32-S3 hardware gotchas
  • I2S

    Digital audio in and out: microphones, amplifiers, codecs

  • SAR ADC

    Two 12-bit converters that turn a voltage into a number

  • GDMA

    Moves data between memory and peripherals without the CPU

  • SPI

    Fast four-wire bus for screens, card readers and flash

Frequently asked questions

Why choose an INMP441 I2S microphone over an analog KY-037 module?
The INMP441 samples audio digitally at 24 bits and streams it via I2S + GDMA with low noise and zero ADC DC-bias drift, whereas the KY-037 outputs an analog voltage that depends on potentiometer bias.
Can I use two I2S peripherals at once for microphone input and speaker output?
Yes. The ESP32-S3 has two independent I2S controllers (I2S0 and I2S1), allowing full-duplex or simultaneous INMP441 capture and MAX98357A playback as shown in Lab S8.
Why should the KY-037 analog output connect to GPIO6 (ADC1) instead of GPIO11+?
GPIO6 belongs to ADC1, which stays available even when Wi-Fi is enabled in Lab S4's recorder. ADC2 pins (GPIO11-20) conflict with the Wi-Fi driver.