I am designing an op-amp circuit to map the voltage of a 12V lead acid battery to a voltage level suitable for an ATMEGA ADC. The useful range of battery voltage is ~10V to ~16V. I'm using a TI LM4040 4.096V shunt reference to power the circuit and to provide the voltage reference for the ADC.
I am terrible at working out op-amp circuits, so I modeled the whole thing in LTSpice and dicked around with the dividers to find a set of E12 resistors that work. The circuit looks like this. The spice model does exactly what I want and all is well.
When I built the circuit with a Microchip MCP602 it just didn't work. The output voltage wouldn't come close to the supply rail. Excuse the signal quality of my ramp generator, but this what I see. At vBat ~= 13.5 the vADC peaks at ~2.2V
After flailing around quite a bit, I decided to try a different amp. I switched to an ST TS922 and now it works exactly as the spice model says it should. My ramp generator only goes from 10V to 15V, but the vADC goes to 3.9V and does reach basically to the + rail at a shade over 16V.
I'd prefer to use the MCP602 amp since its current requirement is lower. I want this battery sense amplifier can be run using a digital output of the MCU directly to power it. The TS922 version of the circuit needs ~3mA on the shunt regulator to avoid dropping out, which might be a little much for my GPIO to source.
Does anyone have any insight why the MCP602 won't work in this circuit but the TS922 will?