Sensor for flow meter