Open-Drain

Open-drain and open-collector circuits allow multiple devices to safely connect to a wire which all connected devices can pull low. To better understand why open-drain or open-collector circuits are needed, consider the following circuit.

Figure 1. Two Simplified Output Circuits Connected to Each Other

The figure above shows two simplified output circuits connected to each other. The problem in the circuit above occurs if, for example, IC1 tries to hold the line high while IC2 tries to pull the line low. Such a situation will create a low resistance path from VCC to ground as both T_11 and T_22 will conduct current. The red line shows the low resistance path. If none of the circuits have any form of overcurrent protection, this will create a short circuit that can damage the devices. If the circuits do have such protection, it will be difficult to predict what the input will be on the devices.

The solution to this problem is to use an open-drain or open-collector circuit on the output with a pull-up resistor. This will avoid creating a low resistance path between VCC and GND, and the inputs will be able to read the correct value from the bus.

The devices mentioned in chapter Relevant Devices feature open-drain functionality. Both the open-drain and the open-collector circuit are capable of having the line pulled low by another device and pulling the line low itself. The difference is that open-collector uses a BJT transistor to pull the line low, while open-drain does so by using a MOSFET transistor. The following figure shows two devices connected by an open-drain connection.

Figure 2. Two Devices Connected by Open-Drain with Pull-Up Resistor

When both devices’ output is high, the transistors do not conduct current. The input will read the voltage over the transistors as VCC (high) on both sides. If one or both devices pull the line low, the transistors will start conducting, and both inputs will read zero volts on the bus. The current will in any case flow through a pull-up resistor, which will limit the current between VCC and ground. This circuit can never create a high current path from VCC to ground, and the inputs will read the correct value.