Git Product home page Git Product logo

esp32-i2s-mems's Introduction

#ESP32 I2S MEMS Microphone Arduino IDE Example This repository holds some samples for connecting a I2S MEMS microphone to an ESP32 board.

At first I thought hooking up an I2S microphone would be straight forward, but it seems that I2S is a somewhat new or neglected interface. The examples distributed by adafruit only apply for Feather M0; the generic I2S example from the ESP32 examples is not directly applicable. Hence this repository.

Components used in this example

I am using these components:

How to connect the components?

There are no dedicated I2S pins on the ESP32. Instead, you will have to configure/enable the pins in your code. Eventually, I connected I2S-MEMS pins to the following ESP32 pins:

  • SEL is unconnected, i.e. only one channel, apparently left
  • LRCL to #15
  • DOUT to #32
  • BCKL to #14
  • GND to GND
  • 3V to 3V

Don't try to connect them to the similar sounding SCL/SCA/SCK, they're for the incompatible I2C interface.

How to use the examples?

You can open each of the examples as a sketch in the Arduino IDE. I've commonly used a baudrate of 115200, you will need to configure this in your serial monitor, otherwise it'll display rubbish.

Noteworthy

  • Either the SEL config is wrong, or the ESP32 I2S channel handling.
    • I had to use I2S_CHANNEL_FMT_ONLY_RIGHT whenever SEL pin was unconnected/ground, and I2S_CHANNEL_FMT_ONLY_RIGHT when SEL is high.
  • I could only get it to work with 32 bit sampling.
    • I don't know if this is a limitation of either hardware, or a configuration mistake on my side.
  • Although the setup seems to react nicely to noise.
    • I do not know if the recorded data is actually a valid sound.
    • There might be some bit-juggling still to be done.

Credits

Credits go to Adafruit for the easy-to-use hardware and the nice guide (even if it is not fully applicable here, it's still a great place for starters) and the espressif examples.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.