AC coupling capacitor reverse current

Thread Starter

AlexX 52

Joined Mar 15, 2018
14
In my current project I want to amplify audio signals for my speaker. The audio signal is driven by a DAC with a voltage range between 0V and 3.3V. To feed the signal to my amplifier, I need to use a capacitor in series to filter out DC while retaining AC. However, something tells me it's not a good idea connecting it directly to the output pin. Since the capacitor will also discharge, current flows in reverse direction back into the DAC's pin.
Is my reasoning correct? And if yes, how can I protect the pin?

The DAC belongs to the STM32H743ZI. You can find the datasheet right here.
 

ebp

Joined Feb 8, 2018
2,332
It would be rather unusual to have the capacitor discharge into the pin, but it isn't impossible and you are wise to consider it.

I'll leave it to you to look at the details in the datasheet, but I/O pins are almost always protected by diodes - one from the pin to the positive supply for the IC and one from the pin to ground. These pins can handle some current, but not very much. For almost all modern ICs there will be a specification for the current that they can handle. It can range from 2 mA to 20 mA as absolute maximum and it is always best to stay well away from that maximum - no more than half of the absolute maximum spec would be reasonable.

If the rest of the system permits it, a resistor between the output of the processor and the capacitor can be used to limit the current. [EDIT - the audio amp itself may have sufficient resistance at its input to limit the current, but you may not want to assume that will always be true]

A more robust way to protect the output is to use external diodes to supply and ground and a low-value resistor between the I/O pin and the diodes. This resistor assures that the current in the internal diodes will not be excessive in the (unlikely) event that the forward voltage of the external diodes rises sufficiently to allow the internal diodes to also conduct. I would assume about a volt of forward voltage for the external diodes and scale the resistor accordingly (e.g. if the max spec for the internal diodes was 10 mA, I would assume they might conduct at half a volt, meaning I would want to drop the half volt of difference between the internal and external diodes across the resistor while limiting the current to perhaps 5 mA, so half a volt at 5 mA requires 100 ohms. A hundred ohms is unlikely to be an issue as a series resistance to an audio input).

In the very unlikely event that the I/O is not internally protected, then you will probably find advise for how to protect it somewhere in the datasheet or an ap note.

This is worth a look:
https://www.nxp.com/docs/en/application-note/AN4731.pdf
If covers issues of risks and protection methods for I/Os.
 

MrChips

Joined Oct 2, 2009
30,712
Let's assume that the input impedance of the amplifier is 10kΩ. A 10μF coupling capacitor would give a low-frequency roll-off at about 2Hz which is acceptable for good low frequency response.

When the DAC swings from 3.3V to 0V, it has to sink about 300μA from the capacitor. The DAC will be OK.
You don't have to be concerned.
 

Thread Starter

AlexX 52

Joined Mar 15, 2018
14
Thank you very much for your responses. I was only concerned because page 97 of the datasheet claims that injected current should be 0. However, it seems like injected current is current induced by voltage inputs greater than Vcc and lower than GND. The DAC does indeed utilize an output buffer, effectively separating the output stage.
 

ian field

Joined Oct 27, 2012
6,536
In my current project I want to amplify audio signals for my speaker. The audio signal is driven by a DAC with a voltage range between 0V and 3.3V. To feed the signal to my amplifier, I need to use a capacitor in series to filter out DC while retaining AC. However, something tells me it's not a good idea connecting it directly to the output pin. Since the capacitor will also discharge, current flows in reverse direction back into the DAC's pin.
Is my reasoning correct? And if yes, how can I protect the pin?

The DAC belongs to the STM32H743ZI. You can find the datasheet right here.
Electrons go in - electrons come out. That doesn't necessarily mean that the polarity across the capacitor will be reversed.
 
Top