Problems with using LM324 as an inverting amplifier

Thread Starter

ZanShini

Joined Mar 2, 2018
6
As part of my project I need to invert a pulse train without changing it's amplitude. Hence I want to use an Op-Amp as an inverting amplifier with unity gain. I'm using the circuit given in the following tutorial.

Inverting Amplifier

And also the schematic I'm using.

1SvzMHu_ZanShini.jpg
Schematic

I chose LM324 to implement the circuit. I've used a single Op-Amp i.e. pins 1, 2 & 3, two 1K resistors for input and feedback resistances and connected pin 4 to battery's +ve terminal and pin 11 to the -ve terminal. I tested it with a 9v battery and as far as I understand, the output should be -9V. But my multimeter shows the output fluctuating around 0.98V.

I want to know if I'm doing something wrong or if LM324 can't be used as an inverting amplifier?


Mods Note:
Please upload your circuit to our forum, the circuit already copied from the linked page, thank you.
 
Last edited by a moderator:

LesJones

Joined Jan 8, 2017
2,936
You are not showing any power supply. Post a proper schematic showing the power supply and supply decoupling.
I think this should come under the homework class.

Les
 

Janis59

Joined Aug 21, 2017
1,258
You have cris-crossed the inverted input with sinphase one. Thus instead of negative loop You have hysteresis.
Just organize the loop via inverting entrance and use positive be grounded instead.
 

Thread Starter

ZanShini

Joined Mar 2, 2018
6
Hi Zan,
Welcome to AAC.
Is your circuit built as shown in the 'Schematic' link you have posted.?
E
View attachment 147377
Yes and I have connected a 9v battery's +ve terminal at +Vcc pin and -ve terminal to Gnd pin.

You have cris-crossed the inverted input with sinphase one. Thus instead of negative loop You have hysteresis.
Just organize the loop via inverting entrance and use positive be grounded instead.
I had seen in a video that in PSPICE + means inverting terminal. That is why I've simulated it like that. In the practical circuit I've given the input to the inverting terminal and grounded the non-inverting pin.

You are not showing any power supply. Post a proper schematic showing the power supply and supply decoupling.
I think this should come under the homework class.

Les
Thanks for responding. Actually in PSPICE schematic the Op-Amp part had no supply pins or ground pins that's why I couldn't show it. I've conneted +Vcc pin of the IC to +ve terminal of a 9V battery and Gnd pin of the IC to -ve terminal of the battery.
 
Last edited by a moderator:

LesJones

Joined Jan 8, 2017
2,936
How can you expect to get a negative voltage out when the negative rail is connected to zero volts. You need a negative supply of greater than - 9 volts.

Les.
 

Thread Starter

ZanShini

Joined Mar 2, 2018
6
Thanks for your valuable explanation. I have 3 questions relating to your circuits.
1. The connections are like this right?
https://imgur.com/a/rMDRl
Please excuse my lack of basic knowledge in Electronics.
2. Why does the output in the 2 lower circuits change based on the feedback and input resistance? Isn't the gain -Rf/Ri?
3. The circuit you showed is a simulation right? If yes what simulation software is it?

How can you expect to get a negative voltage out when the negative rail is connected to zero volts. You need a negative supply of greater than - 9 volts.

Les.
Thanks for the help brother. It seems my basic understanding of an Op-Amp is inadequate. I thought that the output depends on the input voltage not on the supply voltage. I still have some questions though. Please clear them up for me.
1. For supplying an Op-Amp with +15V and -15V I need two different batteries right?
2. Is it same for the adder circuit by an Op-Amp? I mean if I add 9V and 16V signals, then I need the supply to be more than 25V right?
3. What is the maximum limit for an Op-Amp supply?
4. What is the practical maximum gain possible from an Op-Amp?
5. If you can provide some article or suggest some material which explains the internal working of an Op-Amp(the articles I referred never mentioned anything about the supply voltage of an inverting amplifier so something which highlights this part also) I'd be very grateful to you.
 
