4
\$\begingroup\$

If an IC with open-drain outputs (and hence pull-up resistors) is used, we of course put decoupling capacitors on the IC supply, but why don't we also add decoupling capacitors between the power pin of each pull-up and ground?

When an output switches high, current will flow from the supply through the wiring inductance, and through the pull-up. A decoupling capacitor here would reduce/eliminate the effect of the wiring inductance, leading to much cleaner switching, especially at higher frequencies, as well as lesser noise conducted from the switching output to the rest of the circuit. Yet I have never seen a data sheet or application note even recommend this.

Is it because the decoupling capacitor for the IC will be enough to provide for the outputs too? If this is the case, when laying out a PCB, this would mean all pull-ups have to be placed as physically close as possible to the decoupling cap right?

enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ Are you able to give a quick schematic? The setup is not entirely clear to me from the text. \$\endgroup\$
    – Tony
    Commented Jan 7 at 3:50
  • \$\begingroup\$ Where are the pull-ups connected? What is the PDN (power distribution network) impedance and tolerable noise into it? \$\endgroup\$ Commented Jan 7 at 3:51
  • \$\begingroup\$ @Tony I've added a very rough sketch to the question. I'm wondering why we don't add the red caps? \$\endgroup\$
    – John Arg
    Commented Jan 7 at 4:24
  • \$\begingroup\$ @TimWilliams This is more of a general thing I've been wondering, so no specific PDN characteristics in mind. \$\endgroup\$
    – John Arg
    Commented Jan 7 at 4:25
  • \$\begingroup\$ If the pull-up resistor is for logic drive then unlikely to need additional capacitance, however if it is a high power load with large inrush/turn=on current then you need to consider the supply impedance. \$\endgroup\$
    – KalleMP
    Commented Jan 7 at 21:40

2 Answers 2

7
\$\begingroup\$

Generally with an open-drain output, we use a fairly weak pull-up. Somewhere betweeen 2k and 50k ohms. The stronger the pull-up (the lower the resistance value) the more power would be consumed when the output is held low.

This pull up also limits the current that can be drawn from the power supply by this pin, generally to less than 1 mA and often to less than 0.1 mA.

Since the amount of current being switched is fairly low, it's usually not not necessary to use a dedicated bypass capacitor for the pull-up resistor.

\$\endgroup\$
9
  • \$\begingroup\$ That makes sense. So if the current were higher (say maybe 5mA or 10mA), then we should consider adding the decoupling caps to at least some of the pull-ups? \$\endgroup\$
    – John Arg
    Commented Jan 7 at 4:25
  • 3
    \$\begingroup\$ Not even then. Remember, when an open-drain output is active, the current is already flowing in the pullup. When it goes inactive, that current simply reduces to zero at a rate determined by the trace capacitance, etc. By contrast, a totem-pole output draws a sharp spike of current when it switches from low to high. This is the current that the decoupling capacitor is supplying. \$\endgroup\$
    – Dave Tweed
    Commented Jan 7 at 4:28
  • 2
    \$\begingroup\$ @DaveTweed, the decoupling capacitor also has to absorb the negative transient current when the data line goes low to high, and this can be just as fast for an open-drain line as for totem-pole...but of course it's usually limited by a high valued pull-up resistor. \$\endgroup\$
    – The Photon
    Commented Jan 7 at 4:30
  • 3
    \$\begingroup\$ @JohnArg, normally we avoid such high currents because they cause high power consumption. If we did use them, it would likely be in a relatively crude design where a few mV of transient voltage on the power supply wouldn't cause problems. But if you have some special case where 1. you are switching a large current on an open-drain line and 2. you need a very stable power supply voltage, then you should do the engineering analysis to determine whether you should use dedicated bypass/decoupling capacitors for those pull up resistors. \$\endgroup\$
    – The Photon
    Commented Jan 7 at 4:34
  • 1
    \$\begingroup\$ Even on the high-to-low transition, the current will never go above the value determined by the pullup. Sure, it can be fast, but it's still orders of magnitude less than the current drawn by a totem-pole output. And the charge on the signal line gets dumped quickly into the ground plane as well, but that has nothing to do with decoupling capacitors. \$\endgroup\$
    – Dave Tweed
    Commented Jan 7 at 4:40
6
\$\begingroup\$

As hinted in my comment, this is the topic of PDN (Power Distribution Network) analysis.

In general, we model the supply as an impedance, or when considering the ripple/noise between nodes on the supply, an N-port network.

schematic

simulate this circuit – Schematic created using CircuitLab

For the 1-port case, we have a source of (AC) supply current (here, M1 + Rpu), and the corresponding ripple voltage on VCC is simply the change in current times Zs.

Note that we ignore Vs for AC purposes, as it's a DC source set to zero for AC analysis. We're only concerned with the relative change due to Rpu's current being on or off (and how fast it changes between those levels), which we can further model as a Thevenin or Norton source.

schematic

simulate this circuit

For the general N-port case, Zs becomes a network of impedances between ports. There is the self-impedance (change on a node due to current through same node), and all the transfer gains, from current into a given node, to the voltage on every other node. And so on for each node, making a symmetrical matrix of coupling factors / impedances. (Or we can relate voltages and currents in other equivalent ways to the Z matrix hinted at here.)

