A sensor device comprising: a main driving gear provided so as to be rotatable together with a rotary shaft as a detection target; a driven gear (53, 54) that includes a gear portion (71, 73) meshed with teeth of the main driving gear and a shaft portion (72, 74) that projects from a side surface of the gear portion (71, 73), the shaft portion (72, 74) being provided with a permanent magnet; a biasing member configured to bias the driven gear (53, 54) toward the main driving gear; a support member that supports the driven gear (53, 54) and the biasing member; and a rotational angle sensor (62, 63) configured to generate an electric signal based on rotation of the driven gear (53, 54), characterized in that the sensor device comprises a magnetic shield (75, 76) that rotatably surrounds the shaft portion (72, 74), wherein: the biasing member biases the driven gear (53, 54) toward the main driving gear by biasing the magnetic shield (75, 76) toward the main driving gear; and a sliding resistance between the magnetic shield (75, 76) and the driven gear (53, 54) is lower than a sliding resistance between the magnetic shield (75, 76) and the biasing member, wherein the coefficient of friction between the magnetic shield (75, 76) and the driven gear (53,54) is smaller than the coefficient of friction between the magnetic shield (75, 76) and the biasing member. a main driving gear provided so as to be rotatable together with a rotary shaft as a detection target; a driven gear (53, 54) that includes a gear portion (71, 73) meshed with teeth of the main driving gear and a shaft portion (72, 74) that projects from a side surface of the gear portion (71, 73), the shaft portion (72, 74) being provided with a permanent magnet; a biasing member configured to bias the driven gear (53, 54) toward the main driving gear; a support member that supports the driven gear (53, 54) and the biasing member; and a rotational angle sensor (62, 63) configured to generate an electric signal based on rotation of the driven gear (53, 54), characterized in that the sensor device comprises a magnetic shield (75, 76) that rotatably surrounds the shaft portion (72, 74), wherein: the biasing member biases the driven gear (53, 54) toward the main driving gear by biasing the magnetic shield (75, 76) toward the main driving gear; and a sliding resistance between the magnetic shield (75, 76) and the driven gear (53, 54) is lower than a sliding resistance between the magnetic shield (75, 76) and the biasing member, wherein the coefficient of friction between the magnetic shield (75, 76) and the driven gear (53,54) is smaller than the coefficient of friction between the magnetic shield (75, 76) and the biasing member. the biasing member biases the driven gear (53, 54) toward the main driving gear by biasing the magnetic shield (75, 76) toward the main driving gear; and a sliding resistance between the magnetic shield (75, 76) and the driven gear (53, 54) is lower than a sliding resistance between the magnetic shield (75, 76) and the biasing member, wherein the coefficient of friction between the magnetic shield (75, 76) and the driven gear (53,54) is smaller than the coefficient of friction between the magnetic shield (75, 76) and the biasing member.