Open-Drain vs Push-Pull Output: Key Differences Explained

Both are output stages that drive digital signals, but they differ in how they output H. A push-pull output combines a pMOS on the supply side with an nMOS on the ground side and actively drives both H and L with transistors, so it is fast and draws almost no current while idle. An open-drain output has only the ground-side nMOS: it pulls the line down for L, but for H it releases the output and lets a pull-up resistor pull it up. The rise is slower, but several outputs can share one line (wired-AND) and the pull-up voltage can be chosen, so it is used for I2C and interrupt lines.

AspectPush-pull outputOpen-drain output
Output stageTwo transistors: a supply-side pMOS and a ground-side nMOS (the same form as a CMOS inverter)Only a ground-side nMOS. Its drain is brought out to the pin, with nothing on the supply side
How H is outputThe pMOS turns on and connects the pin to the supplyThe nMOS turns off, releasing the pin (high impedance), and an external pull-up resistor pulls it up
How L is outputThe nMOS turns on and connects the pin to groundThe nMOS turns on and connects the pin to ground (the same)
Rise speedFast. The pMOS charges the lineSlow. Set by the RC time constant of the pull-up resistor R and the line capacitance C (e.g. about 0.47 µs with 4.7 kΩ and 100 pF)
Fall speedFast. The nMOS discharges the lineFast. The nMOS discharges the line
Connecting several outputs to one lineNot possible. If H and L collide, a large current flows from the supply to groundPossible. If any one output drives L, the line goes L (wired-AND)
Interfacing with circuits at a different voltageThe H voltage is set by its own supply voltage. A level shifter is needed for circuits at a different voltageThe H voltage is set by the pull-up voltage, so it can match the other side's voltage within the pin's voltage rating
Current consumptionAlmost none while idle (leakage only). Charge and discharge current flows when switchingCurrent keeps flowing through the pull-up resistor while L is output (about 0.7 mA with 3.3 V and 4.7 kΩ)
Typical speedTens of MHz or more is possibleLimited by the pull-up resistor and capacitance. For I2C, 100 kHz, 400 kHz, 1 MHz, etc.
Typical usesFast signals such as SPI and UART signals, clocks, general-purpose GPIO and memory busesI2C and SMBus, interrupt and reset lines shared by several devices, interfacing with circuits at a different voltage, driving LEDs

Figures are typical orders of magnitude and vary by process generation and product.

When to use which

Push-pull output
When a single output drives inputs and speed or low current consumption matters. Ordinary digital signals such as GPIO, SPI and UART use this type.
Open-drain output
When several devices drive the same line (I2C, shared interrupt or reset lines), or when you want to pass a signal to a circuit at a different voltage by changing the pull-up voltage.
Switching between them
Many microcontroller GPIOs can be configured as either push-pull or open-drain. Pins used for I2C are set to open-drain, with external pull-up resistors.

FAQ

How do you choose the pull-up resistor value?

A smaller value gives a faster rise, but increases the current that flows while L is output and also raises the L voltage (VOL). The upper limit is set by the line capacitance and the required rise time, and the lower limit by the current the output can sink and the VOL specification. For I2C, a few kΩ (e.g. about 2.2 to 10 kΩ) is commonly used.

What happens if push-pull outputs are connected directly together?

If one outputs H and the other L, a large current flows from the supply to ground through the pMOS on the H side and the nMOS on the L side (bus contention). The line voltage is also left somewhere in between, which can cause heating or device damage, so shared lines use open-drain outputs or tri-state outputs that can release the line.

Why does I2C use open-drain?

Because several devices drive the same SDA and SCL lines. Operations such as the receiver pulling SDA L to return an ACK, a slave holding SCL L to make the master wait (clock stretching), and arbitration when several masters start sending at the same time all rely on the wired-AND property: if any one device outputs L, the line goes L.

How is open-collector different?

The idea is the same. It is called open-collector when the output transistor is a bipolar transistor and open-drain when it is a MOSFET. Both only pull L down, and H is created by a pull-up resistor.

Check your understanding

When several open-drain outputs are connected to one signal line with a pull-up resistor, how does the line behave?

  1. AThe outputs conflict and are always damaged
  2. BIf any one outputs 0, the line becomes 0, acting as a wired AND
  3. CIf any one outputs 1, the line becomes 1
Show answer and explanation

Answer: B. If any one outputs 0, the line becomes 0, acting as a wired AND

An open-drain output either pulls the line to ground or releases it; a pull-up resistor provides the 1. If any device outputs 0 the line goes low, and it is high only when all release it—a wired-AND that tolerates simultaneous drivers without damage. It is used for I²C buses, interrupt lines and level shifting between different supply voltages. Rise time, set by the pull-up resistor and line capacitance, is relatively slow.

Which correctly describes the change when the value of the pull-up resistor on an open-drain output is reduced?

  1. AThe rise becomes slower, but the current flowing while the output is low decreases, reducing power consumption
  2. BThe rise becomes faster, but the current flowing while the output is low increases, and VOL also tends to rise
  3. CThe high-level voltage rises above the pull-up supply voltage, making it easier to exceed the receiver's input rating
Show answer and explanation

Answer: B. The rise becomes faster, but the current flowing while the output is low increases, and VOL also tends to rise

The high level of an open-drain output is produced by the pull-up resistor pulling the signal line up while the output transistor is off. The rise speed is set by the time constant of the resistor and the line capacitance—for example, 1 µs for 10 kΩ and 100 pF. A smaller resistor makes it faster, but when the output is low, current flows from the supply through the resistor: 3.3 mA for 3.3 V and 1 kΩ. If this current exceeds the IOL condition in the datasheet, VOL will not stay within its specified value, so choose a value that satisfies both.

What is a characteristic of I2C communication?

  1. AEach device needs a dedicated chip-select line
  2. BSeparate transmit and receive lines allow both directions at once
  3. CSeveral devices share two wires, clock (SCL) and data (SDA), and the partner is selected by address
Show answer and explanation

Answer: C. Several devices share two wires, clock (SCL) and data (SDA), and the partner is selected by address

I2C is synchronous serial communication that connects several devices with only two wires, SCL and SDA. The master first sends the partner's 7-bit address, and only the device with that address responds. The lines are open-drain, pulled up to 1 by resistors so any device can pull them low. It suits parts where few wires matter more than speed, such as temperature and acceleration sensors and EEPROMs.

  1. In I2C, how does the receiver of a data byte acknowledge it?
  2. What is the role of a level shifter inserted when passing signals between two blocks running at different supply voltages?

Practice Logic circuits questions

Key terms explained

Open-drain output
An output that brings out only the drain of the output transistor, actively driving only the low level. The high level comes from an external pull-up resistor, so several outputs can share one line or connect to circuits on a different supply voltage. It is used on I2C buses, for example.
Pull-up resistor
A resistor connecting a signal line to the supply so it rests at logic 1 when nothing drives it. It keeps input pins from floating and is used on I2C lines and elsewhere.
I2C
A synchronous serial bus connecting several devices on two wires, clock (SCL) and data (SDA), selecting the partner by address. The lines are open-drain with pull-ups.

Related comparisons