34
\$\begingroup\$

As I understand a buffer gate is the opposite of a NOT gate and does not change the input:

It does nothing!

However I sometimes see buffer gate ICs used in circuits and to an inexperienced eye they seem to do nothing at all. For example recently I've seen a non-inverting buffer gate used at the output of an emitter follower, roughly something like this:

But why?

So when would one require to use a buffer IC in their circuit? What could be the purpose of the gate in the aforementioned schematic?

\$\endgroup\$
  • 1
    \$\begingroup\$ Sometimes it's a logic level translator between different logic families. \$\endgroup\$ – Brian Drummond May 27 '16 at 10:27
  • \$\begingroup\$ @Colin__s What? No, I just got a notification and noticed the title had a grammatical error. I got my answer. Sorry about that. \$\endgroup\$ – I have no idea what I'm doing Jan 13 '17 at 13:08
  • 1
    \$\begingroup\$ In that case you have my apologies, I shouldn't have been so short. \$\endgroup\$ – Colin Jan 13 '17 at 13:09
59
\$\begingroup\$

Buffers are used whenever you need... well... a buffer. As in the literal meaning of the word. They're used when you need to buffer the input from the output. There are countless ways to use a buffer. There are digital logic gate buffers, which are passthroughs logicwise, and there are analog buffers, which act as passthroughs but for an analog voltage. The latter is kind of outside the scope of your question, but if you're curious, look up 'voltage follower'.

So when or why would you use one? At least when the simplest and cheapest buffer of all, a copper wire/trace is readily available?

Here are a few reasons:

1. Logical Isolation. Most buffers have an ~OE pin or similar, an output enable pin. This allows you to turn any logic line into a tristate one. This is especially useful if you want to be able to connect or isolate two busses (with buffers both ways if needed), or maybe just a device. A buffer, being a buffer between those things, lets you do that.

2. Level Translation. Many buffers let the output side be powered from a different voltage than the input side. This has obvious uses for translating voltage levels.

3. Digitization/repeating/cleanup. Some buffers have hysteresis, so they can take a signal that is trying real hard to be digital, but just doesn't have very good rise times or isn't quite playing right with thresholds or whatever, and clean it up and turn it into a nice, sharp, clean-edged digital signal.

4. Physical Isolation You have to send a digital signal further than you like, things are noisy, and a buffer makes a great repeater. Instead of a GPIO pin on the receiving end having a foot of pcb trace connected to it, acting as an antenna, inductor, and capacitor and literally vomiting whatever the heck noise and awfulness it wants directly into that poor pin's gaping mouth, you use a buffer. Now the GPIO pin only sees the trace between it and the buffer, and the current loops are isolated. Heck, you can even properly terminate the signal now, like with a 50Ω resistor (or whatever), because you have a buffer on the transmit end too and can load them in ways you could never load a wimpy little µC pin.

5. Driving loads. Your digital input source is high impedance, too high to actually interface with the device you want to control. A common example might be an LED. So you use a buffer. You select one that can drive, say, a hefty 20mA easily, and you drive the LED with the buffer, instead of the logic signal directly.

Example: You want status indication LEDs on something like a I2C bus, but adding LEDs directly to the I2C lines would cause signaling issues. So you use a buffer.

6. Sacrifice. Buffers often have various protection features, like ESD protection, etc. And often they do not. But either way, they act as a buffer between something and another thing. If you have something that might experience some sort of transient condition that could damage something, you put a buffer between that thing and the transient source.

Put another way, chips love exploding almost as much as they love semiconducting. And most of the time, when something goes wrong, chips explode. Without buffers, often whatever transient that is popping chips left and right will reach deep into your circuit and destroy a bunch of chips at once. Buffers can prevent that. I'm a big fan of the sacrificial buffer. If something is going to explode, I'd prefer it be a 50¢ buffer and not a $1000 FPGA.

Those are some of the most common reasons I could think of off the top of my head. I'm sure there are other situations, maybe you'll get more answers with more uses. I think everyone will agree that buffers are terribly useful, even if at first glance, they seem rather pointless.

