EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: Axk on May 30, 2021, 02:42:14 pm

Title: Analog volume control for output of MAX98357A
Post by: Axk on May 30, 2021, 02:42:14 pm
Need a log pot for volume control for the output of MAX98357A (small class D amp with I2S input) (3.5W output max)

I know about the option of software control (in Linux in my case), but this question is about analog control.
I've found some linear 2W 1-300R (the approximate range I need) pots on Aliexpress but all the LOG pots appear to be high resistance or low power, so not suitable for direct attenuation.

So I'm looking for some simple solution for the push-pull output of the amp, ideally some attenuator chip that is controlled by a high resistance low power pot.
Title: Re: Analog volume control for output of MAX98357A
Post by: Caliaxy on May 30, 2021, 03:11:24 pm
[...] all the LOG pots appear to be high resistance or low power, so not suitable for direct attenuation.

... because they are meant to be connected at the input of the amplifier. Why do you want to put the pot at the output?
Title: Re: Analog volume control for output of MAX98357A
Post by: Axk on May 30, 2021, 04:53:17 pm
Yes, I understand.
But in my case the amplifier doesn't have analog volume control, supposed to be controlled in software so that the I2S input is at the required level.
Title: Re: Analog volume control for output of MAX98357A
Post by: Caliaxy on May 30, 2021, 06:34:21 pm
I see. Have you considered using the "Gain" control pin? According to the data sheet, you can get five levels of gain (3, 6, 9, 12 and 15 dB) by connecting a 100K resistor (or shorting the gain input) to GND or VDD.
 
It might be next to impossible to find a suitable pot for the output (most power pots are wire-wound and linear, as you noticed). You could experiment with a rotary switch and fixed resistors. But this might be more expensive than controlling the gain directly with a single 100K low power resistor and a rotary switch.
Title: Re: Analog volume control for output of MAX98357A
Post by: Axk on May 30, 2021, 08:09:39 pm
Thanks!
I know about the gain control pin. Ideally I need the control to be smooth like with an analog amp with a pot.
Title: Re: Analog volume control for output of MAX98357A
Post by: Marco on May 30, 2021, 08:42:55 pm
So I'm looking for some simple solution for the push-pull output of the amp, ideally some attenuator chip that is controlled by a high resistance low power pot.

Modulating the output of a class D amplifier with a rheostat is too painful for me think too much about.

If you're using Linux surely you can find some way to use the 32 bit mode for doing digital gain? That's 16 bits of modulation with a 16 bit signal, plenty smooth.
Title: Re: Analog volume control for output of MAX98357A
Post by: Axk on May 30, 2021, 09:26:34 pm
Yes, that's probably what I'll have to do. Looks like there's no simple analog solution to this.
Title: Re: Analog volume control for output of MAX98357A
Post by: oPossum on May 30, 2021, 09:40:25 pm
The part you are searching for is typically called an L-Pad. They are used for in-wall speaker level control and tweaking mid/tweeter levels in speaker cabinets.

https://www.parts-express.com/speaker-components/crossover-components/speaker-l-pads (https://www.parts-express.com/speaker-components/crossover-components/speaker-l-pads)