A photoelectric sensor having a detection range for a detection object set by using a set distance, the photoelectric sensor comprising: a multi-segment photodiode in which a plurality of photodiodes are arranged in an arrangement direction; a plurality of current divider circuits that are respectively connected to the plurality of photodiodes, and each have a current division ratio set in accordance with a difference between a reference voltage and a control voltage; and a current division control circuit adapted to sequentially set the reference voltage for each current divider circuit among the plurality of current divider circuits along said arrangement direction of the photodiodes so that the reference voltage for the current divider circuit is equal to or larger than a voltage value of the reference voltage set for a current divider circuit in an immediately preceding position in the arrangement direction among the plurality of current divider circuits , and to set the control voltage, which is one common control voltage, for all of the plurality of current divider circuits , the common control voltage falling within a range that includes all of the reference voltages, characterized in that the current division control circuit includes a plurality of reference voltage generation resistors that are connected in series between two voltages, a plurality of reference voltage output lines that are used to output voltages divided by the reference voltage generation resistors as the reference voltages, a control voltage generation circuit connected to the reference voltage generation resistors and adapted to generate the control voltage that falls between connected voltages, and a switch group that is used to disconnect one of the reference voltage generation resistors and connect the control voltage generation circuit instead. a multi-segment photodiode in which a plurality of photodiodes are arranged in an arrangement direction; a plurality of current divider circuits that are respectively connected to the plurality of photodiodes, and each have a current division ratio set in accordance with a difference between a reference voltage and a control voltage; and a current division control circuit adapted to sequentially set the reference voltage for each current divider circuit among the plurality of current divider circuits along said arrangement direction of the photodiodes so that the reference voltage for the current divider circuit is equal to or larger than a voltage value of the reference voltage set for a current divider circuit in an immediately preceding position in the arrangement direction among the plurality of current divider circuits , and to set the control voltage, which is one common control voltage, for all of the plurality of current divider circuits , the common control voltage falling within a range that includes all of the reference voltages, characterized in that the current division control circuit includes a plurality of reference voltage generation resistors that are connected in series between two voltages, a plurality of reference voltage output lines that are used to output voltages divided by the reference voltage generation resistors as the reference voltages, a control voltage generation circuit connected to the reference voltage generation resistors and adapted to generate the control voltage that falls between connected voltages, and a switch group that is used to disconnect one of the reference voltage generation resistors and connect the control voltage generation circuit instead. <EOS>