A battery charging apparatus, which is connected between a three-phase AC dynamo and a battery, and comprises: a plurality of input terminals which are respectively connected to output terminals of respective phases of the three-phase AC dynamo; a rectifying circuit which is composed of a plurality of rectifying elements and a plurality of switching elements; switching element control means for controlling turn-on/off of the respective switching elements of the rectifying circuit; and pulse generation means for generating a pulse signal by detecting passage of a reluctor arranged on a rotor of the three-phase AC dynamo, wherein the switching element control means controls the plurality of switching elements to set output voltages to the battery in a full-wave rectification state or an all-phase short-circuited state, and wherein the switching element control means comprises potential difference detection means for detecting potential differences between potentials of at least two input terminals of the plurality of input terminals and a ground potential of the battery, and characterized in that the switching element control means further comprises specifying means for, when the output terminals of the three-phase AC dynamo are arbitrarily connected to the plurality of input terminals, determining a phase order of three-phase AC outputs input to the input terminals based on a pattern of the potential differences detected by the potential difference detection means, and specifying phases of the three-phase AC outputs input to the plurality of input terminals based on a relationship among the phase order, a generation timing of the pulse signal, and the potential differences of the plurality of input terminals. a plurality of input terminals which are respectively connected to output terminals of respective phases of the three-phase AC dynamo; a rectifying circuit which is composed of a plurality of rectifying elements and a plurality of switching elements; switching element control means for controlling turn-on/off of the respective switching elements of the rectifying circuit; and pulse generation means for generating a pulse signal by detecting passage of a reluctor arranged on a rotor of the three-phase AC dynamo, wherein the switching element control means controls the plurality of switching elements to set output voltages to the battery in a full-wave rectification state or an all-phase short-circuited state, and wherein the switching element control means comprises potential difference detection means for detecting potential differences between potentials of at least two input terminals of the plurality of input terminals and a ground potential of the battery, and characterized in that the switching element control means further comprises specifying means for, when the output terminals of the three-phase AC dynamo are arbitrarily connected to the plurality of input terminals, determining a phase order of three-phase AC outputs input to the input terminals based on a pattern of the potential differences detected by the potential difference detection means, and specifying phases of the three-phase AC outputs input to the plurality of input terminals based on a relationship among the phase order, a generation timing of the pulse signal, and the potential differences of the plurality of input terminals. potential difference detection means for detecting potential differences between potentials of at least two input terminals of the plurality of input terminals and a ground potential of the battery, and characterized in that the switching element control means further comprises specifying means for, when the output terminals of the three-phase AC dynamo are arbitrarily connected to the plurality of input terminals, determining a phase order of three-phase AC outputs input to the input terminals based on a pattern of the potential differences detected by the potential difference detection means, and specifying phases of the three-phase AC outputs input to the plurality of input terminals based on a relationship among the phase order, a generation timing of the pulse signal, and the potential differences of the plurality of input terminals.