First post here from a hobbyist electronics guy so please bear with me. I'm happy to do whatever I can to improve my question for the community.
For a bit of a backstory, I have a project that requires an RTC for a Raspberry Pi. I need the RTC to be thin, at least thinner than most modules you can buy, and I want to be able to read the voltage of the battery so I can get a warning if the voltage gets low before it fails. So, I designed a board using the DS3231M for timekeeping and an ADC with a voltage follower to read the voltage without affecting the battery current draw much. The Op Amp is an LMC7101BIM5/NOPB and the ADC is an ADC081C027CIMK (see URLs below).
Here is the schematic, board layout, and zip'd eagle folder for reference: Eagle Files
When the board is attached to the Pi it works great; I can read the clock and can read the voltage from the battery through the ADC/voltage follower. But when I disconnect it with the battery in, the OSF gets tripped. I used this basic design for another RTC (without the battery voltage reading) so I'm sure the battery is connected fine. I used my multimeter and it turns out that while the battery reads ~2.8V when the Pi is on the voltage is <2.4V when power is removed.
My thinking is that it has to do with the Op Amp. I cut the trace connecting the battery to the voltage-reading circuit and the voltage went back to ~2.8V so my thinking is that it's a problem with the Op Amp implementation. I assume that it has to do with me operating under the assumption of an ideal Op Amp. I thought maybe the battery was attempting to power the circuit through the Op Amp, drawing too much current, and dropping the voltage. So I solder-bridged the trace I cut earlier, cut the trace to the Op Amp supply, and soldered in a diode (I don't care about the voltage drop as long as I can still "see" a voltage drop to give a low-voltage warning). This helped a little, but the voltage is barely >2.4V and the current is only somewhere around 1 mA.
Any help is appreciated, even if it's just about my schematic/board layout.
Also, it would kind of suck to switch designs at this point, but i think there may be battery ICs that handle this kind of thing. Would it be worth it to switch to something like that?
I can't post more than two links, so I'll post the component URLs as comments.