摘要 |
A motor controller includes a motor, an encoder, and a control circuit. The motor drives a target object to be controlled. The encoder outputs a pulse signal synchronously with rotation of the motor. The control circuit rotates the motor based on a count value of the pulse signal. The control circuit switches to a sleep mode when making sure that a rotation position of the motor is stable after finishing rotating the motor or when a predetermined time necessary for the rotation position of the motor to be stable elapses after finishing rotating the motor. When a change in the pulse signal during a period of time where the control circuit is in the sleep mode is not smaller than a predetermined amount, the control circuit performs a learning process to learn a reference position of the motor when returning to a wakeup mode from the sleep mode. |