# How to limit current consumption for integrated class D amp?

I have a small amplifier IC rated at about 2.5 - 3 W output going into a 3 W, 8 Ω speaker. The input signal is going through a pot and then into the amp though a cap and resistor in series, as shown below (pot not shown).

I only have one speaker connected to pins 1 and 3, the other output is currently not connected.

Normally the amp uses under 5 mA, which is fine. As I turn the pot the volume goes up as well as the current consumption. When it reaches about 30 mA my batteries can't hold the voltage which causes the source device to reset.

Can I limit the current consumption somehow? Perhaps attenuating the input with even larger input resistors. Right now I have 50 Ω in series with the 100 nF caps.

I have this for a datasheet: How is your Chinese?

The circuit:

simulate this circuit – Schematic created using CircuitLab

The NCN pin seems to be doing some limiting or compression to the signal. The datasheet does not show a formula to calculate it, however, it does have a short table with some examples.

## Update

I tried swapping the input resistor from 50 Ω to 150 Ω but that made things much worse; distortion is much higher. I swapped it again to 68 kΩ (that's what I had around) and it works very well.

New problem - I can hear a high pitched sound from the speaker. I'm going to use my scope with FFT to find out what frequency this is filter it out.

## Update II

Looks like this IC is a clone or similar to this one

• A series resistor won't do. You need two resistors to form a voltage divider. One would be your series resistor, the other would be the input impedance of the amp. That is probably pretty high, so you would need a very large value series resistor - which sets you up for noise problems. You need to make an attenuator for each input.
– JRE
Feb 16, 2018 at 11:55
• The real problem seems to be that your amp is overkill for the task. Assuming 5V for Vdd, you would need several hundred milliamperes at full volume - but you say your battery drops out at just 30mA.
– JRE
Feb 16, 2018 at 11:57
• @JRE - I can see your point, if I assume the amp will output about 3W of distorted signal at max. input, I'm looking at 60mA current consumption which is more than I can handle. However this device is already on the bench so has some benefits. Feb 16, 2018 at 12:03
• Weird question. You're talking about "current consumption", which obviously increases if you increase the volume! Is this surprising? What do you actually mean?
– pipe
Feb 16, 2018 at 12:58
• @pipe That is obvious, however I'm asking about limiting the consumption. And yes, I understand that will limit the amp's output. Feb 16, 2018 at 13:17

The increase in power consumption is simply a result of the amplifier delivering power to the speakers.

You could:

• increase the impedance of the speakers, then for the same signal less current will flow. This also means less power is delivered so the maximum volume will be lowered.

• decrease the signal gain, the amplifier itself does not seem to have a setting for this. Looking at the input stage (datasheet page 5) is does appear that the input series resistors (the 50 Ω resistors) are part of a gain-setting network. So I would suggest making the 50 Ω resistors a factor 2, 5, or even 10 higher and see what happens. It is unclear what the on-chip resistor values are around the amplifier so you will have to try and see if that helps.

Edit: it appears increasing the value of the input series resistors doesn't help much. Then you could try to attenuate the signal like so:

simulate this circuit – Schematic created using CircuitLab

C2 is needed in order to not disturb the DC biasing voltage on the amplifier.

Note that you need this circuit for both left and right channels.

There also seems to be some setting possible with the CNC pin and the resistor and capacitor connected to it. But due to the Chinese text I can't understand what that does exactly.

• I've replaced the 50 Ohm resistors with 150 Ohm resistors and now there's much more distortion introduced into the signal and I can hear a high pitched sound coming from the speaker. Feb 16, 2018 at 12:01
• @user34920 I added a suggestion to my answer. Feb 16, 2018 at 12:30
• @Thanks. I updated the post with a table from the datasheet that shows how the output wattage ( = gain?) behaves with different R & C combinations. Wish they had a formula or graph in there as well. Feb 16, 2018 at 13:29
• That attenuator using 50 ohm resistors loads the DAC output with 100 ohms which it'll struggle to drive. Use a voltage divider like the potentiometer arrangement shown. Oct 8, 2020 at 3:39

30 mA stereo at 5 V produces a power of only 75 mW per channel for headphones that are not loud.

Your volume controls are way too low at only 100 Ω, they should be 10 kΩ. 1 μF feeding the resulting 150 Ω cuts all low bass frequencies but passes high frequency distortion. The 1 μF input capacitors are fine to feed 10 kΩ volume controls. Volume controls are supposed to be logarithmic, then when turned down to half the output level is 1/10th.

You don't need a class D amp here. Just use two op-amps, and you can add a limiter or even a compressor so that excessive volume keeps the output power in check.