A method, consisting of inserting a probe having a force sensor into a body cavity of a patient, and receiving from the force sensor a plurality of measurements, each of the measurements indicative of a force applied to the force sensor. The method further includes detecting that the measurements received over a period of time of at least a specified duration have not varied by more than a predefined amount, and setting a baseline of the force sensor, for use in further measurements, to a value based on the measurements received during the period.