Circuitry is configured to, while a sensing electrode within a body is connected to a sampling terminal of an A/D converter, connect three pairs of electrodes, which are coupled to the body, in multiple different configurations, in each of which at least one pair is connected to a signal generator, such that the signal generator applies an alternating voltage between the pair, thus causing an electrode voltage to be attained at the sensing electrode, and at least one other pair is connected to a ground terminal of the converter. A processor is configured to, for each configuration, receive, from the A/D converter, a digital representation of a voltage at the sampling terminal with respect to the ground terminal, identify respective amplitudes of the electrode voltage for the configurations, based on the digital representation of the voltage received for each configuration, and, based thereon, ascertain the location of the sensing electrode.