Patent ID: 7609012

Claim:
A motor control apparatus comprising: an encoder for producing a pulse output signal in synchronism with rotation of a rotor of a motor that rotates a control object; a controller for rotating the rotor to a target position that is set by a target position setter by detecting a rotation position of the rotor on the basis of a count of the output signal of the encoder and sequentially switching a current supply phase of the motor; and a nonvolatile memory for storing the target position that is set by the target position setter, wherein at starting the controller sets, as a target position of starting, the target position that is stored in the nonvolatile memory; wherein the nonvolatile memory maintains storage of the target position being supplied with power from a battery while the controller is not supplied with power; wherein the controller comprises a detector for detecting removal of the battery, and sets a predetermined target position as the target position of starting when removal of the battery is detected; wherein data of the target position stored in the nonvolatile memory is different from an initial value that is set when power is applied to the nonvolatile memory, and wherein the controller determines whether the battery has been removed on the basis of whether the data of the target position stored in the nonvolatile memory coincides with the initial value.