ESP32 as Bluetooth headset

devriva
Posts: 1
Joined: Tue Jun 25, 2019 7:29 pm

ESP32 as Bluetooth headset

Postby devriva » Tue Jun 25, 2019 7:35 pm

What is the most efficient way to interface A/D & D/A pins to external speaker/microphone?
Does anyone has experience with amps that can do this?

All feedback appreciated!

nevercast
Posts: 7
Joined: Tue Jan 08, 2019 2:58 am

Re: ESP32 as Bluetooth headset

Postby nevercast » Wed Jun 26, 2019 10:21 pm

The DAC is only 8bit on the ESP32, and the ADC has some linearity and offset issues, which can be calibrated for but would need to be calibrated for every device since the non-linearity in my experience is not consistent across a batch of ESP32s.

I would suggest an I2S external chipset. The I2S peripheral in the ESP32 can perform reads and writes, either to the DAC, in LCD/Parallel mode, or as an I2S bus to an external chipset. I've only used the DAC functionality personally. We have a device that has voice output but the 8bit DAC would be a poor choice for audio. If I recall, there are two I2S peripherals and I believe each has 2 channels (rather than 2 peripherals each with 1 channel). Hence you should be able to get Stereo audio and microphone input simultaneously, I'm not sure on the divison of channels and I2S peripherals and I or yourself would need to check the Technical Reference.

Perhaps you may wish to do a parametric search on Mouser or Digikey for an appropriate external I2S A/D. Also check the Technical Reference for the ESP32 to ensure that you can use both peripherals and get all 3 channels you need. Perhaps an Espressif engineer may join the thread to also offer their help.

Update: Sourcing from the V4.0 Technical Reference https://www.espressif.com/sites/default ... ual_en.pdf
There are two independent I2S modules embedded in ESP32, namely I2S0 and I2S1. Each I2S
module contains a Tx (transmit) unit and a Rx (receive) unit. Both the Tx unit and the Rx unit have a three-wire
interface that includes a clock line, a channel selection line and a serial data line.
...
I2S mode
• Configurable high-precision output clock
• Full-duplex and half-duplex data transmit and receive modes
• Supports multiple digital audio standards
• Embedded A-law compression/decompression module
• Configurable clock signal
• Supports PDM signal input and output
• Configurable data transmit and receive modes
You should be able to satisfy all your audio headset needs using the two I2S peripherals in the ESP32. But you will need to use an external DAC and ADC if you want audio clarity, you should be able to find I2S D/As with built in drivers/amplifiers that will suit your needs.

Here is a link to page 303. of the Technical Reference, "I2S". https://www.espressif.com/sites/default ... m=100,0,65

Don Warr
Posts: 11
Joined: Fri Oct 19, 2018 10:01 am

Re: ESP32 as Bluetooth headset

Postby Don Warr » Sat Feb 27, 2021 9:50 am

The Link is for I2C.... Not I2S.. I can not find any examples or documentation on Full Duplex....

Who is online

Users browsing this forum: No registered users and 96 guests