Skip to content

Week 9 Input Devices

Group assignment

Week 9 Chaihuo group assignment.

Individual assignment

Based on my final project, I am trying to build a prototype to connect the human voice for a voice interaction device. The input part will be the mic. The materials I will use are:

Components

  • Input: microphone, INMP441, as picture below

  • Output: display, GC9A01 1.28 inch, LCD, SPI display, as picture below

  • MCU: Xiao ESP32-C3

  • Breadboard

  • Cables

Learning the pins of each component and wiring

Pin of display

Pin of the microphone

Microphone pin descriptions (English)

  • SCK: Serial data clock for the I²S interface.

  • WS: Serial data word select for the I²S interface.

  • L/R: Left/Right channel selection.

  • When set to Low level (GND), the microphone outputs signals on the left channel of the I²S frame.

  • When set to High level (VCC), the microphone outputs signals on the right channel of the I²S frame.

  • SD: Serial data output for the I²S interface.

  • VCC: Power input, 1.8V to 3.3V

  • GND: Power ground.

Wiring

ESP32-C3 I/O overview

Microphone (INMP441) ➔ Seeed XIAO ESP32-C3 Wiring

Standard I2S digital audio bus connection:

Microphone Pin (INMP441) Seeed XIAO ESP32-C3 Physical Pin Corresponding Pin in Code (GPIO) Bus Function Description
VCC 3.3V 3.3V Digital power supply for the microphone.
GND GND GND Power ground.
L/R GND GND Grounded (Low): Outputs Left Channel for single-channel (Mono) audio.
SCK D2 GPIO 4 I2S Serial Bit Clock line (BCLK).
WS D3 GPIO 5 I2S Word Select / Frame Clock line (LRCK).
SD D1 GPIO 3 I2S Serial Data Out line (audio data input to the MCU).

Round screen (GMT128-02 / GC9A01) ➔ Seeed XIAO ESP32-C3 Wiring

4-line SPI serial bus connection:

Screen Pin (GMT128-02) Seeed XIAO ESP32-C3 Physical Pin Corresponding Pin in Code (GPIO) Adjustment & Advantage Description
1. VCC 5V 5V Connects to the stable 5V rail to ensure enough power for the backlight.
2. GND GND GND Power ground (must share a common ground with the microphone).
3. SCL D8 GPIO 8 Hardware Fixed: SPI Serial Clock line (SCK).
4. SDA D10 GPIO 10 Hardware Fixed: SPI Serial Data Out line (MOSI).
5. DC D4 GPIO 6 Data/Command selection pin.
6. CS D0 GPIO 2 Strapping Pin Warning: Please check the crucial boot note below.
7. RST D5 GPIO 7 Hardware reset pin (active low).

With a breadboard and cables

Debug and test mic

Step 1 Connect the prototype with laptop

Step 2 Use Cursor to debug

  • Ask Cursor to check the connection

  • Tell Cursor the demand: Xiao ESP32-C3 + display (GC9A01) + mic (INMP441)

Cursor checks the pin connection. I sent the settings above as pictures.

Debug on the connection, setting as below from Cursor

Upon powering up, you should observe the following:

  • Red → Green → Blue → White (approx. 0.6 seconds each)

  • Black background with a cyan horizontal bar in the center

  • A green volume bar at the bottom (elongates when speaking into the microphone); it shows the mic works well, see the video