tfry-git / ClosedPlayer

Kid-friendly RFID-tag-based MP3 player
GNU General Public License v3.0
15 stars 5 forks source link

Support ESP32-A1S #2

Open joewa opened 3 years ago

joewa commented 3 years ago

Hello!

I found this dev-board which has almost all components for a basic Player: https://docs.ai-thinker.com/en/esp32-audio-kit Schematics: https://www.makerfabs.com/desfile/files/ESP32-A1S%20Product%20Specification.pdf

The ESP32-A1S has an embedded audio codec (AC101) that is internally connected via I2S and there seems to be some sample code to make it work https://github.com/kkloesener/AC101

Do you think this board would work without too many modifications to your code? (This would be my first ESP32-project)

Thanks, Joerg

tfry-git commented 3 years ago

Hm. From the looks of it, this may not be so easy. That board is certainly packed with features, and it does sport a DAC (which is the only thing really needed, here), but I'm not sure about the protocol that it "speaks", and that sample code seems far from minimal.

If you want something that will "just work", a) for low quality, a plain ESP32 is all you need, as it already includes a stereo 8-bit DAC, or alternatively a PDM modulated mono output on pin 22 (selectable in config.h) b) for better quality, you should pick a DAC that is officially supported by https://github.com/earlephilhower/ESP8266Audio, which is the library used to decode and output audio in this project. Adafruits I2SDAC is one of them, and, conveniently, also includes an amp. (Personally, I've used a really cheap PT8211 in my build, but that requires a small modification in ESP8266Audio to work.)

joewa commented 3 years ago

Thanks for the quick reply! So I ordered both:

  1. "ESP32-S2-WROVER-DevKit-Lipo" and " the MAX98357A. Please let me know in case this was a bad choice.
  2. ESP32-A1S Audio Dev Kit. Just to check and test. I will update you here in case I have some success

Cheers, Joerg

tfry-git commented 3 years ago

1 should be a good choice (although, again, I did not use that myself), and should work "out of the box". Following my own experience, I still recommend to use the crude headphone output on pin 22 for your initial testing (it's also set as the default output option in config.h). When that works, you can then proceed to connect your DAC.