ESP32 and PAM8945 AMP

bobslawblog
Posts: 11
Joined: Sun Dec 12, 2021 4:55 pm

ESP32 and PAM8945 AMP

Postby bobslawblog » Mon Jan 03, 2022 2:35 am

I am attempting to use the internal ESP32 DAC for 8bit mono audio output.


The PAM8403 seems like overkill (stereo output) and it is much larger than the PAM8945. However, I can't seem to find any schematic examples of a PAM8945 anywhere on the internet other than the datasheet example.
https://www.diodes.com/assets/Datasheets/PAM8945.pdf

My question is:
How do you calculate the correct inducters and capacitors for an ESP32 being driven by a 3.7v LiPo battery?
What would the configuration be for 8ohm vs 4 ohm speakers.

I tried reading through the following article but it went way to far in the weeds for me to follow.
https://www.eetimes.com/understanding-o ... plifiers/#

If anyone has a clear example for a readily available small footprint amp for the ESP32 running on bat or could help me determine the correct C and L values for the PAM8945 I would really appreciate it.

Thanks in advance.

ESP_Sprite
Posts: 9591
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 and PAM8945 AMP

Postby ESP_Sprite » Mon Jan 03, 2022 4:06 am

The inductor there actually isn't part of the audio amplifier: seemingly this amp has an integrated boostconverter and the inductor is part of that. As the chip is both producer and consumer of that power, I'd keep to the datasheet and use a 2.2uH inductor that can handle the 4A Ipeak switching current specified. Note that the amp has 20dB (=10X) gain and the output voltage is near 6 volt, so you probably need to attenuate the 3.3V DAC output of the ESP32 to 1/5th to get full output range.

Who is online

Users browsing this forum: No registered users and 118 guests