SPH0645 I2S MEMS Microphone Breakout Sensor

SKU: SP6004
SPH0645 I2S MEMS microphone breakout board with a loose 6-pin header strip
SPH0645 I2S MEMS microphone breakout board, top view with 15.6 mm by 11.2 mm dimensions

SPH0645 I2S MEMS Microphone Breakout Sensor

SKU: SP6004
Regular price $14.99
/
  • Free shipping on all orders over $100
  • Secure payments
  • In stock, ready to ship
  • Inventory on the way

Add $100.00 more for free shipping

Tax included. Shipping calculated at checkout.

10+ in stock

You'll also need

Choose a quantity and add it to your cart.

USB Cable - Type C
$2.9910+ in stock
Breadboard 400 holes
$4.4910+ in stock
Breadboard Jumper Wire - 140pcs
$11.9910+ in stock

The SPH0645 I2S MEMS microphone breakout is a small digital microphone board with a Knowles SPH0645LM4H-B microphone and an I2S output, for ESP32 and Raspberry Pi Pico projects.

Instead of an analog output it has three digital signal pins: bit clock, word select and data. Your board supplies the clocks and reads the audio samples directly, with no analog-to-digital conversion on your side. It suits audio recording, sound-level monitoring and voice projects.

Interface
I2S digital output
Logic level
3.3 V
SNR
65 dB(A)
Sensitivity
−26 dBFS typ.

Why choose it

  • No analog stage to tune — the microphone outputs 24-bit I2S words with 18 bits of data, so there is no gain or offset to set up.
  • Good for level and voice work — 65 dB(A) signal-to-noise ratio and 120 dB SPL acoustic overload point (datasheet typical values).
  • Stereo with two boards — the SEL pin picks the left or right slot, so two modules can share one I2S bus.

Specifications

Microphone
Type MEMS, I2S digital output (the host supplies BCLK and WS)
Output format I2S, 24-bit word, two's complement, MSB first; 18 bits of data, unused bits are zero
Sensitivity −26 dBFS typical (−29 to −23 dBFS) at 94 dB SPL, 1 kHz
Signal-to-noise ratio 65 dB(A) typical at 94 dB SPL, 1 kHz
Acoustic overload point 120 dB SPL typical (10% THD at 1 kHz)
Total harmonic distortion 1% maximum at 94 dB SPL, 1 kHz
Interface
Bit clock (BCLK) 2.048 MHz to 4.096 MHz
Sampling rate 32 kHz to 64 kHz (word select = BCLK ÷ 64)
Channel select (SEL) Low: left slot (mono). High: right slot
Power
Chip supply voltage 1.62 V to 3.6 V
Module logic level 3.3 V
Supply current 600 µA typical (chip, VDD = 1.8 V)
Physical
Board size 15.6 × 11.2 mm (from the product photo)
Pins 6

Compatibility

Platform Works Notes
Arduino UNO / Nano (5 V) ✗ No The ATmega328P has no I2S peripheral, and the module is a 3.3 V device.
ESP32 (3.3 V) ✓ Yes Uses the ESP_I2S library from the esp32 board package, version 3.0.0 or newer.
Raspberry Pi Pico (3.3 V) ✓ Yes Uses MicroPython's machine.I2S class.
Raspberry Pi (Linux) ◐ With setup Needs the I2S overlay described in the Adafruit guide; audio is captured at a fixed 48 kHz with that overlay.
Software ✓ Yes Arduino IDE with "esp32 by Espressif Systems".

In the box

Included
  • 1 × SPH0645 I2S MEMS microphone breakout board
  • 1 × 6-pin male pin header strip

Applications

  • Recording audio with an ESP32 or Raspberry Pi Pico
  • Sound-level and noise monitoring
  • Voice-activated projects

Tutorial

What you'll build: a live sound-level meter. The board reads the microphone and prints the loudness four times a second, with a bar of # marks that grows as it gets louder. · About 20 minutes.

How it works

This microphone turns sound into numbers by itself. Your board does not measure a voltage. It sends two clock signals and the microphone answers with a stream of digital audio samples.

  • I2S — a three-wire audio connection. BCLK is the bit clock, LRCL says which channel (left or right) is being sent, and DOUT carries the data from the microphone.
  • SEL — chooses the channel. Wired to GND, the microphone sends on the left channel, so you get one mono signal.
  • GND — the return path. Every GND must be joined.
  • Samples — each sample is a 24-bit word with 18 bits of data, so the code shifts it right by 14 bits to get a number from about −131072 to +131072.
