Communication Protocols — Phase 2
Phase 2 03 Open Drain vs Push Pull

Open Drain vs Push Pull

In digital design, output stages dictate bus drive capability. Learn how Open Drain (MOSFET) and Open Collector (BJT) architectures work, why push-pull stages conflict on shared lines, and how wired-AND logic enables safe bidirectional communication.

In digital electronics, not all output pins behave the same way. Some pins can actively drive the line both HIGH and LOW. However, some special pins can only actively drive the line LOW. This unique hardware configuration is called Open Drain (MOSFET-based) or Open Collector (BJT-based). These are extremely important in shared-bus communication protocols like I2C.

Why Do We Need Open Drain / Open Collector?

In a standard microcontroller digital output stage (known as Push-Pull):

  • The circuit utilizes two complementary transistors to actively drive the line HIGH (connecting it to VCC) or actively pull the line LOW (connecting it to GND).
  • If multiple push-pull devices are connected to the same shared wire, a hardware conflict occurs immediately when one device drives the line HIGH while another device drives the line LOW.

This conflict forms a zero-resistance direct path between VCC and GND. Result: excessive current flow, system voltage drops, undefined logic states, and permanent hardware component damage.

To solve this, engineers designed a safer output configuration where only one direction is actively driven (LOW). The HIGH state is achieved passively using external resistors.

Fig 1 — Push-Pull Output vs Open-Drain Stage Architecture
PUSH-PULL (Standard Pin) VCC PMOS (Pulls HIGH) GND NMOS (Pulls LOW) OUTPUT OPEN DRAIN (Shared Pin) No PMOS Open (Hi-Z State) GND NMOS (Pulls LOW) OUTPUT

What is Open Drain?

An Open Drain output stage operates using a single internal N-channel MOSFET transistor:

  • The Source is wired directly to Ground (GND).
  • The Drain connects directly to the external physical output pin.
  • The N-channel MOSFET's Gate is internally driven by the microcontroller's logic.

When the internal logic switches the MOSFET ON, the transistor acts as a closed switch, and the output pin is actively driven to ground—reading a stable LOW state.

When the logic switches the MOSFET OFF, the transistor turns off completely. The output pin becomes disconnected from ground. Because there is no internal transistor connecting the pin to the VCC rail, the pin is left floating in a high-impedance state (Hi-Z). To read a HIGH state, an external passive pull-up resistor must connect the line to VCC.

“The pin acts like an electronic switch: it either connects the line directly to ground, or disconnects entirely (lets go).”

What is Open Collector?

Open Collector is functionally identical to Open Drain, but is built using a Bipolar Junction Transistor (BJT) instead of a field-effect transistor (MOSFET):

  • The transistor's Emitter is connected to Ground (GND).
  • The Collector is left open, leading directly to the physical output pin.
  • The BJT's Base is controlled by internal circuit logic.

Just like Open Drain, it can only actively pull the line LOW (sinking current to ground). It requires an external pull-up resistor to pull the line HIGH when the transistor is turned OFF. In modern CMOS-based digital systems, Open Drain is much more common, but both terms are used interchangeably in protocol interfaces.

Core Behavior Concept

A simple mapping of open drain states reveals the physical behavior of these output pins:

Digital State Transistor Action Physical Line Behavior
LOW (0) MOSFET ON (Closed Switch) Line is actively pulled directly to GND.
HIGH (1) MOSFET OFF (Open Switch) Line is released (floating). External pull-up makes it HIGH.

Simple Analogy

Think of a thick rope held by multiple people in a room:

  • Anyone can grab the rope and actively pull it down to the floor (LOW).
  • No one has the ability to push the rope upward to the ceiling (HIGH) because a flexible rope cannot be pushed.
  • The only way the rope rises to the ceiling is via a passive spring coil (pull-up resistor) pulling it upward from above.
  • If anyone in the room pulls down on the rope, it remains resting on the floor. The rope will only rise to the ceiling if everyone lets go of it simultaneously.
