Open Collector/Drain vs Push pull

by Colin__s   Last Updated December 23, 2016 08:10 AM

Given the situation where an LED is being used for a status indicator or similar, not toggling quickly.

Which is the best configuration for the IO pin, push pull or open drain? As I see it either will work, and I don't see any benefits to one configuration over the other.

U1 in the following is just representative, not a specific microcontroller.

schematic

simulate this circuit – Schematic created using CircuitLab



Answers 3


If U1 is also running from 5 V in your example, then it doesn't matter at all. Either way there will be no current thru the LED when the output is not actively pulling low. It won't matter that it is actively driving high or just open.

There are two cases where it might make a difference:

  1. Not the same power voltage. Open drain outputs can be made to tolerate a higher voltage than the supply voltage without too much burden. For example, you might have a microcontroller running from 3.3 V, but want the LED power to come from a 5 V supply. If the open drain can tolerate at least 5 V when off, then you can connect things just like you show.

    A push-pull output will have some sort of anti-static protection, which usually means a diode from the pin to the positive supply. Generally chips don't like any current thru these diodes during normal operation.

    The LED example with 3.3 V and 5 V is not the best to illustrate this, since 1.7 V across the LED and resistor will cause very little current to flow. However, consider maybe a 6 V supply, or driving a small solenoid or something.

  2. When the pin is also a digital input. Digital inputs are usually intended to be held solidly high or low. In between levels can cause excessive currents to flow, and can even cause oscillations internally. This can be a problem if the open drain driver is off, internally connected to a digital input, and the external circuit allows the voltage to float.

Olin Lathrop
Olin Lathrop
December 23, 2016 12:08 PM

For one LED, it makes very little difference.

If you have multiple LEDs, it might. If this was just one of many LEDs connected the same way, and you wanted to run them all, you might find that you were getting close to the maximum permitted U1 ground pin current. In that case, taking a few LEDs, connecting them to ground, and driving them from high logic would run the current from the VCC pin.

You might find for your particular choice of U1 that the source and sink currents were different, in which case you might want the higher current capacity.

Neil_UK
Neil_UK
December 23, 2016 12:08 PM

An open-drain pin, when open, will not allow current to flow in either direction. This is safer if it goes to some connector that might get short-circuited, and allows to use a microcontroller with a lower I/O voltage (if it's 5 V tolerant).

If your circuit does not need these features, it does not matter.

CL.
CL.
December 23, 2016 12:15 PM

Related Questions





Confused between push-pull and open-drain

Updated May 12, 2016 08:10 AM

Why are pullups needed on eMMC data lines?

Updated April 26, 2015 23:10 PM