The present invention relates to a motor controller, and more particularly, to a motor controller which is capable of obtaining a plurality of physical parameters in a test mode.
Currently some motor controllers comprise a plurality of sensing elements (e.g., Hall sensor, temperature sensor) for the internal control signals to use. However, the user cannot obtain the physical parameters outputted by the plurality of sensing elements by an external measurement. Conventionally, a pulse width modulation pin can be used to receive a test enabling signal and enter a test mode. Also, the pulse width modulation pin can be used to output a Hall signal. Since the number of pins is related to the package cost, the number of pins should be reduced to save the cost and make the product more competitive. Thus, it has become an important issue to make good use of currently available pins, such that the physical parameters can be obtained by entering the test mode.
Thus, what is needed is the motor controller which is capable of obtaining the physical parameters.
According to the present invention, a motor controller which is capable of obtaining a plurality of physical parameters in a test mode is provided. The motor controller is configured to drive a motor. The motor controller comprises a command pin, a speed signal pin, a selecting circuit, a Hall signal processing unit, a temperature sensor, a transistor, a control unit, and a driving circuit. The selecting circuit is coupled to the speed signal pin. The driving circuit is used for supplying a motor current to the motor. The Hall signal processing unit is configured to generate a Hall signal while the temperature sensor is configured to generate a temperature signal. The control unit comprises a judging unit and the judging unit is configured to determine whether the motor controller is operated in a normal operation mode or a test mode. The judging unit is coupled to the command pin. The judging unit is used for informing the selecting circuit to output a temperature signal via the speed signal pin based on a first test enabling signal. The judging unit is used for informing the selecting circuit to output a Hall signal via the speed signal pin based on a second test enabling signal.
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.
The above-mentioned and other objects, features, and advantages of the present invention will become apparent with reference to the following descriptions and accompanying drawings, wherein:
Preferred embodiments according to the present invention will be described in detail with reference to the drawings.
The temperature sensor 130 comprises a bipolar transistor 131 and a current source CS. The bipolar transistor 131 has an emitter, a base, and a collector. The collector of the bipolar transistor 131 is coupled to the voltage source Vm. The base of the bipolar transistor 131 is coupled to a reference voltage Vb, where the reference voltage Vb has a zero temperature coefficient. The emitter of the bipolar transistor 131 is coupled to the current source CS for generating a temperature signal Vt to the selecting circuit 110, where the temperature signal Vt varies with the temperature by a factor of 25 mV/° C. As shown in
The control unit 150 is coupled to the transistor 140 for generating a speed signal Vs to the selecting circuit 110. The control unit 150 comprises a judging unit 151. The judging unit 151 is configured to determine whether the motor controller 10 is operated in a normal operation mode or a test mode. The judging unit 151 is coupled to the command pin CMD, so as to generate an N-bit digital signal SEL to the selecting circuit 110 and a pulse width modulation signal Vp to the driving circuit 160, where N is equal to 2. The driving circuit 160 is used for supplying a motor current to the motor, where the driving circuit 160 may have an H-bridge circuit.
When the command pin CMD receives a normal pulse width modulation signal, the judging unit 151 may set the digital signal SEL to 00, so as to inform the selecting circuit 110 to couple the speed signal Vs with the speed signal pin SO. At this moment the motor controller 10 is operated in the normal operation mode. The judging unit 151 is configured to couple the pulse width modulation signal Vp with the command pin CMD for controlling the motor to rotate. When the command pin CMD receives a first test enabling signal, the judging unit 151 may set the digital signal SEL to 01, so as to inform the selecting circuit 110 to couple the temperature signal Vt with the speed signal pin SO. At this moment the motor controller 10 is operated in the test mode. When the command pin CMD receives a second test enabling signal, the judging unit 151 may set the digital signal SEL to 10, so as to inform the selecting circuit 110 to couple the Hall signal Vh with the speed signal pin SO. At this moment the motor controller 10 is also operated in the test mode.
More specifically, there are many ways of generating the first test enabling signal and the second test enabling signal to enter the test mode. According to one embodiment of the present invention, the first test enabling signal may be a high-frequency signal with a first frequency and the second test enabling signal may be a high-frequency signal with a second frequency. The first frequency is greater than a first pre-determined frequency and the first frequency is less than a second pre-determined frequency. The second frequency is greater than a third pre-determined frequency and the second frequency is less than a fourth pre-determined frequency. The first pre-determined frequency is less than the second pre-determined frequency. The third pre-determined frequency is less than the fourth pre-determined frequency. The second pre-determined frequency is less than the third pre-determined frequency.
According to one embodiment of the present invention, the motor controller 10 can be applied to a single-phase or polyphase configuration. The motor controller 10 is configured to drive a motor. The motor controller comprises the command pin CMD, the speed signal pin SO, the selecting circuit 110, the Hall signal processing unit 120, the temperature sensor 130, the transistor 140, the control unit 150, and the driving circuit 160. The driving circuit is used for supplying a motor current to the motor. The control unit 150 comprises the judging unit 151 and the judging unit 151 is configured to determine whether the motor controller is operated in the normal operation mode or the test mode. The judging unit is coupled to the command pin. The judging unit is configured to obtain a plurality of physical parameters based on the first test enabling signal and the second test enabling signal. The selecting circuit 110 is coupled to the speed signal pin SO, where the selecting circuit 110 is used for outputting the Hall signal Vh and the temperature signal Vt. The Hall signal Vh and the temperature signal Vt are related to a plurality of physical parameters. The present invention has the advantage that a plurality of physical parameters can be obtained in the test mode without additional pins.
While the present invention has been described by the preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiment. On the contrary, it is intended to cover various modifications. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.