Last edited by a moderator:

Janis59

Joined Aug 21, 2017
1,258
RE:""For supplying an Op-Amp with +15V and -15V I need two different batteries right?""
Not obligeously. You may use:
1) Opamps which permitting rail to rail operations (while it isnt good anyway to get it SO MUCH near the rail)
2) You instead may organize the middle point (virtual gnd) by means of two identical resistors, series between Vcc and gnd, the miidle point to + input.
3) You may organize the real two separate voltages +Vcc and -Vcc what is too clumsy.
 

ebp

Joined Feb 8, 2018
2,332
"2. Why does the output in the 2 lower circuits change based on the feedback and input resistance? Isn't the gain -Rf/Ri?"

That is a good question. The amplifier is being asked to do something it can't.

All op amps, even those that claim to be "rail to rail output" can only get the voltage at the output close to the power supply "rails" - that is the voltages to which the V+ and V- pins of the amplifier are connected. How close they can get to the rails depends on the internal circuitry of the amplifier and how much current has to be handled.
In the case of an LM324, it can get the output quite close to the negative rail but not very close to the positive rail.

In the two lower circuits, the negative rail is common, or zero volts. The amplifier is configured for a gain of -1 (some people will say "gain of minus one" and some will say "unity gain inverter" when referring to this configuration) and the input signal is positive. That means that the output of the amplifier should be a negative voltage with respect to common, but it can't go negative because there is no negative power supply. What it will "try" to do is set the output to the lowest voltage it can.

In the first circuits, the input is 9 volts and the resistors are each 1000 ohms. For simple analysis you can assume that there is no current flowing into or out of the inverting input of the amp. If the amplifier output could go right to zero volts there would be 9/2000 A or 4.5 mA flowing through the two resistors. With that much current flowing into the amplifier output the internal circuitry simply can't make the output pin go to zero, so the output settles at some positive voltage, in this case about 1.2 volts (more on that later). Of course now the current is (9 - 1.2)/2000 A. The simulation software will actually calculate the voltage numerous times to arrive at the final answer because each time it predicts a voltage based on current it has to recheck to see if the current changed and it needs to compensate.

In the second circuit, the resistor values are a thousand times as large, so the maximum current is only 4.5 µA. With a current that small the amplifier output is able to get closer to its negative supply rail - zero in this case, so the output is around 0.35 volts.

About the voltages shown: There is absolutely no way to justify reporting more than 2 significant digits, and actually 1 is dubious. Those numbers are simply what the simulation software produces based on the model it has which will use "typical" values. The actual values you measure with a real amplifier might be half as much or twice as much, and no two amplifiers would produce the exactly same values. This is because the manufacturers simply are not able to control the behavior under those conditions without making the part much much more expensive.
 

sghioto

Joined Dec 31, 2017
2,068
1. For supplying an Op-Amp with +15V and -15V I need two different batteries right?
2. Is it same for the adder circuit by an Op-Amp? I mean if I add 9V and 16V signals, then I need the supply to be more than 25V right?
3. What is the maximum limit for an Op-Amp supply?
1. Yes you can do that. Converter chips and negative DC converter modules can get you the negative supply using a single battery.
2. Yes you will if using those signals.
3. The LM324 max supply is 32 volts or +/- 16 volts in a dual supply setup. You will need a higher voltage op amp like the LM343, +/-34 volts.
SG
 

ebp

Joined Feb 8, 2018
2,332
Op amp maximum supply voltage typically falls in the range of of 5.5 volts, usually as a single supply, to 36 volts, usually as a "dual"/"bipolar"/"split" supply (typically ±18 volts). Once you get above 36 volts there aren't nearly as many choices. There are amps that will run with as little as 1 volt and others which can handle supply voltage up to 140 volts.

