摘要 |
PROBLEM TO BE SOLVED: To suitably control a motor current to a target value while constituting a device at low cost.SOLUTION: A motor controller 100 comprises an H bridge circuit 20, and control means of driving a switching element of the H bridge circuit 20 with a PWM signal and setting a charge mode, high-speed attenuation mode, or low-speed attenuation mode for a motor coil. The control means switches the H bridge circuit 20 to the charge mode at the start of a PWM period, and switches the H bridge 20 to the high-speed attenuation mode and stores a charge mode time once a motor current exceeds a reference current value. The H bridge circuit 20 is switched to the low-speed attenuation mode after an attenuation mode switching time passes. Then a charge mode time of a PWM period in a current descent period is compared with a charge mode time of a PWM period of the same number in the last descent period, and an attenuation mode switching time of a PWM period right before the next descent period is updated.SELECTED DRAWING: Figure 1 |