Patent attributes
A proximity sensor includes a transmission circuit that periodically supplies an excitation current in a pulse form to a detection coil for generating a magnetic field, a reception circuit that detects voltages or currents generated at both ends of the detection coil by the periodic supply of the excitation current, and a controller that detects presence or a position of the detection body by utilizing a time series signal obtained by the detection. The controller acquires a factor that influences the detection of the detection body in a first period of the time series signal. The controller compensates a signal in a second period of the time series signal by the factor. The controller detects the presence or the position of the detection body on the basis of a signal after the compensation.