November 22, 2024, 03:02:55 AM

ESP32-POE Audio Setup

Started by SSEV, June 07, 2023, 05:11:01 PM

Previous topic - Next topic

SSEV

I need to add a microphone and audio out (mono) speaker to the ESP32-PoE.  First what are any recommend hardware setups to complete this task with this micro controller?

Secondly if I have 1 GPIO pin being used for an LED and the UEXT connector being used to connect a different radar sensor, and also the SD card being used, will I have enough pins to add the audio and microphone to this setup???

-scott

LubOlimex

What interface is using the radar sensor? UEXT, SPI, I2C?
Technical support and documentation manager at Olimex

SSEV

#2
My apologies,  the specific radar is  https://www.seeedstudio.com/24GHz-mmWave-Radar-Sensor-Human-Static-Presence-Module-p-5267.html 

I am still figuring out how to connect the radar itself.  I believe it uses the tx, rx and 2 additional input pins on the olimex board.

SSEV

If the audio is run on I2C.  That takes up pins 13 and 16.  Correct? 

SSEV

#4
Now I have confused myself.  Can anyone confirm the proper way to connect an audio speaker to the ESP32-PoE?  Is the h/s using I2S or does it have to use I2C?

LubOlimex

Both are possible. It depends on the specific audio goals and hardware. What do you consider audio speaker? We have connected a buzzer in our AgonLight2 design to a GPIO:

https://github.com/OLIMEX/AgonLight2/blob/main/HARDWARE/AgonLight2_Rev_B/AgonLight2_Rev_B.pdf
Technical support and documentation manager at Olimex

SSEV

Ended up getting a MAX brand amplifier wired and I2S working with
BCLK: Pin 26
LRC: Pin 25
DIN (DOUT): Pin 22

Had to change some of the libraries to compile everything properly but was able to get audio out to a speaker from the internal storage for the mp3 file on the esp32.

mihaiadrian

Could you please give more details about how you connected the i2s device to Olimex esp32-poe ? especially where I can find the pins  :

BCLK: Pin 26
LRC: Pin 25
DIN (DOUT): Pin 22

I don;t see them in this img:  https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/resources/ESP32-POE-ISO-GPIO.png

LubOlimex

No, it doesn't work like that. You need to find three free pins and then re-define the software for the three free pins. You don't have to use specific pins for I2S, any free GPIO can be configured for I2S operation.

https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/i2s.html
Technical support and documentation manager at Olimex