Micropython: ESP32 support for I2S

Created on 20 Sep 2018  路  3Comments  路  Source: micropython/micropython

This previously existed as https://github.com/micropython/micropython-esp32/issues/185 but I'm replicating it here. The ESP32 has I2S hardware so it'd be nice to support it!

References:

Most helpful comment

As part of an air and noise pollution sensor project (https://hackaday.io/project/162059-street-sense) I needed to support an I2S microphone using the ESP32 port. Using the ESP-IDF I implemented support for both I2S Master Rx and Tx . I spent a good deal of effort to bring the C code from a "just works hobbyist" quality to "industrialized" quality.

I put in a PR to mainline uPy:
micropython/micropython#4471

Detailed class usage documentation and working uPy examples for popular microphone and audio DAC breakout boards (including the PCM5102) is here:
https://github.com/miketeachman/micropython-esp32-i2s-examples

Feedback and comments welcome at the PR or at the documentation repo

Mike

All 3 comments

(I've got some hardware in the junkbox but have had no time to make any progress on this. If you've got the time and inclination, go for it!)

I am very keen to see this happen and will help in any way I can - implementation is above my current skill level but I would very much like to collaborate and learn.

I have a couple of I2S audio codecs - PCM1808 for stereo in, PCM5102 for stereo out and also have some Teensy Audio Adaptors with the SGTL5000 (Line In/Out and headphones out). The PCM1808 and PCM5102 are cheap (available on Mouser) and can be hand soldered if you are comfortable with easier surface mount soldering, modules are also available on eBay and other places. The audio quality is very good!

As part of an air and noise pollution sensor project (https://hackaday.io/project/162059-street-sense) I needed to support an I2S microphone using the ESP32 port. Using the ESP-IDF I implemented support for both I2S Master Rx and Tx . I spent a good deal of effort to bring the C code from a "just works hobbyist" quality to "industrialized" quality.

I put in a PR to mainline uPy:
micropython/micropython#4471

Detailed class usage documentation and working uPy examples for popular microphone and audio DAC breakout boards (including the PCM5102) is here:
https://github.com/miketeachman/micropython-esp32-i2s-examples

Feedback and comments welcome at the PR or at the documentation repo

Mike

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adritium picture adritium  路  3Comments

Cediddi picture Cediddi  路  4Comments

ruky87 picture ruky87  路  5Comments

francescofact picture francescofact  路  3Comments

joelhoro picture joelhoro  路  5Comments