LM258 Op-Amp Trouble

Hello,

I have an LM258 Dual channel Op-Amp. The Op-Amp supply voltage is 5V and is set up as non-inverting with a gain of 1.5 (Rin = 2kOhm, Rf = 1kOhm). With this gain, I am scaling a 0-3.3V signal to a 0-5V signal.

The Op-Amp scales appropriately till past 2.5V. after 2.5V the output is a constant 3.74V, it will not go to 5V.

Here is an image of the schematic.

EDIT: Just read a LM358 datasheet and noticed it states that the max output is VCC-1.5V. This could be the issue. However, I would like feedback and an alternative solution.

The name rail-to-rail for Op-Amps is a bit misleading because none of them can actually guarantee full rail-to-rail output. Using a more expensive rail-to-rail Op-Amp can get you an output much closer to Vcc but never quite all the way there.

The only option for getting an output of 5V is to have a Vcc that is greater than 5V.

That is indeed the issue.

Paul’s comments above are correct, though assuming that you’d rather deal with not-quite-there than adding another supply rail, something like an MCP6002 would probably be a better option.