All op amps can be used on a single supply or a dual supply provided that the supply configuration is compatible with what is required of the overall circuit. When a split supply is used you don't have to use a symmetric supply. Your example, where you want -9 volts from a +9 volt input it could be done by connecting the V+ supply pin to zero volts and the V- pin to -10 to -12 volts - or even -30 volts. The LM324 can only get to within about 1.5 volts of its positive supply rail, so it could invert an positive signal between +1.5 V and [inverse of the negative supply voltage used]. If you needed handle a signal more negative that +1.5 volts you would require a dual supply.

Adder circuits are implemented using an inverting amplifier which may require dual supplies if the sum can be either positive or negative. Adders rely on the inverting input being at "virtual ground" - they sum currents. If you want to add +9 V and +16 V without scaling, you will require a negative power supply of -25 volts or more (negative). You may then wish to invert again to get +25 volts. You can find lots of info on the web about op amp adders.
 

Bordodynov

Joined May 20, 2015
2,765
Thanks for your valuable explanation. I have 3 questions relating to your circuits.
1. The connections are like this right?
https://imgur.com/a/rMDRl
Please excuse my lack of basic knowledge in Electronics.
2. Why does the output in the 2 lower circuits change based on the feedback and input resistance? Isn't the gain -Rf/Ri?
3. The circuit you showed is a simulation right? If yes what simulation software is it?
Yes. Points with the same names automatically (not visible) are connected.
I use LTspice with my extensive, additional library.
The model of this opamp I made on transistors. Factory models do not reflect real behavior.
 

Thread Starter

ZanShini

Joined Mar 2, 2018
6
"2. Why does the output in the 2 lower circuits change based on the feedback and input resistance? Isn't the gain -Rf/Ri?"

That is a good question. The amplifier is being asked to do something it can't.

All op amps, even those that claim to be "rail to rail output" can only get the voltage at the output close to the power supply "rails" - that is the voltages to which the V+ and V- pins of the amplifier are connected. How close they can get to the rails depends on the internal circuitry of the amplifier and how much current has to be handled.
In the case of an LM324, it can get the output quite close to the negative rail but not very close to the positive rail.

In the two lower circuits, the negative rail is common, or zero volts. The amplifier is configured for a gain of -1 (some people will say "gain of minus one" and some will say "unity gain inverter" when referring to this configuration) and the input signal is positive. That means that the output of the amplifier should be a negative voltage with respect to common, but it can't go negative because there is no negative power supply. What it will "try" to do is set the output to the lowest voltage it can.

In the first circuits, the input is 9 volts and the resistors are each 1000 ohms. For simple analysis you can assume that there is no current flowing into or out of the inverting input of the amp. If the amplifier output could go right to zero volts there would be 9/2000 A or 4.5 mA flowing through the two resistors. With that much current flowing into the amplifier output the internal circuitry simply can't make the output pin go to zero, so the output settles at some positive voltage, in this case about 1.2 volts (more on that later). Of course now the current is (9 - 1.2)/2000 A. The simulation software will actually calculate the voltage numerous times to arrive at the final answer because each time it predicts a voltage based on current it has to recheck to see if the current changed and it needs to compensate.

In the second circuit, the resistor values are a thousand times as large, so the maximum current is only 4.5 µA. With a current that small the amplifier output is able to get closer to its negative supply rail - zero in this case, so the output is around 0.35 volts.

About the voltages shown: There is absolutely no way to justify reporting more than 2 significant digits, and actually 1 is dubious. Those numbers are simply what the simulation software produces based on the model it has which will use "typical" values. The actual values you measure with a real amplifier might be half as much or twice as much, and no two amplifiers would produce the exactly same values. This is because the manufacturers simply are not able to control the behavior under those conditions without making the part much much more expensive.
Thanks for your kind explanation.

That video is incorrect.
The (-) terminal is always the inverting terminal.
What you said should be correct. But can you please explain then why is the output in my simulation -9V? I'm really confused about this.

Thanks to all the people who responded and shared your valuable knowledge with me. I learnt a lot from you guys. The circuit works now. I hope for your help in the future too.
 
Last edited by a moderator:
Top