Self-capacitance measurement