Seek Help/Pointers on basic ESP32 I2S Audio issue

alok_esp32
Posts: 4
Joined: Sat Apr 13, 2019 11:29 pm

Seek Help/Pointers on basic ESP32 I2S Audio issue

Postby alok_esp32 » Fri Dec 10, 2021 11:05 pm

Hi,
I am new to ESP32 Appreciate if someone can help share any pointers wrt use of Audio I2S support

I like to understand issue I am facing around external I2S Audio on MAX98357A I2S Amplifier connected to speaker. Like to understand how to configure code to influence proper behavior of WCLK signal

Context:
I am using platformIO and use ESP8266Audio Library with very simple sketch. When I play the audio using the example below all I hear loud white noise till I disconnect the LRC(WCLK) pin . Disconnecting of WCLK wiring brings the audio sounds back but with some noise and I can hear the music.

I studied many web article and attempt to use different pin as well as modifying parameter for Set Pinout and i2s_config_dac parameter but no help. I double check the PIN connection and routing etc looks OK

I am baffled why it works with WCLK disconnected and why connecting the pins make it worse

My configuration has ESP32 that connects to MAX98357A I2S amplifier and the output connects to small speaker
The example code is at below and all I did was to modify SSID information and wire the VCC, GNC, BCLK, DOUT, WCLK Pin appropriately. This is popular library and seems many people have used it without any issue.I believe there is no issue with hardware or wiring and I am missing some SW configuration aspects

https://github.com/earlephilhower/ESP82 ... omHTTP.ino


Question:
I am unclear how WCLK and BCLK are related and how to properly configure for WCLK to align with BCLK. Can you please help suggest some pointers as what may be wrong wrt wiring or configuration aspects.
How to best configure external I2S for WCLK. If LRC (i.e. WCLK) pin is not connected I can hear audio (although not crisp) but with WCLK connected all I hear is white noise.


Appreciate any help or pointers

Thanks
-Alok
Attachments
ESP32-Max98357a.PNG
ESP32-Max98357a.PNG (1.77 MiB) Viewed 3364 times

Who is online

Users browsing this forum: No registered users and 57 guests