Apparatus, including a rigid gripper configured to fasten around a cylindrical object. The apparatus further includes a pair of conductors attached to the gripper so as to make contact with one another, while the gripper is fastened around the cylindrical object, at a location along a length of the conductors that varies responsively to a diameter of the cylindrical object. The apparatus also includes a sensing circuit configured to measure an impedance of a current passing through the pair of conductors and to generate an indication of the diameter responsively to the impedance.