Fig 2 — Active Open Drain Circuit with Pull-Up Resistor
VCC (+3.3V) R_pull (10k) Output Pin GND (0V) NMOS MOSFET OFF → Released line HIGH via Rp

Why Pull-Up is Mandatory

Without an external pull-up resistor connected to the circuit, open-drain outputs simply do not work. If the internal transistor turns OFF, the line will float indefinitely in the high-impedance (Hi-Z) state. In this floating state, no defined logic voltage is present, and receivers will misread states completely. Open-drain layouts always require pull-up resistors to define a reliable, high voltage state.

Wired-AND Concept

Because open-drain outputs can only pull a line LOW and never force it HIGH, multiple devices can be wired together directly onto a single shared line safely. This physical bus sharing architecture forms a logical Wired-AND gate:

  • If any single device on the line turns its internal MOSFET ON, the entire line is actively shorted to ground and goes LOW.
  • The line will only sit at HIGH if all devices have their MOSFETs turned OFF simultaneously, letting the passive pull-up resistor bias the line.

This allows many microcontrollers and sensor chips to communicate and share the exact same wire without signal contentions or danger of burning pins.

Fig 3 — Wired-AND Bus Sharing Logic Schematic
Rp Shared Line VCC (+3.3V) Device A MOSFET OFF Device B MOSFET ON Device C MOSFET OFF Bus Logic LOW (0)

Real Embedded Example: I2C Bus

The I2C Bus protocol utilizes open-drain logic as a standard. Both lines—SDA (Serial Data) and SCL (Serial Clock)—require pull-up resistors to VCC. When any device wants to transmit data, it drives the line LOW by turning on its transistor. When it wants to transmit a binary 1, it releases the line by turning the transistor OFF, allowing the external pull-up to restore a HIGH logic level. This enables seamless, risk-free bidirectional communication between multiple master controllers and slave sensors on the exact same bus.

Why This Design is Powerful

Open-drain configurations offer unique hardware advantages in modern designs:

  • Multiple Devices on One Wire: Eliminates bus contentions and enables robust multi-node networks.
  • No Signal Collision Damage: If two microcontrollers transmit opposite states simultaneously (one drives LOW, one releases), the line goes LOW safely without short circuits or chip damage.
  • Safe Bidirectional Communication: A single physical wire can carry signals back and forth between chips safely.
  • Predictable Logic Behavior: The wired-AND layout guarantees clean, reliable signal states.

Push-Pull vs Open Drain

Choosing between these two output stages is a core decision in physical driver layout design:

Feature Push-Pull Output Open Drain Output
Can Drive HIGH (VCC) Yes (Active PMOS) No (Passive Pull-Up Required)
Can Drive LOW (GND) Yes (Active NMOS) Yes (Active NMOS)
Needs Pull-Up Resistor No Yes
Bus Sharing Capable No (Highly Risky, causes short circuits) Yes (Perfectly Safe, Wired-AND logic)
Primary Protocol Uses SPI, UART TX, PWM, GPIO pushes I2C Bus, Shared interrupts, Board Resets

Real-World Use Cases

Open drain outputs are heavily utilized in several key interfaces:

  • I2C Bus: SCL and SDA lines on shared multi-drop buses.
  • Shared Interrupt Lines (IRQ): Allows multiple hardware modules to pull a single shared CPU interrupt line LOW to request service safely.
  • Reset Lines: Multiple devices on an embedded board can pull a shared system reset line LOW to restart the processor safely.
  • Wired-AND Alarm Systems: Multiple window sensors wired in loop; if any window opens (sensor pulls LOW), the alarm fires.

Quick Summary

  • An open drain pin can only actively pull a signal line LOW (0).
  • A passive pull-up resistor is required to restore the line back HIGH (1).
  • An open collector is the BJT transistor equivalent of a MOSFET open drain.
  • Standard push-pull stages cannot share wires; open-drain is mandatory for shared lines to avoid short circuits.
  • Open-drain connections form a logical wired-AND configuration.
  • This design is heavily utilized to drive I2C, shared interrupt lines, and hardware reset tracks safely.