To enhance the position detecting capability of a position detecting mechanism which uses a reflection sensor.
A position detection control part 50 feeds a control signal S51 to drive the light emitting diode 11 of a reflection sensor 10 for a certain period at intervals of predetermined periods to perform pulse drive. The pulse drive can increase a current flowing in the light emitting diode 11, resulting in increase in amount of light radiated. The position detection control part 50 feeds reference level setting signals S52a, S52b to turn switches 33, 35 on or off so that the reference level for use as a slicing level at a comparator 20 is set in three steps. By determining the level of an input signal S10 at the three steps of the reference level, the result of position detection which varies little can be obtained.