0

I'm playing around with this op amp: https://www.st.com/resource/en/datasheet/ua741.pdf. My circuit looks like this:

enter image description here

It is hooked up to an Arduino Uno. I used analog read on the Arduino to read voltages at 2, 3, and 6. The pot allows me to vary the voltage at 3 from 0 to 5 V.

With R1 = R2 = 10K, I should have a gain of 2. I should be able to vary the voltage at 3 from 0 to 2.5 V and the output of the op amp should go from 0 to 5 V, right? I know I probably wont get quite to 0 or 5 V but pretty close.

However, the plot below is what I measure with the Arduino. As far as I can tell, the analog read value of 0 is 0 V and 1000 is about 5 V.

enter image description here

So the op amp appears to work but only in a vary narrow range. It looks like its pretty close to the upper limit, but doesn't get anywhere close to outputting 0 V.

Also, if I replace R1 with a higher resistance or R2 with a lower resistance, giving me higher gain, I get no response at all at the output. A3 remains at a constant value of around 800 no matter what the input is.

I'm new to op amps so I'm probably missing something obvious... Thanks!

chuck1
  • 149
  • 5
  • Related: https://electronics.stackexchange.com/questions/304521/reasons-not-to-use-a-741-op-amp – MarkU Mar 10 '21 at 23:19

3 Answers3

10

You can't run a 741 on a 5 V supply.

That op-amp design is > 50 years old and was designed for ±12 to 18 V supplies. The output can't swing within about 2 V of either supply rail so you should expect to see the output vary between about 2 V and 3 V. You seem to be getting a little higher.

enter image description here

Figure 1. Internals of the ancient 741 opamp. Source: Wikipedia.

Q14 pulls the output towards V+ but there is a drop of a volt or two across it so it can't get you to V+. Similarly Q20 pulls the output to zero when required but has a minimum of couple of volts drop across it. That didn't matter for analog circuits with a ±12 V supply as there was still plenty of swing room. With a 5 V supply you have almost none.

Buy a modern op-amp with rail-to-rail inputs and outputs.

Transistor
  • 168,990
  • 12
  • 186
  • 385
6

I should be able to vary the voltage at 3 from 0 to 2.5 V and the output of the op amp should go from 0 to 5 V, right?

Incorrect.

Although the UA741 is specified to work down to a single rail of 5 volts, it's virtually useless at doing what you want on that power rail. It won't work for several reasons contained in this Q and A entitled: -

Reasons not to use a 741.

In summary: -

  • Minimum recommended power supply rails are +/- 10 volts (your is 0 volts and 5 volts)
  • Input voltage range is typically from -Vs + 2 volt to +Vs - 2 volt (on your power rails that means +2 volts to + 3 volts)
  • Typical output voltage swing is -Vs + 1 volt to +Vs - 1 volt
  • Guaranteed output voltage swing is -Vs + 3 volt to +Vs - 3 volt (that's impossible on your power rails)
Andy aka
  • 434,556
  • 28
  • 351
  • 777
3

It’s a 741. It’s known for being old and kind of limited, especially in its ability to drive close to the rails (narrator: it sucks at that) or run on low voltages (narrator: ditto.) Running on a single 5V supply is definitely not in its wheelhouse. Datasheet will tell you that.

Replace it with a newer op-amp, like a CMOS one with rail-to-rail swing rated for low voltage. Then you will get closer to the expected behavior.

If you still want to kick it old-school, the LM324 is a better choice for single supply. It’ll swing between ground and 3.5V on a 5V supply. It’s popular and cheap.

hacktastical
  • 49,832
  • 2
  • 47
  • 138