BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a motor controller, and more particularly, to a motor controller which is capable of automatically detecting whether there exists a Hall sensor or not, so as to select a sensorless driving mode or a Hall control driving mode.

2. Description of the Prior Art

Conventionally, there are two driving methods for driving a motor. The first driving method uses the Hall sensor for switching phases, so as to drive the motor. The second driving method does not use the Hall sensor to drive the motor.FIG. 1is a circuit diagram showing a conventional motor controller10. The motor controller10comprises a driving circuit100, a selection circuit110, a sensorless control circuit120, and a Hall signal control circuit130. The driving circuit100generates an output signal OUT to drive a motor M. The selection circuit110is configured to determine to use the sensorless control circuit120or the Hall signal control circuit130to drive the motor M based on a mode selection signal MODE. However, the prior-art method needs to add an additional pin and thus it is inconvenient to use.

SUMMARY OF THE INVENTION

According to one embodiment of the present invention, a motor controller is capable of automatically detecting whether there exists a Hall sensor or not, so as to select a sensorless driving mode or a Hall control driving mode. The motor controller does not need to add an addition pin and thus the cost of the motor controller can be reduced. The motor controller is used for driving a motor. The motor controller comprises a driving circuit, a selection circuit, a sensorless control circuit, a Hall signal control circuit, a detection circuit, a first input terminal, and a second input terminal. The driving circuit generates an output signal for driving the motor. The sensorless control circuit receives the output signal, so as to sense the phase of the output signal and generate a sensorless control signal to the selection circuit for switching phases. The first input terminal is coupled to the Hall signal control circuit and the detection circuit. The second input terminal is coupled to the Hall signal control circuit and the detection circuit. Furthermore, the Hall signal control circuit may be coupled to a Hall sensor via the first input terminal and the second input terminal. Also, the detection circuit may be coupled to the Hall sensor via the first input terminal and the second input terminal. The Hall sensor may be used for sensing the variation of the magnetic field when the motor rotates, so as to generate a first Hall signal and a second Hall signal for switching phases. The Hall signal control circuit may receive the first Hall signal and the second Hall signal via the first input terminal and the second input terminal, so as to generate a Hall control signal to the selection circuit. The detection circuit generates a selection signal to the selection circuit by detecting the voltage of the first input terminal and the voltage of the second input terminal. The selection circuit generates a driving signal to the driving circuit based on the selection signal, so as to determine whether the motor controller is operated in the sensorless driving mode or the Hall control driving mode.

The motor controller can be applied to a single-phase or polyphase configuration. When the Hall sensor is not coupled to the motor controller, the motor controller is operated in the sensorless driving mode. When the Hall sensor is coupled to the motor controller via the first input terminal and the second input terminal, the motor controller is operated in the Hall control driving mode.

These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.