\$\endgroup\$
  • 9
    \$\begingroup\$ And you can get that 50-cent buffer in a DIP and put it in a socket, so that when it does get sacrificed to the gods of magic blue smoke, it's just a matter of popping it out and slapping a new one in ;) \$\endgroup\$ – ThreePhaseEel May 27 '16 at 11:46
  • 5
    \$\begingroup\$ Also buffer can be use to synchronize 2 signals by introducing delay. \$\endgroup\$ – MathieuL May 27 '16 at 14:02
  • 4
    \$\begingroup\$ Your answer should include the OP's case: so the next stage's input impedance isn't in parallel with R1, changing the behavior of Q1. \$\endgroup\$ – Warren Young May 27 '16 at 15:08
  • 1
    \$\begingroup\$ +1: great answer and lots of reference info just in one place! Just a nitpick: "buffers have hysteresis" should be replaced by something like "some buffers have hysteresis". Those which don't may even be used to boost analog signals. \$\endgroup\$ – Lorenzo Donati supports Monica Jun 22 '16 at 10:48
  • 1
    \$\begingroup\$ @LorenzoDonati Nitpicking is always welcome, as are edits. I do my best to give good answers but no one is perfect, so I very much appreciate it when other people take the time to correct any errors or issues. And you're absolutely right, only certain buffers have hysteresis. I'll update the answer accordingly, thanks! :) \$\endgroup\$ – metacollin Jun 23 '16 at 11:00
9
\$\begingroup\$

Simple buffer gates have a few applications:

  • In the older days, there where limited fan-out of a logic output, when fed to multiple subsequent inputs. If I remember correctly, it was around 5 for TTL LS. So if you used an output to feed more than 5 inputs, the logic levels were not guaranteed anymore. You could use buffers to solve this problem. Each buffer could feed another 5 inputs (with a little delay involved). Now, with CMOS, it is not really relevant anymore, the fanout is orders of magnitude greater, and it is never a problem.
  • It can be used to "amplify" a weak signal. If the signal has a very high impedance, and you want to use it as an input of a circuit that has low input impedance, the logic levels wouldn't be within specs. Maybe this is the usage in your specific example.
  • It can be used as a small delay line.
  • Usually, the buffer has a schmitt trigger input (but we then usually draw a small "hysteresis" sign: ⎎ in the buffer triangle, and it seems it's not your case). So if the logic level is inbetween high and low, the output is still predictably defined (it stays to the level it is). This has many usage when interfacing analog signals (e.g. coming from sensors) to digital inputs.

Other than that, there is not many usages of it. That is why we don't find those easily, actually.

\$\endgroup\$
  • 2
    \$\begingroup\$ Amplification is right on the mark. Indeed that is the function in both your first two bullets. It is no coincidence that a digital buffer uses the empty triangle symbol of amplifiers. They function as a voltage limited current amplifier (with very nonlinear gain). That is the same function an an analog voltage buffer (like an opamp configured as a voltage follower). The difference is that digital buffers usually support only two output voltage levels, so have some nonlinear voltage gain too. \$\endgroup\$ – Kevin Cathcart May 27 '16 at 15:08
  • 1
    \$\begingroup\$ The traditional actual "buffer" is in fact an opamp in unity gain configuration. A gate is used usually for smaller loads, or for logic edge enhancement from their integrated schmidt trigger, as standard logic can easily accomodate a few mA load. \$\endgroup\$ – Drunken Code Monkey May 28 '16 at 0:38
  • 1
    \$\begingroup\$ Fan out is an important use. Thanks for mentioning. \$\endgroup\$ – Joel B May 28 '16 at 17:39
5
\$\begingroup\$

Buffers are used when needed to meet non-function requirements, often speed (or input / output impedance, which affects speed). An abstracted circuit often doesn't show enough detail to appreciate this need. In your circuit, R1 might be too high to drive whatever is connected to the output to low in a quick and reliable way.

Another reason might be that the buffer contains output protection (current limiting, ESD protection).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.