Olimex Support Forum

Microcontrollers => ESP32 => Topic started by: SSEV on June 07, 2023, 05:11:01 PM

Title: ESP32-POE Audio Setup
Post by: SSEV on June 07, 2023, 05:11:01 PM
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
Title: Re: ESP32-POE Audio Setup
Post by: LubOlimex on June 08, 2023, 08:13:53 AM
What interface is using the radar sensor? UEXT, SPI, I2C?
Title: Re: ESP32-POE Audio Setup
Post by: SSEV on June 09, 2023, 04:44:27 AM
My apologies,  the specific radar is  https://www.seeedstudio.com/24GHz-mmWave-Radar-Sensor-Human-Static-Presence-Module-p-5267.html (https://www.seeedstudio.com/24GHz-mmWave-Radar-Sensor-Human-Static-Presence-Module-p-5267.html)  (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.
Title: Re: ESP32-POE Audio Setup
Post by: SSEV on June 10, 2023, 03:30:17 PM
If the audio is run on I2C.  That takes up pins 13 and 16.  Correct? 
Title: Re: ESP32-POE Audio Setup
Post by: SSEV on June 10, 2023, 10:39:36 PM
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?
Title: Re: ESP32-POE Audio Setup
Post by: LubOlimex on June 12, 2023, 10:38:16 AM
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
Title: Re: ESP32-POE Audio Setup
Post by: SSEV on June 19, 2023, 02:14:45 PM
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.