An optical potentiometer includes a metal pipe (114) having one end closed, a metal pipe (112) that has a relationship of a nested structure with respect to the metal pipe (114) and guides the metal pipe (114) movably in a longitudinal direction, a light source (122) and an optical fiber (118) which supply light into the metal pipe (114), and an optical power meter (124) that detects a change in the amount of reflected light from inside the metal pipe (114). The metal pipe (114) has a slit (132) along the longitudinal direction. The optical power meter (124) detects a change in the amount of reflected light from inside the metal pipe (114) caused by a change in the opening amount of the slit (132) caused in accordance with the movement of the metal pipe (114) in the longitudinal direction.