MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › OC and OD gates and pull up calculation
HomeModels
Table of contents

On this page

Electrical & Electronic Basics (600 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

OC and OD gates and pull up calculation

Open collector and open drain outputs have no high level of their own and need an external pull up, which also enables wired AND and level shift. This page covers use and the pull up math.

1. How it works

A push pull output drives both ways, but an OC or OD output stage only pulls down; the high level comes from an external pull up resistor, so without it the output can never go high. That is exactly why several OC outputs can be tied together as wired AND: any one pulling low makes the bus low, and only when all release does the pull up make it high, sharing an interrupt or bus. It also shifts levels by pulling to the target voltage.

2. Practice and pitfalls

Pull up R has two bounds: minimum set by sink current, Rmin equals (VCC minus VOL) over IOL so low level sink stays within drive; maximum set by rise time, roughly Rmax equals t over (0.69 times C load times N). Experience: I2C pull up 4.7 k at 5 V, 2.2 k at 3.3 V. Too small sinks too much and heats, too large is slow and noise prone on fast buses. Account for total load capacitance.

3. OC OD use

ItemPointValue
Need pull upelse no highexternal R
Wired ANDtie OCshared bus
Level shiftpull targetcross domain
Rminlimit sinkby IOL
Rmaxlimit slowby C t
Wrongno pull upstuck low

4. Notes

OC OD must have an external pull up to reach high, can be wired AND for a shared bus and shift across voltage domains. Pick R between Rmin (sink limit) and Rmax (speed limit), about 4.7 k at 5 V for I2C. Never skip the pull up, do not exceed the next stage voltage, and a failed low device sticks the bus.

5. References

The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Open drain interface per GB/T 4728; I2C to IEC 60204-1 and GB/T 5226.1. Always check the device datasheet and the product design file for ratings and derating.

6. Cautions

⚠️ Three common pitfalls:
① Forgetting the pull up leaves output stuck low with no function.
② Pull up to 5 V into a 3.3 V part overvolts it.
③ Too small R exceeds IOL and burns the device; stay in range.

Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL