Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get the speaker to work in ESP-IDF #57

Open
imalros opened this issue May 28, 2024 · 2 comments
Open

Cannot get the speaker to work in ESP-IDF #57

imalros opened this issue May 28, 2024 · 2 comments

Comments

@imalros
Copy link

imalros commented May 28, 2024

I am trying to port the provided firmware to ESP-IDF but it seems like I am not able to get the speaker to work.

First off, I wanted to make sure if the code is alright, so I recreated the circuit (or let's say the important parts of the circuit) on a breadboard with ESP32-S3-DevkitC at its core, and seems like the speaker works just fine when using the wired up circuit. But when I flash the same binary onto the custom PC, for some reason the speaker does not play the sound. I noticed that there is a variable defined without any documentation in the original firmware called SPEAKER_EN, and it is set to output high, but never used. Does this have anything to do with the speaker not playing what's been written on I2S TX channel when the PCB is used?

@imalros
Copy link
Author

imalros commented May 29, 2024

After looking through the schematics, I found out that GPIO_NUM_21 is connected to the MAX98357AETE+ 's SD_MODE pin. According to the datasheet, if SD_MODE is LOW, the chip will change state to shutdown mode, and if it is HIGH, the chip selects the left channel (the chip is a mono chip). I now set the GPIO_NUM_21 to high and output mode, still no sound comes out of the speaker. It is gonna be a loooong night.

@Xe138
Copy link

Xe138 commented Sep 25, 2024

Not sure if you got this working, but I was able to get the speaker working using ESPHome using the following pins:

  • GPIO12: DOUT (Data Out) signal for DAC
  • GPIO13: WS (Word Select) signal
  • GPIO18: BCLK (Bit Clock) signal
  • GPIO21: set on to energize the DAC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants