Tiny RTC - Battery Monitor pin - power drain

I'm using one of these http://www.hobbyist.co.nz/?q=real_time_clock

When I attach the Battery Pin to an analog pin on an Uno, I can read the voltage of the battery. That's kind of cool.

The problem is, if you remove the power from the Uno, it seems like power drains from the RTC module to the Arduino, causing a significant voltage drop on the RTC device and thus 'loosing' it's time setting. (Voltage drops below 1v on the RTC device where it is normally closer to 3.3v)

I've reverted my project back to not monitoring the Battery Level, but it seems like there must be a way to do this: Allow monitoring of the battery level if and only if the Arduino has power. On power outage, prevent the battery from draining through the analog pin.

My first thoughts were to put a transistor between the pins such that the transistor was 'on' only when Arduino is powered and otherwise off.

Any other thoughts on how to handle this?

A comprehensive answer requires some small details. Typically the minimum details include a schematic and a link to the specific part's data sheet. Since you have elected not to follow the instructions posted at the top of this section your answers will contain references to this data. As a one time guess I would suggest that the clock board Vcc is missing a series diode (typically a schottky type) that would prevent backflow from the clock battery to system Vcc. Typically the clock boards are 3V3 devices and it would appear that you are powering it from the 5V bus since there is no indication of how you are utilizing the device

I've bought a few of those tiny RTC thingies, and they all seem to have a really flimsy battery holders. One won't hold on to the battery properly, making it lose the time when the battery pops out. In another one doesn't make proper contact, meaning the battery lasts even longer than usual, but the board doesn't keep time, and yet another one had a small lip on the sidecontact bend all the way down, shorting out the battery. So, first check the board and see if anything is shorting out in the battery holder or thereabouts. If that doesn't help, put a high value (10k to 50k perhaps) resistor between the battery pin and the analog input. It may lower the readings if the value is too high, so you may want to experiment with the exact values that work in your case.

Pieter