# How can LM324 work in dual supply mode when it only has 2 pins for the supply?

The LM324 quad opamp data here says that it can work in single as well as dual supply mode. However, it has pins for positive supply and another for ground on its sides. The pin for ground can also be used for negative supply as per the datasheet. However, if we shall only connect the +V and -V and no GND, how does the concept of -V arise in the operation of the op-amp?

• Only two pins are needed. One for the highest voltage and one for the lowest. Whether V+ is 12V and V- is -12V, or V+ is 24V and V- is 0V doesnt make any difference for any opamp. What GND is, is essentially just a potential we have decided to call 0V and measure all the others voltages against. – fredrik.hjarner Mar 3 '16 at 22:52
• If you send in a 1V signal from an MCU to the opamp, then what it means is that the signal is 1V above the MCUs GND. If the opamp have the same power supply as the MCU then it will also "see" the signal as 1V. Even if the opamp has another power supply will it see the signal as 1V because the GND of the MCU supply and , something we choose as, GND on the supply of the opamp MUST be connected to get/have a common potential to measure every other voltage from. – fredrik.hjarner Mar 3 '16 at 23:10

The op-amp only knows about the voltage between its power pins. It doesn't know or care where you think "ground" (zero volts) is.

The circuit around the op-amp will determine where "ground" is relative to the op-amp's power supply pins.

The datasheet you linked to states:

Large output swing: 0 V to V$^+$- 1.5 V.

This means that if we power the op-amp from a 12 V supply the output can swing from 0 to 10.5 V. Reading the fine print we find that it's a bit more complicated than that.

From datasheet page 9.

Figure 11, page 9, shows a test setup with no feedback and the inverting input at half supply while the non-inverting input is at ground. This should drive the output down to zero volts. And it does - until you start to sink come current into it. The graph shows that at only 0.1 mA the output voltage has risen to 0.6 V which is about one diode drop. The problem is there isn't enough working space ("footroom", maybe, as it's the opposite of headroom) and the op-amp can't pull down any harder.

simulate this circuit – Schematic created using CircuitLab

Figure 1: single rail supply. Figure 2. Dual rail supply.

Have a look at figures 1 and 2, both wired as non-inverting voltage followers. In Figure 1 we will have the situation shown in the datasheet. A weak pull-down and not really a 0 V output in many applications.

Figure 2 shows the dual-rail setup. To get down to zero volts at, for example, 20 mA we can see from the Figure 11 chart that we need the negative power voltage to be at least 2.5 V below zero. (20 mA / 2.5 V is near the tip of the 30 V arrow.)

In most applications once a negative voltage rail is needed the usual approach is to make the voltages symmetrical and +/-12 and 15 V are the most common. Having a +12 V / -2.5 V PSU would be quite unusual (but not wrong).

• hmm, I just did an inverting amplifier creation with this chip. And yes, it did not go to the rail voltage, it saturated at less than it just like you have pointed. However, I did not load it. I will load it when I do the test agan. – quantum231 Mar 3 '16 at 23:44

If you for example connect the GND pin to -5v and the VCC pin to 5v, the 0v (we will call it signal ground) comes into play when you start wiring up circuits. For example, lets consider a single rail design first.

Suppose you wire up an opamp as a simple amplifier, +5v to the VCC pin. GNd is connected to GND. the inverting input is connected to the output.Now connect a signal at the noninverting input.The opamp will adjust the output voltage until both inputs are the same voltage. Since the output and the inverting input are always the same voltage, it means that the output simply tracks the noninverting input. If you add a couple of resistors,one between the inverting input and the output (R1) ,and another between the inverting input and ground (R2), they form a voltage divider. Now the inverting input is Vo*(R1/R2) But both inputs are equal, so Vo*(R1/R2)=Vin, so Vin*(R2/R1)=Vin. If R2 is greater than R1, you have a amplifier. If R1 is greater than R2 you have an attenuator. But it only works on signals from 0 to +5v. If your signal swings less than 5v,your in trouble. It just clips that part off.

So now take the circuit and instead of connecting the opamp between 5v and 0v (gnd) connect it between +5v and -5v. If you set it up in the first configuration, the "voltage follower" no additional changes to the initial circuit are necessary. When the input swings positive, the opamp tracks it by adjusting the output until both inputs are the same. Similarly,when it swings negative it does the same thing. As far as the opamp can tell, its sitting between 0 and 10v and getting a 5v input signal that swings between values less than and greater than 5v. That's because whenever you specify voltage,you specify with respect to some other point. You measure voltage ACROSS a component. In many cases,that point is gnd, but sometimes its across a resistor or some other component.

But suppose you want to implement the second circuit with the split supply rail. Thats simple too. Hook up the opamp so that its supplied by +5v and =5v like we just did. Now,once again,one resistor goes between the inverting input and the output. Presumably we have THREE power supply wires, +5v,-5v and gnd (0V). Connect the second resistor between the inverting input and gnd. Now the circuit works exactly the same, except that the opamp can vary its output voltage between +5 and -5v to get both inputs at the same value. The output is still Vo=(R2/R1)*Vin, but now it can go both positive and negative.

In fact,suppose you were using a 9v battery to run your circuit off,but you still wanted to be able to make an amplifier that could handle positive and negative signals. Where do you get your 0v? Simple, take a pair of resistors, say 5000ohms or so. Connect them across your 9v battery. Less than a mA will flow through these resistors.Each one will drop half the voltage (because they are the same size.) So the point between them will be 4.5V. But since its a battery thats not connected to anything else, your free to call that point 0V. thats your ground. So the negative terminal is -4.5 and the positive terminal is +4.5. When you hook this up to an audio source for example, look at the connector. it has a tip that is the signal, and a the sleeve is gnd. Connect that to the ground in your amplifier and your good to go.

(But what about the answer to the question of ,how big of resistors do you need. After all, only the ratios of the resistors set the gain and the ground point. So why not choose something really really big (1,000,000,000ohms) or really really small .001 ohms). The opamp actually draws between a tenth to a full microamp. Suppose we made the resistance really large, like 10 million ohms. Then the current through the voltage divider is very small, around 100microamps. When you draw current from a voltage divider,more current flows through one resistor,less through the other and the voltage it outputs changes (because the resistance of the input is similar in magnitude to the 10 million ohms of your divider). So voltage dividers only work right when you take a tiny amount of current compared to the amount flowing through the entire divider circuit. So you need to make the voltage divider with low enough values so that the voltage stays reasonably constant when you load it down by connecting it to an input.

So why not go really low, lets say a tenth of an ohm. So your divider draws around 10 amps. That kills your little battery in seconds and melts wires unless you use great big cables, and the resistors have to be HUGE.The opamp cant hope to supply that much current so at best it will just self limit the current and at worse it will let out the magic smoke (burn out). So although a nA out of 10A does not appreciably change the voltage from the divider, its simply not practical either. Even larger values like,say 100 ohms, which would draw 100mA are probably too large in this circuit. The opamp can probably only put out a 100-150mA,and you have already used most of that,and your battery is going to go dead in no time, just generating head in the circuit without doing anything useful.

It all sounds complex, but rather than doing a lot of math,you can just make a educated guess. I chose 5k for my voltage divider above because that draws less than a mA, so it wont kill the battery fast, and its a factor of 1000 or more of the 100-200nA the input of an opamp draws. Similarly, you would probably choose the resistors in the feedback network to add to about 10k ohms or so (or 8k or 20k would be fine) so that the divider between the output and the inverting input is going to draw about a mA at full swing, and wont load the divider there,while also not pulling to much current from the opamps output.