摘要 |
PROBLEM TO BE SOLVED: To provide a motor controller capable of detecting a current when a duty ratio of a PWM output signal is 100% or 0%, while not requiring offset of the output of a motor current detection circuit.SOLUTION: A motor current detection circuit 70 of a motor controller 10, includes a shunt resistor 71 connected in series to an H bridge circuit 30, and detects a voltage across the shunt resistor 71. A sample-hold circuit 24 samples and holds output of the motor current detection circuit 70 every half period according to PWM output timing of a switching element driver circuit 23, and outputs the signal as a first signal IM1 and a second signal IM2. A motor current calculation circuit 25 selects a larger value from the first signal IM1 and the second signal IM2, as a selected signal IMS, calculates a value of the selected signal IMS as an absolute value of a motor current, and determines direction of the motor current based on a relationship between the selected signal IMS and a PWM signal at the sample timing of the selected signal IMS acquisition.SELECTED DRAWING: Figure 1 |