I'm using PGA specifically AD8253 (
https://www.analog.com/media/en/technical-documentation/data-sheets/ad8253.pdf). It is powered by +/-12V. When I measure voltage near upper rail like in this image and gain is 10x, everything works fine:
R1 has 0.9V on it, PGA gain is 10x, battery ground is not connected anywhere. The PGA output has 0.9 * 10 = 9.0V, as expected.
But when I connect battery ground to analog ground, like this:
Then the output of PGA drops from 9.0V to 3.88V. I get the same behavior (3.88V on output) when I power the resistor divider from +12V rail of PGA (which is what I normally do, I don't use battery, I only used battery to show that 10x gain works). Same behavior on the negative rail. It stops being problem below 7.5V.
Here's actual schematic:
What's causing it and how to solve this problem?