A soft magnetic material (12) is located on a surgical instrument (10) for use with a handpiece (20). The soft magnetic material is configured to divert a magnetic field applied to it by the handpiece. The handpiece comprises a magnetic field source (23) positioned to apply a magnetic field to the surgical instrument and a magnetic field sensor (24) to detect the magnetic field and therefore the presence of the soft magnetic material. The presence of the soft magnetic material indicates a property of the surgical instrument. By detecting the magnetic field, the handpiece can thus determine the property of the surgical instrument.