What is an Open Drain : Configuration & Its Working

An open-drain or open-collector output pin is simply a transistor that is connected to the ground. Whenever we apply high input at the gate, drain, and source are shorted. Whenever we apply low input at the gate, drain, and source are disconnected. To make it simple, open-drain is like a switch that will get connected or disconnected basing on the input signal given. This article discusses an overview of what is an open drain, circuit, and its working


Open-Drain Input/Output Configuration

An open-drain is commonly found in many integrated circuits. This helps multiple devices to connect with the usage of single wire which is in a mode of pull-down operation. This single wire is also a bi-directional one so its bidirectional nature will gain so much importance to the circuit due to the interconnection of many devices on a common line. Coming to the configuration it is having programmable output configuration with push-pull. The operating of digital output is done in two modes one is a push-pull mode and another one is an open-drain mode.

Open Drain
Open Drain

When the configuration is done on push-pull mode,0 connects output pin to ground, 1 will connect to Vio. When an operation is done on open-drain mode, the higher transistor will be disabled, 0 continues to connect with the ground, and outputting 1 will disconnect pin to Vio and remains floating.

Open Drain vs Pull Push
Open Drain vs Pull Push

Switches

  • It consists of only one switch which is connected to the ground
  • Push-pull will contain two switches. One switch is connected to the ground and another switch is connected to Vcc.

Output

  • If the output pin is made high then pin gets connected to ground through the switch. When the output pin is made low, the pin will start floating as the switch is turned off.
  • If the output is made high pin gets connected to Vdd through NPN switch. If the output is made low, the pin will get connected to the ground with the help of the PNP switch.

Power Consumption

  • Push-pull consumes very low power because it doesn’t require any pull up resistor
  • It requires high power consumption due to drain through a load resistor when it was ON

Operating Speed

  • Push-pull is having high operating speed
  • When compared with push-pull, it has slower switching

Loads

  • Push-pull will not drive external loads
  • An open-drain will drive external loads less than or equal to 10ma directly

Signals

  • Push-pull is not able to combine Vout signals for various sensors onto a common bus
  • It is able to switch higher or lower voltage than Vdd supply voltage

In an Open Drain vs Open Collector, An open-drain is CMOS and an open collector is BJT. When currents are low BJTs saturation voltage is a bit higher than the voltage drop due to RDS for FET.

Open Drain GPIO

  • PMOS doesn’t exist in open-drain configuration and the output has two possibilities high or floating.
  • NMOS will get activated by giving 0 in the output data register and the I/O pin is to the ground.
  • Output data register will leave the port in Hi-Z when it is given and I/O state is not defined.
  • To resolve this issue the internal pull-up resistor has to be activated or another one is giving an external pull up resistor. When the pull-up resistor is activated the I/O pin turns its state to Vdd.

Output mode with open-drain configuration is nothing but the top PMOS transistor simply not present. The drain will get open when the transistor is switched off, so the output will float. Open-drain output configuration can’t pull up the pin it can only pull down the pin. The open-drain output configuration of GPIO is useless until and unless it is provided with pull up capability

Open Drain GPIO
Open Drain GPIO

To make use of this in real-world applications, it has to be used with an external pull up resistor or internal pull-up resistor. In present scenario all MCU are supporting internal pull-up resistor for every GPIO pin, you have to use the GPIO configuration to activate or deactivate them

How to Drive LED

In order to drive LED first, activate the internal pull-up resistor after connecting the LED to the pin. For turning on the LED just give 1 as input so that it is inverted as 0 and the transistor will get turned off. When it gets turned off, a pull-up resistor will help LED will be driven to Vcc. Similarly, if you want to turn off the LED just give 0 to the input so that transistor will get on which will make the LED turned off.

The value of the internal pull-up resistor is fixed and its range is from 10kilo ohms to 250-kilo ohms which are good enough to run real applications

In Open-drain MOSFET, a MOSFET is like a transistor which is having the ability to handle higher voltages. The transistors switching behavior is controlled by the base. When IC output is flowing to base the flow of current will get switched on through the transistor similarly if there is little flow through IC output, then the current will not flow through the transistor. Transistor takes control of the flow of current and voltage potentials through circuits made with billions of transistors, basing on IC.

When the NPN transistor is open but connected to an external pin then it is an open collector this will make the transistor switch to ground when it’s active. This tends current sink and current source to gain current flow but in different directions

In open-drain I2C, whenever using the i2c, the serial clock pin, and the serial data pin will be in its configuration. In order to make the bus work properly, we have to connect the pull-up resistor to each pin either internally or externally. The correct value for pull up resistors in the i2c bus depends on the total capacitance of the bus and the frequency at which bus works. But we can figure out the value of pull up resistor by taking into consideration of I2c bus speed capacitance etc but the resistor value with the range of 4.7-kilo-ohms to 10-kilo ohms works.

Thus, this is all about an overview of what is an open drain, its configuration, how to drive LED, etc. Here is a question for you, what are the different configurations of a transistor?