2
\$\begingroup\$

I am learning to use I2S/PCM to drive speakers with the ESP32-C3-WROOM-02-N4, and I am using an IC to accomplish the DAC and amplification. The IC is the Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A, and I am using it to drive the 931-SPKM.10.8.A-ND from Taoglas Limited.

I have the ESP32 communicating with the IC using I2S, the speaker connected to the output terminal of the IC, and a power supply powering both the ESP32 and IC through a breadboard connection at 5 VDC.

When I transmit a signal to operate the speaker with a 1 kHz sinusoid, I am picking up a 2 kHz, 0.2 Vpp ripple across the + and - rails of my power supply (see image below). This behavior also occurs if I power the ESP32 with a USB cable and power the IC with one of the ESP32 pins.

What could be the reason for this ripple in the voltage?

Scope Measurement

\$\endgroup\$
2
  • 3
    \$\begingroup\$ Bus pumping perhaps? Try a bulk capacitor on the power input of the amp board and see if it gets smaller... \$\endgroup\$ Aug 18, 2022 at 1:11
  • \$\begingroup\$ Poor connections of the 5V on the breadboard? Poor 5V regulator? \$\endgroup\$
    – Audioguru
    Aug 18, 2022 at 13:33

1 Answer 1

3
\$\begingroup\$

When you output a 1 kHz sine wave, the amp draws lots of power at each of the tips of the sine, but much less power when it is outputting almost zero voltage/current.

The tips of the 1 kHz sine wave occur at a rate 2 kHz. If you see an obvious power supply droop at 2 kHz, that means that your power supply impedance is rather high (i.e. bad).

The amplifier has some power supply rejection (PSRR). The observed supply ripple, multiplied with the amp's PSRR will be present at the output of the amp and contribute to total harmonic distortion. You have to decide whether this distortion is significant next to the other contributions to distortion and whether it is objectionable.

If yes, you must reduce the power supply impedance, this is typically achieved with large bulk electrolytic capacitors for frequencies in the range from about ~1 kHz to ~1 MHz and with voltage regulators for frequencies below the kHz range.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.