Electronic – Rail-to-rail op-amp only reaches 90% of VCC, works sometimes, not everytime

amplifieroperational-amplifier

I have created a simple data acquisition module for measuring 5V signals. There are 18 analog inputs on this board, all of which are a copy of the schematic below.

Each input has an op-amp (MCP604) with unity gain. This op-amp should work to within 60mV of VCC, but in half of my circuits, it won't get any higher than 4.3V. (Notice the 100K pull-up to 5V, the input pin disconnected, should output very close to 5V.) In the other half, the circuits operate just fine. I have two of these boards built, and most (not all) of those circuits are limited to 4.3V. Under 4.3V, the circuit will behave in a linear fashion.

It doesn't appear to be a glitch at power-up, the circuits that work always work, the circuits that don't always don't.

I've cut the trace at the output of the amplifier to see if the A/D converter was clamping it somehow. No effect.

I've tried adding load to the output, with different values of R50, 10K to infinity. No noticeable effect, maybe a couple of millivolts.

Probably an unnecessary detail, but for the sake of completeness…
I need to get the zero input of the signal within the linear range of the amplifier, so I boost it slightly with the 20K/100K voltage divider. This lifts a 0V signal to 0.833V. The device connected to this circuit may provide an input voltage of slightly less than 0V (sometimes a low as -0.5V).

Example Schematic

Best Answer

You are exceeding the amplifiers input common-mode range.

It has rail-to-rail output but not rail-to-rail input. The allowable input range is -0.3V to +3.8V when fed from a 5V supply. When configured as a unity gain amplifier the output range will be limited by what's acceptable at the input.

Other posters have commented that the data sheet explicitly comments on the issue. (Datasheet)

If you exceed the CM input range the output can do almost anything but modern opamps are usually well-behaved. It looks like this one just clamps the output voltage.

Input common mode range

You can't use it as a unity gain amplifier in this application.

If you made the gain about 1.5 or more it would work as the input would never get above the 3.8V limit before the output hit the power rail. Or find a pin-compatible amplifier with a wider range of input.

Since you have sensibly included the option of additional components on your PCB you could correct the problem without changing the PCB.

You can configure R53 and R54 to provide the 1.5 gain (e.g R53=10k, R54=4.7k)

Also you could add resistors R51 and R52 to attenuate the input by the same factor so the overall system works as designed.

All of the above unfortunately doesn't explain why some of your boards work all the way to the supply rail.