Potentiometric displacement transducer