ESP32 Tutorial

You need: an ESP32 DevKitC (ESP32-WROOM-32) board, a USB data cable, 6 jumper wires, a breadboard, and this microphone module with its pin header soldered on.

ESP32 DevKitCSPH0645 module3V33VGNDGNDGNDSELGPIO26BCLKGPIO25LRCLGPIO33DOUT

■ Power ■ GND ■ I2S (clock and data)

# ESP32 pin Module pin Wire colour Notes
1 3V3 3V Red Power (3.3 V)
2 GND GND Black Ground
3 GND SEL Black SEL low = left slot (mono)
4 GPIO26 BCLK Blue Bit clock
5 GPIO25 LRCL Blue Word select (left/right clock)
6 GPIO33 DOUT Blue Data from the microphone

Watch out: ESP32 pins are 3.3 V only. Power the module from the 3V3 pin, never from 5 V. Check the pin labels printed on your board, because the order of the pads can differ.

1
Install the Arduino IDE
Download and install the Arduino IDE (version 2 or newer). Open it.
2
Add the ESP32 board package
Open File → Preferences, paste https://espressif.github.io/arduino-esp32/package_esp32_index.json into "Additional boards manager URLs", then click OK. Open Tools → Board → Boards Manager, search for "esp32", and install "esp32 by Espressif Systems" version 3.0.0 or newer (the ESP_I2S library comes with it). Steps with pictures are in the official install guide.
3
Wire it up
Connect the six wires as in the diagram and the table above. Keep the SEL wire on GND.
4
Upload the example
Choose Tools → Board → esp32 → ESP32 Dev Module, pick your port under Tools → Port, paste the sketch below, and click Upload. If the upload fails, set Tools → Upload Speed to 115200 and upload again.
▸ Example 1 — Sound level meter (ESP32)
// SPH0645 I2S microphone level meter - ESP32 (ESP_I2S library)
// Wiring: 3V->3V3, GND->GND, SEL->GND, BCLK->GPIO26, LRCL->GPIO25, DOUT->GPIO33
#include <ESP_I2S.h>

const int I2S_BCLK_PIN = 26;      // bit clock (BCLK), matches the pin table
const int I2S_WS_PIN   = 25;      // word select (LRCL), matches the pin table
const int I2S_DIN_PIN  = 33;      // data from the microphone (DOUT)
const int SAMPLE_RATE  = 32000;   // you can change this (32000 to 64000 Hz)
const int MAX_LEVEL    = 20000;   // you can change this: bigger = bar grows more slowly

I2SClass i2s;
int32_t samples[256];
long peak = 0;
unsigned long lastPrint = 0;

void setup() {
  Serial.begin(115200);
  i2s.setPins(I2S_BCLK_PIN, I2S_WS_PIN, -1, I2S_DIN_PIN);  // BCLK, WS, no data out, data in
  // 32-bit slot, mono, left slot (SEL is wired to GND)
  if (!i2s.begin(I2S_MODE_STD, SAMPLE_RATE, I2S_DATA_BIT_WIDTH_32BIT, I2S_SLOT_MODE_MONO, I2S_STD_SLOT_LEFT)) {
    Serial.println("I2S not started - check wiring");
    while (true) delay(1000);
  }
  Serial.println("OK - epartners.co.nz test");
}

void loop() {
  size_t bytesRead = i2s.readBytes((char *)samples, sizeof(samples));
  int count = bytesRead / sizeof(int32_t);
  for (int i = 0; i < count; i++) {
    long v = samples[i] >> 14;      // the microphone has 18 bits of data in a 32-bit slot
    if (v < 0) v = -v;
    if (v > peak) peak = v;
  }
  if (millis() - lastPrint >= 250) { // print four times a second
    int bar = map(constrain(peak, 0, MAX_LEVEL), 0, MAX_LEVEL, 0, 40);
    Serial.print("Level: ");
    Serial.print(peak);
    Serial.print(" ");
    for (int i = 0; i < bar; i++) Serial.print('#');
    Serial.println();
    peak = 0;
    lastPrint = millis();
  }
}
5
Open the Serial Monitor
Choose Tools → Serial Monitor and set the speed to 115200 baud.

✓ Check: The Serial Monitor prints "OK - epartners.co.nz test" once, then a "Level:" line four times a second. Clap or speak near the module and the line of # marks gets longer.

Troubleshooting

