WLED icon indicating copy to clipboard operation
WLED copied to clipboard

support ES8388 based audio kits (AI-Thinker A1S audio Kit v2.2, Espressif LyraT V4.3)

Open omski opened this issue 3 years ago • 15 comments

Is your feature request related to a problem? Please describe. My request is hardly related to the poor ADC performance of the ESP. There is another request regarding a second I2S input. But there is an ESP variant which seems to match perfectly with WLED SR as this project is all about making LED dance to some noise with the help of an ESP. The ESP A1S is has some special audio capabilities like: microphone input line input audio coded with several supported formats There is an dev kit available: https://github.com/Ai-Thinker-Open/ESP32-A1S-AudioKit

Describe the solution you'd like Support for the ESP32 A1S and its audio input capabilities.

omski avatar Sep 14 '21 17:09 omski

I've got an answer to my request on espressif/arduino-esp32 in regards to support for the ESP A1S. https://github.com/espressif/arduino-esp32/issues/5674 "if the manufacturer or someone from the community wants to add it, they are free to do so. Otherwise you can use the "ESP32 Dev Board" instead, which is compatible with all other boards."

So as the dev kits for the ESP A1S are reasonable priced one could think of making a version of WLED SR where the added features of the chip are supported out of the box? https://www.aliexpress.com/item/32957553086.html This will make life much easier because the board has already microphones and a line in with an ADC. No more struggles getting good audio signals into the ESP to calculate LED effects on :wink: Maybe the added features could be made accessible through user mods.

omski avatar Sep 16 '21 11:09 omski

If the microphone is already there, I would suspect that the pin select feature in WLED SR would allow you to use those features.

atuline avatar Sep 16 '21 12:09 atuline

There are two of them and I suspect that they are not connected via the analog pin of the ESP instead through MIC input of the unbuild AC101 audio codec chip itself. image https://html.alldatasheet.net/html-pdf/1134488/XPOWER/AC101/249/1/AC101.html image

Furthermore there is line input going to the AC101 too.

When we can figure out how to access these inputs it would be nice to have an env for that device don't you think?

Some stuff I have found related to this: I found this https://platformio.org/lib/show/6755/AC101 https://github.com/espressif/esp-adf/pull/554

omski avatar Sep 16 '21 12:09 omski

Supporting the esp32 LyraT (aka the es8388 chip) As well would be nice. It's i2C

Separate add-on board: https://pcbartists.com/products/es8388-module/esp32-es8388-audio-codec-interfacing/

scruffynerf avatar Sep 28 '21 23:09 scruffynerf

@scruffynerf Maybe this issue here https://github.com/atuline/WLED/issues/117 suits better to your proposal. It is about support for external I2S/I2C boards for line input.

Nice little add-on board! I am about to use one of these for a test: https://de.aliexpress.com/item/4000983028754.html

omski avatar Sep 29 '21 14:09 omski

This mic should be easily supported. I located this project which seems to use it with config not much different than that currently https://github.com/RealCorebb/ESP32-A1s-Audio-Kit/blob/master/Microphone.ino However, it seems to require an I2C setup step which can be found here https://github.com/Yveaux/AC101/blob/master/src/AC101.cpp

I have just created a PR for the ES7243 which similarly requires an I2C configuration step: https://github.com/atuline/WLED/pull/132

@omski do you have the board in hand?

tony-fav avatar Nov 04 '21 15:11 tony-fav

@omski do you have the board in hand?

@tony-fav Yes it just arrived. I will try your solution as soon as I have some time to switch to the related project back again. Have you any advice for me to assure that I am not messing up with your proposal? Would be great to have support for this board because it is cheap compared to what it has available. The I2S/I2C ADC add-on boards alone are more expensive.

omski avatar Nov 08 '21 07:11 omski

did it work after all?

microfx avatar Feb 17 '22 14:02 microfx

Loses due to inactivity

ewoudwijma avatar Jul 15 '22 21:07 ewoudwijma

I have this board, it's on my to-do list to have a go at using it

Agree 100% that it would be much easier for people to get started with than messing about with building their own Line-in setup or trying different mic setups

netmindz avatar Jul 20 '22 08:07 netmindz

Yes, please!

microfx avatar Jul 20 '22 09:07 microfx

I think that there is still (a lot) hope for these boards with built-in I2S audio peripherals, like

  • Ai-Thinker ESP32 Audio Kit https://docs.ai-thinker.com/en/esp32-audio-kit
  • ESP32-LyraT V4.3 https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/get-started-esp32-lyrat.html

The newest revisions of both boards have an ES8388 I2S Audio Codec Chip.

softhack007 avatar Jul 20 '22 11:07 softhack007

I've made a start on the ES8388 support https://github.com/netmindz/WLED/tree/ES8388

netmindz avatar Nov 27 '22 13:11 netmindz

https://github.com/MoonModules/WLED/pull/5

netmindz avatar Nov 27 '22 13:11 netmindz

This is now supported in MoonModules, do you need it back-porting to SR @omski ?

netmindz avatar Apr 16 '23 11:04 netmindz