I'm using RPi 3b+ with ADC (MCP3208) to monitor AC signal (+/- 5V). Since the ADC can't read negative signals, I tried to level shift it using an op amp (LM741).

I tried to make this connection (the supply voltage has been changed to +-15V):

Non-Inverting Op Amp Level Shift

I made a simple voltage divider circuit by using 2 1k resistors from 3.3V of my pi and connected it as the V Ref for my op amp.

I am using this setting from myDAQ:

NI myDAQ fgen settings

And what I got from is a constant DC 0f 2.527V:

matplotlib figure

Any idea what went wrong?


I've changed the supply from 3.3V to +-15V as some of you have mentioned, and my the VREF pin of my ADC now has also been set to 1.65V same as the VREF for my op amp. The result is:

New Result

Is it correct to assume that LM741 is bad for level shifting because I am still not getting 0-3.3V?

  • 1
    \$\begingroup\$ What do the blue and gold traces in your first chart represent? \$\endgroup\$
    – The Photon
    Dec 3, 2019 at 17:40
  • \$\begingroup\$ It doesn't explain it completely, but your output filter rolls off at about 16Hz, and will be down almost 10dB at 50Hz. That would mean you get about 1VP-P centered around 1.65V, though. Try putting 3 probes on the op amp signals in and out, that might clarify it further. \$\endgroup\$ Dec 3, 2019 at 17:40
  • 4
    \$\begingroup\$ A 741 won't work without a much higher voltage supply. They're specified at ±15V, and I've rarely seen them specified down to ±5V. 0-3.3V is just not gonna cut it. \$\endgroup\$
    – Hearth
    Dec 3, 2019 at 17:47
  • 1
    \$\begingroup\$ @ThePhoton the blue represents the reading from the op amp output, the gold one is just ground \$\endgroup\$ Dec 3, 2019 at 17:48
  • 3
    \$\begingroup\$ Mandatory 741 warning electronics.stackexchange.com/questions/304521 \$\endgroup\$
    – pipe
    Dec 3, 2019 at 17:59

3 Answers 3


The datasheet for the LM741 shows the power connections to be different from your circuit.

Here's the pinout for the LM741:

enter image description here

Pin 8 is "NC" which stands for "not connected." Pin 7 is the proper V+.

Asside from that, you can't run a 741 from 3.3V.

Its inputs and outputs must all stay a couple of volts away from the power rails. That's more than your supply voltage, so you can't expect the 741 to do anything useful.


I don't think the '741 will work with a supply of 3.3V and GND. Almost of of its parameters are specified at V+=+15V and V-=-15V.

Change the supply voltages on your '741 model or use a different op amp.

  • \$\begingroup\$ I've changed the supply from GND--3.3V to +-15V (pardon me for not reading the datasheet properly) but it still gives me the same output. \$\endgroup\$ Dec 3, 2019 at 17:53

I don't see why you are getting the error from the information provided.

Ignoring the supply voltage, your problem gets translated into a Design Spec as follows;

Input -5 to +5V , Output 0 to 3.3V

DC transfer function

V GAIN = 3.3/10 ... OFFSET = 3.3/2 V = 1.65 Non-inverting.

Can you solve this now?

You main problem is Vcc,Vee on you Op Amp was incorrect. (fixed)

In future either use a Rail-Rail CMOS Op Amp or increase Vcc,Vee to have sufficient voltage range as BJT Op AMPs need an extra +-2V typ. to prevent saturation on in and output.

Gain = R2/(R1+R2) * (1 + R4/R3)
Offset = Vref*R1/(R1+R2) * (1 + R4/R3)

Simulation problem at your end. OK for me,

enter image description here

Use my preferred SIM instead (for real analog parts add ESR, pF, ESL etc.)

  • \$\begingroup\$ I’m not sure I understand this answer. Are you suggesting that I try level shifting using another Op Amp with the design spec that you’ve written? (The design spec is similar to what I was trying to do in the question hence the confusion) \$\endgroup\$ Dec 3, 2019 at 18:14
  • \$\begingroup\$ Yes. My specs should match yours. But you must consider V+,V- or use a rail to rail Op Amp. Do you agree with my specs ? Your solution does not do what you need to do, Revise your question with assumptions on supply avail. and specs as I have done \$\endgroup\$ Dec 3, 2019 at 18:19
  • \$\begingroup\$ Why do you say a CMOS op amp is necessary? I don't see anything that particularly requires it to be CMOS. \$\endgroup\$
    – Hearth
    Dec 3, 2019 at 18:36
  • \$\begingroup\$ @Hearth If you have +/-15V (overkill) then you don't \$\endgroup\$ Dec 3, 2019 at 18:37
  • \$\begingroup\$ @TonyStewartSunnyskyguyEE75 when I supplied +/- 15V to it I managed to get something other than a straight line (edited in the original post) but I assume LM741 is not good enough for this problem. I'll try a better op amp. \$\endgroup\$ Dec 3, 2019 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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