2

I realise that this has been asked elsewhere, specifically:

That's actually a wiring diagram (and some of the folks around here call them cartoons) but it will suffice as the schema can be seen since everything is labelled. 5 V should be fine for Vdd. The resistor is a "pull-up" to pull the data line high if none of the chips are pulling it low. – Transistor Jul 16 '17 at 22:32"

My questions is, as a complete newb, what does "pull up" to pull the data line if none of the chips are pulling it low" - actually mean in regular English.

RedGrittyBrick
  • 14,602
  • 5
  • 37
  • 77
  • I've added an updated comment to the linked question using the modified wording: "The resistor is a "pull-up" to pull the data line high if none of the chips are **driving** it low." – Transistor Jul 21 '21 at 16:04

3 Answers3

5

My questions is, as a complete newb, what does "pull up" to pull the data line if none of the chips are pulling it low" - actually mean in regular English.

Yes, that's an unfortunate use of English, aimed at reminding the experienced people what's happening, rather than helping the newbs. It uses the word 'pull' twice, to mean two different things.

It also uses the direction 'up'. This comes from the convention that when we draw schematics, we put positive to the top of the paper and ground at the bottom, so that currents tend to flow 'down'. That's one of the reasons we don't like 'cartoons' (even labelled ones) (there are plenty of other reasons), as they tend not to follow this convention. 'dellebal' si sdrawkcab ecnetnes A. But it's much more difficult to read than the orientation you're used to.

Here are some pullups, used with switches, and an open collector output

schematic

simulate this circuit – Schematic created using CircuitLab

People often ask what value resistor should be used for a pullup. It's a compromise.

  • large resistance to make the 'strength' much weaker than the bottom driver, so that when it's on, the bottom driver can 'win'
  • small enough to drive whatever is following, so that when all the bottom drivers are off, the pullup can 'win' against the load (so it can be different between logic families or non-logic loads)
  • small enough to charge the load's capacitance quickly enough (see how this consideration affects choice of pullups for I2C for instance)
  • large to avoid wasting too much power (different considerations for battery and mains-powered devices!)
  • 10 kΩ is often a good 'first stab' which will work in many situations

To summarise the drive strength issues, I'd like to rewrite your original quote a little as

  • ... to pull the data line if none of the chips are driving it low"

One of the uses of a pulled-up signal line is that any low-side driver can pull it low, performing a wired-OR function. That's why I've drawn two switches on R1's line. If either close, then the line goes low. So to finally answer your question ...

  • If none of the switches (or output drivers represented by switches) are driving it low, then R1 'pulls' that output line 'up' to VCC.

Why do we call it 'wired-OR' when it's obviously a 'wired-AND'? Because back in the 'old days' of TTL, the 'negative logic' convention (low is 'active', high is 'off') was used predominantly for controls, for good engineering reasons of noise margin and direction of bias current flows (a load sourced bias current, so a pull-down had to be unreasonably small). While this was convenient for circuit design, it confused newbs then, and it confuses even more now that TTL has been essentially replaced by CMOS. The noise margin argument remains but is weakened, but the bias currents have vanished. However, the wired-OR name has stuck.

Neil_UK
  • 158,152
  • 3
  • 173
  • 387
3

In logic, a signal can be in one of three conditions:

  • a ‘high’ level, close to or at the power supply (sometimes called ‘VCC’)
  • a ‘low’ level, close to GND
  • ‘floating’, meaning undriven by a source

For a number of reasons it’s bad practice to leave a signal floating: its logic state is undefined, which can cause erratic behavior in the circuits that it’s connected to.

A ‘pull-up’ is a weak resistor to tie a signal to a high level if nothing else is driving it. Likewise, a ‘pull-down’ takes it to a low level. Either way, the resistor tie covers the ‘floating’ case and resolves the signal to a valid high (pull-up) or low (pull-down).

Beyond this, some logic systems only drive low and rely on a pull-up to make the valid high. The I2C bus is a common example: it uses what’s called an ‘open collector’ drive, which can only sink current to ground.

A perhaps less familiar use of pull-up to make logic high is an old logic family called resistor-transistor logic (RTL). RTL only uses NPN transistors to drive the logic low state, and relies on pull-up resistors to make logic high. The Apollo Guidance Computer was built from this kind of logic, using a 3-input NOR gate.

This kind of logic is still used in limited cases to make what's called wired-OR logic (technically, wired-NOR). Wired-OR allows adding more inputs to a shared signal (such as an interrupt, or power-good flag) without adding more gates. You'll see references to 'open-collector' and 'open-drain' drivers: these are used to implement wired-OR. And of course for this to work, it needs a pull-up on the shared wired-OR signal.

hacktastical
  • 49,832
  • 2
  • 47
  • 138
2

Since you're "great with plumbing" [edited out of original question by @JRE] this may help. (I'm the author of your confusing quote.)

enter image description here

Figure 1. A motorised valve. Image source: PlumbingProducts.ie.

I have a couple of motorised valves in my plumbing system. They use a small motor to open the valve and a spring to close it when the motor is switched off.

In this case the spring is "pulling" the valve closed and the motor is "driving" (a word I should have used in my other answer) it open. Obviously for this to work the spring must be weaker than the motor.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 2. (a) A pull-up resistor. (b) A pull-down resistor.

In the examples of Figure 2 we can configure a pull-up (to V+) or a pull-down (to ground) very easily. You can think of R1 and R2 as being like the valve's spring and the switches as being much stronger as they have such low resistance compared to the resistors when the button is pressed. In this way they are like the motor driving the buffer input voltage very strongly against the "pull" of the resistor.

enter image description here

Figure 3. An opened motorised valve. The motor (top) and spring (follow finger) are visible in this still from YouTube video How to renew a three port motorised valve head. No draining down.

Transistor
  • 168,990
  • 12
  • 186
  • 385