Board Problem Likely cause Fix
All Level stays at 0 A wire is loose, or BCLK, LRCL and DOUT are in the wrong holes Check each wire against the pin table, and check the pin labels on your module.
All Level jumps around with no sound SEL is not connected, so the microphone may answer on the wrong slot Connect SEL to GND, as in the diagram.
All The bar is always full or always empty MAX_LEVEL does not suit your room Change MAX_LEVEL in the code: a bigger number makes the bar grow more slowly.
All No port appears when you plug in the board The USB cable is charge-only, or the USB driver is missing Use a data USB cable and install the USB driver for your board.
ESP32 Compile error: ESP_I2S.h: No such file The esp32 board package is older than version 3.0.0 Open Boards Manager and update "esp32 by Espressif Systems".
ESP32 Stuck on "Connecting…" The board is not in upload mode Hold the BOOT button until uploading starts.
ESP32 Upload fails or stops part-way Upload speed too high for the USB cable or USB chip Tools → Upload Speed → 115200, then upload again.

Try next: use two modules for stereo, one with SEL on GND and one with SEL on 3V3, sharing the same BCLK, LRCL and DOUT wires.

Spotted a problem in this tutorial? Email support@epartners.co.nz and we'll check it and update the tutorial.

Good to know
  • This is a 3.3 V module. Do not connect its signal pins to a 5 V logic board.
  • It needs a board with hardware I2S. Many beginner boards, including the Arduino UNO, do not have it.
  • The host must run BCLK at 2.048 MHz to 4.096 MHz with word select at BCLK ÷ 64. That gives sampling rates of 32 kHz to 64 kHz.

Datasheet

Key figures from the manufacturer's datasheet for the Knowles SPH0645LM4H-B, the I2S microphone on this module.

SPH0645LM4H-B microphone
Output format I2S, 24-bit word, two's complement, MSB first
Data precision 18 bits, unused bits are zero
Supply voltage (VDD) 1.62 V to 3.6 V
Supply current 600 µA typical (VDD = 1.8 V, 3.072 MHz clock)
Clock frequency (BCLK) 2.048 MHz to 4.096 MHz
Sampling rate 32 kHz to 64 kHz (WS = BCLK ÷ 64)
Sensitivity −26 dBFS typical (−29 to −23 dBFS), 94 dB SPL at 1 kHz
Signal-to-noise ratio 65 dB(A) typical, 94 dB SPL at 1 kHz
Acoustic overload point 120 dB SPL typical (10% THD at 1 kHz)
Total harmonic distortion 1% maximum at 94 dB SPL, 1 kHz
Package size 3.50 × 2.65 × 0.98 mm
Pins WS, SELECT, GND, BCLK, VDD, Data Out

Download the SPH0645LM4H-B datasheet (PDF, 1.1 MB)

Source: Knowles, SPH0645LM4H-B I2S Output Digital Microphone datasheet, Rev B.

Resources

Which one should I choose?

Product Key difference Best for
This product (SPH0645 I2S MEMS microphone) Chip supply 1.62–3.6 V; SNR 65 dB(A); BCLK 2.048–4.096 MHz Projects that need the Knowles SPH0645 and a 3.3 V logic board
INMP441 MEMS microphone (ESP32, ESP8266) Supply 1.8–3.3 V; SNR 61 dBA; BCLK 0.5–3.2 MHz Projects that need a lower bit clock or the INMP441 chip

FAQ

▸ Does the SPH0645 microphone work with an Arduino UNO?

No. The Arduino UNO has no I2S peripheral and runs at 5 V logic, while this module is a 3.3 V device. Use an ESP32.

▸ How do I get a mono signal?

Connect the SEL pin to GND. The microphone then sends its data on the left channel. With SEL high it sends on the right channel instead.

▸ What bit clock does the microphone need?

The datasheet lists 2.048 MHz to 4.096 MHz. Word select must be the bit clock divided by 64, so the sampling rate is 32 kHz to 64 kHz.

▸ Can I use two microphones on the same pins?

Yes. Share BCLK, LRCL and DOUT, wire one module's SEL to GND and the other's SEL to 3V3. The first sends on the left slot and the second on the right slot.

Technical question about this part? Email support@epartners.co.nz with your board and wiring, and we'll help you get it working.

Shipping: $5.99 urban, $9.99 rural. Free shipping on orders of $100 or more.

Order by 10:30am (NZT), Monday to Friday, and we dispatch the same day. Orders placed after 10:30am, on weekends or on public holidays are dispatched the next business day.

Delivery usually takes 1–2 business days after dispatch (2–3 for rural addresses). See our Shipping Policy for full details.

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.

Recently viewed