The invention discloses a displacement sensor, which is characterized in that the displacement sensor comprises a shell, a circuit board and a rotating shaft, the shell is provided with a cavity, a
metal terminal is arranged on the shell, one end of the
metal terminal is connected with an external conducting wire, the other end of the
metal terminal extends into the cavity of the shell, and a through hole for penetrating the rotating shaft is arranged on the wall of the shell; a conductor rail is arranged on the circuit board, a
resistor is arranged on the conductor rail, the resistance of the
resistor changes with the length of the
resistor and the conductor rail is connected with the metal terminal; a
brush is arranged on the side surface of the rotating shaft and is electrically connected with the resistor; the circuit board is arranged around the rotating shaft; and the metal terminal, the conductor rail, the resistor and the
brush form a resistance-adjustable conducting circuit. The volume of the displacement sensor is small but the number of lines capable of transmitting signals is large. The displacement sensor is particularly suitable for
hybrid vehicles and the safety and the stability of the output signals can be ensured. Moreover, the invention has the advantages of convenient assembling, environment-friendly process, cost saving and long service life.