A power tool comprising: a motor; an impact mechanism (67; 300) coupled to the motor, the impact mechanism including a hammer (75; 375) driven by the motor and an anvil (70; 370) positioned at a nose of the power tool, and configured to receive an impact from the hammer; an impact case housing the anvil and the hammer; a sensor assembly (130; 305; 405; 500; 600; 640; 660 700; 800) positioned in the impact case, the sensor assembly includes an output position sensor (130; 305; 405; 700; 800) configured to generate an output signal indicative of one selected from a group consisting of a position of the hammer and a position of the anvil; and an electronic processor coupled to the output position sensor and to the motor, the electronic processor configured to: control the motor based on the output signal from the output position sensor; characterized in that the output position sensor includes an inductive sensor (305a, 305b, 305c; 405a, 405b, 405c, 405d); and in that: (i) the anvil includes an engagement structure (85; 385) to engage with the hammer, and wherein the inductive sensor detects a rotational position of the engagement structure; or (ii) the inductive sensor is an elongated sensor including a plurality of unevenly distributed inductive coils, such that a first end of the inductive sensor includes more densely arranged inductive coils than a second, opposite end. a motor; an impact mechanism (67; 300) coupled to the motor, the impact mechanism including a hammer (75; 375) driven by the motor and an anvil (70; 370) positioned at a nose of the power tool, and configured to receive an impact from the hammer; a hammer (75; 375) driven by the motor and an anvil (70; 370) positioned at a nose of the power tool, and configured to receive an impact from the hammer; an impact case housing the anvil and the hammer; a sensor assembly (130; 305; 405; 500; 600; 640; 660 700; 800) positioned in the impact case, the sensor assembly includes an output position sensor (130; 305; 405; 700; 800) configured to generate an output signal indicative of one selected from a group consisting of a position of the hammer and a position of the anvil; and an electronic processor coupled to the output position sensor and to the motor, the electronic processor configured to: control the motor based on the output signal from the output position sensor; characterized in that the output position sensor includes an inductive sensor (305a, 305b, 305c; 405a, 405b, 405c, 405d); and in that: (i) the anvil includes an engagement structure (85; 385) to engage with the hammer, and wherein the inductive sensor detects a rotational position of the engagement structure; or (ii) the inductive sensor is an elongated sensor including a plurality of unevenly distributed inductive coils, such that a first end of the inductive sensor includes more densely arranged inductive coils than a second, opposite end. control the motor based on the output signal from the output position sensor; characterized in that the output position sensor includes an inductive sensor (305a, 305b, 305c; 405a, 405b, 405c, 405d); and in that: (i) the anvil includes an engagement structure (85; 385) to engage with the hammer, and wherein the inductive sensor detects a rotational position of the engagement structure; or (ii) the inductive sensor is an elongated sensor including a plurality of unevenly distributed inductive coils, such that a first end of the inductive sensor includes more densely arranged inductive coils than a second, opposite end. (i) the anvil includes an engagement structure (85; 385) to engage with the hammer, and wherein the inductive sensor detects a rotational position of the engagement structure; or (ii) the inductive sensor is an elongated sensor including a plurality of unevenly distributed inductive coils, such that a first end of the inductive sensor includes more densely arranged inductive coils than a second, opposite end.