(I won't go into detail of N-port network theory here, but suffice it to say, we can draw up node equations, specify such a network, and solve for the AC voltages in currents in the system, just as we would any other AC steady-state solution. The network basically drops in as a sub-matrix of the matrix used in nodal analysis.)

When we place a local bypass cap, we're simply putting that impedance in parallel with the supply port. There can be downsides. Consider if there is dominant stray trace inductance coming from the nearest node, and we place a ceramic capacitor here. Say it's 5cm trace length or about 25nH, and the capacitor is 0.1µF with ballpark 50mΩ ESR. Say the trace is coming from a very large ceramic whose value (C and ESR) can be ignored.

The resulting resonant circuit has a characteristic frequency of \$F_0 = \frac{1}{2 \pi \sqrt{L C}}\$ or 3.2MHz, impedance \$Z_0 = \sqrt{\frac{L}{C}}\$ or 0.5Ω, and Q factor of \$Q = \frac{Z_0}{R}\$ or 10. The resulting impedance at the feedpoint (VDD) has a maxima, in the same way that the series-resonant circuit has an impedance minima (with respect to its own impedance), and the max and min are reciprocal quantities related by the Q factor. Which is to say, 50mΩ ESR and 0.5Ω Zo give us a 5Ω feedpoint maxima.

We can simulate this quite easily:

schematic

simulate this circuit

enter image description here

For a 1A current stimulus, a ~14dB voltage response is 6dB less than 20dB, or half of 10V, or 5V, as predicted.

This is a rather contrived example of course, and indeed we might want to ask further questions if this was really the situation. For example if Vs is 5V DC, then the load must be about an ohm, and, well clearly the 0.1µF is inadequate for bypassing that, but also we would very seriously want to know the effect of the resistor itself upon the supply's impedance. Because when it's connected (M1 on), Rpu and Zs act in parallel, but when off, Zs acts alone. The effect is, if the switching happens faster than or comparable to the ringing frequency of the network, the resistance is PWM-averaged out and has a proportional damping effect upon it; if slower, then we can consider the transient case, looking at each edge independently. The important insight here is, because it's an open-drain signal, not a full-drive CMOS signal, the resistor is connected only some of the time, and we have a non-LTI system (in particular, it's time dependent: the AC value of Rpu is effectively switching between nominal value and open).

For other loads, IC supply pins for example, we are just as concerned about the PDN, but indeed it is harder to know what the actual supply current (AC/transient) is, as manufacturers never document it; rarely a hint is given regarding shoot-through current, and sometimes PDN calculations and limits are defined (IIRC, Altera (now Intel) FPGAs had such tools and calculations handy), but most often we are left to guess based on some vague recommendation ("at least so-and-so capacitance near the device"), which clearly is not advice that can be used in isolation (that capacitor needs to be connected to others, and so on in turn; what inductance and ESR is acceptable in those connections!?).

The best solution then, given that we are given such paltry information, is to follow that manufacturer recommendation -- put in whatever miserable caps they say to, and ensure they are well damped by following the PDN analysis. In other words, the components they say to place are (perhaps) necessary, but not sufficient in and of themselves. We are responsible for the extenuating circumstances, and ensuring we haven't created a pathological PDN.

Here, if we simply add some ESR to Vs, the resonance is squashed right out, and a comfortably low impedance is had at all frequencies; we might add ESR by explicitly doing so (for the bulk ceramic, put a low-value resistor in series; beware ESL of the resistor, it all adds up!), or using a type chosen for modest ESR (aluminum polymer, electrolytic and tantalum are typical options, check datasheets for ESR ranges). Damping can also be introduced in parallel, such as using a C || (R+Cs) motif, where Cs > 3C and R = Zo. (The latter is especially suitable for strongly-filtered local supplies, like a sensitive analog subcircuit might require; a large inductor (some µH say) might be used, and then bypassed and dampened with this.)


To Summarize:

Why don't we use decoupling capacitors for open-drain outputs?

We do, when we need to.

It may be that the PDN impedance is already low enough that local bypass is not required, given whatever the tolerable noise level on the supply is. This is more likely the case for large-value pull-ups, where the change in current is small, and for slowly-changing outputs where the pin dV/dt and therefore supply dI/dt is small (when supply inductance is a concern).

In the other extreme, load current might be so large that it calls into question, not only the local supply, but further extents as well, or indeed the whole circuit itself. Consider the case of a pulsed load (say it's a powerful LED, motor, etc.) in a portable device: the battery voltage itself fluctuates The impedance of the battery limits how much power can be drawn, while maintaining circuit function (keeping supply voltage above minimum operating level), or safe operation (e.g. to avoid exceeding minimum battery voltage). We can consider a battery an enormously larger equivalent capacitance than anything we would put in circuit as such, making this a fairly extreme example.

In general, we need to consider not just current, but time as well, i.e. the rate of change in current, and its duration (charge). The supply impedance is just that, an impedance, and it can be a nearly arbitrary function of frequency. We should generally design constant-voltage supplies to have flat and low impedances, peaking no more than a limiting value, for best results.

\$\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.