Disclosure of Invention
The invention solves the problem that in the prior art, an air conditioner direct current motor is started by using a fixed PWM duty ratio or is started by increasing the fixed PWM duty ratio every time, when the fixed PWM duty ratio is too large, wind noise is easy to generate, and when the fixed PWM duty ratio is too small, poor starting is easy to exist.
In order to solve the problems, the invention provides a starting control method of a direct current motor, during starting, the maximum voltage (determined by a PWM output level and a hardware circuit, the maximum duty ratio can be determined, and the minimum duty ratio can also be determined) is firstly given, the feedback pulse of the motor is detected from a main control chip, the number of the feedback pulse lasting for T1 time is calculated, the subsequent conducting voltage is automatically calculated according to the number of the feedback pulse in unit time, and then the closed-loop rotating speed control is carried out after the feedback pulse lasts for T2 time, so that the PWM duty ratio automatically adapts to load change during starting, the starting is ensured to be noiseless, and the possible hidden trouble of abnormal starting is solved.
The invention discloses a direct current motor starting control method, which starts an air conditioner and then controls the air conditioner according to the following steps:
step S1: judging whether a motor starting instruction is received, if so, executing the step S2, otherwise, executing the step S6;
step S2: the Vsp port starts the motor at the maximum voltage, and after the motor rotates, a rotating speed feedback pulse is output;
step S3: detecting and recording the number of feedback pulses;
step S4: adjusting the duty ratio timer value X of PWM output according to the number of feedback pulses in a first preset time length T1;
step S5: continuously operating for a second preset time period T2;
step S6: the direct current motor starting control program is ended;
wherein, T1, T2 are the duration of presetting, X is the duty cycle timer value of PWM output, X is read or adjusted by the chip.
This setting can be under the condition of guaranteeing to start successfully, and the automatic initial on-time of confirming according to the load realizes the slow start of DC motor and wind speed, has avoided the bad hidden danger of starting, has also ensured that the air conditioner starts noiselessness, has improved user's use greatly and has experienced
Further, before performing step S2, the following steps are performed:
step S20: judging whether the model is the air conditioner model with the maximum voltage of the Vsp port corresponding to the minimum PWM waveform duty ratio, if so, executing the step S201; otherwise, go to step 202;
step S201: taking the minimum value of X, and then executing step S204;
step S202: taking the maximum value of X, and then executing step S204;
step S204: and starting to output the PWM waveform.
This setting can be to two kinds of models different X values of setting when starting, and then ensures that the Vsp port starts the motor with maximum voltage to the motor starts smoothly, has avoided the bad condition of start to take place.
Further, step S3 specifically includes:
step S31: judging whether the main control chip detects the feedback pulse, if so, executing the step S32, otherwise, returning to execute the step S204;
step S32: starting timing from the detection of the first feedback pulse, and simultaneously recording the number of the feedback pulses;
step S33: and judging whether the first preset time length T1 is reached, if yes, executing the step S4, and if not, returning to execute the step S32.
This setting counts the number of feedback pulses collected over a first predetermined time period T1 in preparation for subsequent X value adjustments.
Further, before any one of the steps S1, S2, S3 and S4 is executed, the following steps are executed:
step S00: reading the values of A1 or A2, B, K;
wherein, A1 is the minimum duty ratio of PWM output in the model with maximum Vsp port voltage when the duty ratio of PWM waveform is minimum; a2 is the maximum duty ratio of PWM output in the model with maximum Vsp port voltage when the PWM waveform duty ratio is maximum; b is a preset threshold value, and K is a preset coefficient.
The value of A1 or A2, B, K is preset in a memory for reading according to different models, and the memory comprises but is not limited to EPROM, EEPROM and the like.
Further, step S4 specifically includes:
step S41: judging whether the voltage is the air conditioner type of the maximum voltage of the Vsp port corresponding to the minimum PWM waveform duty ratio;
step S42: calculating the current X value according to the judgment result of the step S41 and the number of feedback pulses detected within the time T1;
step S43: and comparing the current X value with a preset threshold B, and adjusting the X value according to the comparison result.
Whether the rotating speed of the fan is too fast can be judged by comparing the current X value with a preset threshold value B, if the rotating speed of the fan is too fast, the X value is adjusted so that the rotating speed of the fan is reduced, the condition of overlarge noise is avoided, and the use experience of a user is guaranteed.
Further, when the determination result of step S41 is yes, the calculation formula of the current X value in step S42 is:
X=A1+K*FC;
wherein, FC is the number of feedback pulses recorded in a time period of T1;
step S43 further includes:
step S431: judging whether the current X value is larger than or equal to B, if so, executing a step S432, and if not, executing a step S433;
step S432: adjusting the current X value to meet the requirement that the current X value is B;
step S433: and updating the X value on the timer to be the current X value.
The current air conditioner is an air conditioner type with the minimum PWM waveform duty ratio corresponding to the maximum voltage of a Vsp port, in the starting process of a fan, the current X value is increased along with the increase of the rotating speed of the fan, when the current X value is larger than or equal to B, the rotating speed of the fan is indicated to be too high, wind noise is easily formed, the use experience of a user is influenced, the current X value is set to B, the fan can be operated at the target rotating speed, the wind noise cannot be caused, the use experience of the user is ensured, when the current X value is smaller than B, the current voltage is indicated to be lower, the fan cannot be operated at the target rotating speed, the X value on a timer is updated to be the current X value, the fan can be ensured to be operated at the maximum rotating speed which can be reached under the current voltage condition, and.
Further, when the determination result of step S41 is no, the calculation formula of the current X value in step S42 is:
X=A2-K*FC;
wherein, FC is the number of feedback pulses recorded in a time period of T1;
step S43 further includes:
step S431: judging whether X is less than or equal to B, if so, executing step S432, otherwise, executing step S433;
step S432: adjusting the value of X to satisfy X ═ B;
step S433: and updating the X value on the timer to be the current X value.
The current air conditioner is an air conditioner type with the maximum PWM waveform duty ratio corresponding to the maximum voltage of a Vsp port, in the starting process of a fan, the current X value is reduced along with the increase of the rotating speed of the fan, when the current X value is less than or equal to B, the rotating speed of the fan is over-high, wind noise is easy to form, the use experience of a user is influenced, the current X value is set to B, the fan can operate at the target rotating speed, the wind noise cannot be caused, the use experience of the user is ensured, when the current X value is greater than B, the current voltage is lower, the fan cannot operate at the target rotating speed, the X value on a timer is updated to the current X value, the fan can be ensured to operate at the maximum rotating speed which can be reached under the current voltage condition, and the use requirement of the user is met as much as possible.
The invention also discloses a starting device of the direct current motor, which comprises:
the PWM duty ratio control module is used for outputting and controlling the duty ratio of a PWM waveform;
the pulse output module is used for outputting rotating speed feedback pulses after the motor rotates;
the pulse receiving module is used for receiving and recording the number of the rotating speed feedback pulses;
and the calculation judgment module is used for calculating a current X value, comparing the current X value with a B value and outputting a judgment result to the PWM duty ratio control module to adjust the PWM waveform duty ratio, wherein X is a duty ratio timer value output by PWM and B is a preset threshold value.
Through the cooperation between the modules, when the direct current motor is started, the duty ratio of the PWM waveform is automatically adjusted according to the load, so that the slow start of the direct current motor is realized, the problem of wind noise caused by overlarge rotating speed of a fan when the direct current motor is started is also avoided, and the comfort and satisfaction of a user are greatly improved.
The invention also discloses an air conditioner, which comprises a computer readable storage medium and a processor, wherein the computer readable storage medium is used for storing a computer program, and the computer program is read by the processor and runs to realize the direct current motor starting control method.
Compared with the prior art, the air conditioner and the direct current motor starting control method have the same advantages, and are not described again.
The invention also discloses a computer readable storage medium, which stores a computer program, and when the computer program is read and run by a processor, the method realizes the direct current motor starting control method.
Compared with the prior art, the direct current motor starting control method, the direct current motor starting control device, the air conditioner and the computer readable storage medium have the following advantages:
when the motor is started, the Vsp is output at the maximum voltage to ensure the smooth starting of the motor, meanwhile, a built-in controller of the motor outputs feedback pulses corresponding to the rotating speed after the motor rotates, counting is carried out within preset time T1 after the master controller of the air conditioner receives the feedback pulses, the rotating speed of the motor is calculated according to the pulse counting condition, the PWM duty ratio is adjusted according to the counting condition, then closed-loop control of the rotating speed is achieved, and under the condition that the starting success is ensured, the PWM duty ratio is automatically adjusted according to the load, so that the slow starting of the wind speed is achieved, and the problem that a fan cannot be started smoothly due to overlarge wind noise or undersize duty ratio caused by overlarge duty ratio in the prior art is solved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and embodiments. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. The specific embodiments described herein are merely illustrative of the invention and do not delimit the invention. It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
As shown in fig. 1, when the dc motor is started, a built-in driver outputs a PWM signal, and after being driven by a transistor and optically coupled and isolated, a digital signal (i.e., a PWM waveform) is converted into an analog signal (i.e., a voltage of a Vsp port, which is a speed control port on the motor) through capacitive filtering, a controller built in the fan controls a fan rotation speed by sampling the voltage of the Vsp port, where the fan rotation speed is proportional to the voltage of the Vsp port, it should be understood that if the chip driving force is large enough, the transistor may not be used for driving, and the above description is used to help understanding the contents in the embodiments of the present invention.
The following describes a dc motor start control method, an apparatus, an air conditioner, and a computer-readable storage medium according to embodiments of the present invention with reference to the accompanying drawings.
Example 1
The embodiment provides a method for controlling the starting of a direct current motor, which is used for an air conditioner, and as shown in fig. 2, the air conditioner is started first, and then the following control is performed:
starting the direct current motor by the Vsp port at the maximum voltage, and detecting and recording the number of the rotating speed feedback pulses; and adjusting the duty ratio timer value X output by the PWM according to the number of the rotating speed feedback pulses detected in the preset time length T1, wherein T1 is the preset time length, X is the duty ratio timer value output by the PWM, and the value X is read or adjusted by the chip.
The Vsp port starts the direct current motor at the maximum voltage to ensure smooth starting, then the rotating speed of the fan is judged according to the number of feedback pulses within the preset time, the load of the fan is further determined, the value X of the duty ratio timer output by PWM is adjusted according to the load, namely the output of the duty ratio is adjusted, the dynamic adjustment of the duty ratio is realized, the problem that the duty ratio is too large or too small in the prior art is solved, and the use experience of a user is improved.
Specifically, the method comprises the following steps:
step S1: judging whether a motor starting instruction is received, if so, executing the step S2, otherwise, executing the step S6;
step S2: the Vsp port starts the motor at the maximum voltage, and after the motor rotates, a rotating speed feedback pulse is output;
when the motor is started, the Vsp port starts the motor at the maximum voltage so as to ensure the smooth starting of the motor and avoid the condition of poor starting of the motor.
Step S3: detecting and recording the number of feedback pulses;
the rotating speed of the fan is monitored by detecting the number of the feedback pulses, so that the rotating speed of the fan can be adjusted when the rotating speed of the fan is too high, and the condition that wind noise affects users is avoided.
Step S4: adjusting the duty ratio timer value X of PWM output according to the number of feedback pulses in a first preset time length T1;
the fan rotating speed is monitored through feedback pulse counting, the duty ratio output by PWM is adjusted according to the number of feedback pulses, the voltage of a Vsp port is adjusted, the fan rotating speed is changed, the phenomenon that the noise is too large due to the fact that the fan rotating speed is too fast is avoided, user experience is influenced, and the duty ratio timer value X output by PWM can be read or adjusted through a chip.
Step S5: continuously operating for a second preset time period T2;
the T2 is a preset time threshold, so that the fan can be ensured to stably run for a certain time and then enter the next link, and the stable starting of the direct current motor is ensured.
Step S6: the dc motor start control routine ends.
Through the adjustment, the initial conduction time can be automatically confirmed according to the load under the condition of ensuring the successful starting, the slow starting of the direct current motor and the wind speed is realized, the hidden trouble of poor starting is avoided, the noiseless starting of the air conditioner is also ensured, the use experience of a user is greatly improved, wherein the first preset time T1 and the second preset time T2 are preset time periods, and what needs to be explained is that: after the determination in step S1 is no, step S6 is entered to indicate that the air conditioner does not issue a command to turn on the fan, the fan is not running, and step S5 is entered to S6 to indicate that the dc motor is successfully started, the operation of the dc motor start module is completed, and a stage of closed-loop control of the fan speed is entered.
As is well known, the voltage of the Vsp port is generally controlled by the duty ratio of the PWM waveform, in the prior art, due to the difference between the PWM output level and the hardware circuit, there are two different models in the air conditioner, one is that the Vsp port voltage is maximum when the duty ratio of the PWM waveform is minimum, and the other is that the Vsp port voltage is maximum when the duty ratio of the PWM waveform is maximum, in order to make the control method in the present embodiment meet the control requirements of the two models, before executing step S2, the following steps are executed:
step S20: judging whether the model is the air conditioner model with the maximum voltage of the Vsp port corresponding to the minimum PWM waveform duty ratio, if so, executing the step S201; otherwise, go to step 202;
step S201: taking the minimum value of X, and then executing step S204;
step S202: taking the maximum value of X, and then executing step S204;
step S204: and starting a duty ratio timer of the PWM output to output a PWM waveform.
The step can set different X values for the two types of machines during starting, and further ensures that the Vsp port starts the motor at the maximum voltage, so that the motor is started smoothly, and the condition of poor starting is avoided.
Step S3 specifically includes the following steps:
step S31: judging whether the main control chip detects the feedback pulse, if so, executing the step S32, otherwise, returning to execute the step S204;
step S32: starting timing from the detection of the first feedback pulse, and simultaneously recording the number of the feedback pulses;
step S33: and judging whether the first preset time length T1 is reached, if yes, executing the step S4, and if not, returning to execute the step S32.
Through the setting, the number of the collected feedback pulses in the first preset time period T1 is counted, and preparation is made for subsequent X value adjustment.
In this embodiment, step S4 specifically includes:
step S41: judging whether the voltage is the air conditioner type of the maximum voltage of the Vsp port corresponding to the minimum PWM waveform duty ratio;
step S42: calculating the current X value according to the judgment result of the step S41 and the number of feedback pulses detected within the time T1;
step S43: and comparing the current X value with a preset threshold B, and adjusting the X value according to the comparison result.
The current X value is calculated according to a preset calculation mode, whether the rotating speed of the fan is too fast can be judged by comparing the current X value with a preset threshold value B, if the rotating speed of the fan is too fast, the X value is adjusted to enable the rotating speed of the fan to be reduced, the situation of overlarge noise is avoided, and the use experience of a user is guaranteed.
In the present embodiment, before any one of the steps S1, S2, S3 and S4 is executed, the following steps are executed:
step S00: reading the values of A1 or A2, B, K;
wherein, A1 is the minimum duty ratio of PWM output in the model with maximum Vsp port voltage when the duty ratio of PWM waveform is minimum; a2 is the maximum duty ratio of PWM output in the model with maximum Vsp port voltage when the PWM waveform duty ratio is maximum; b is a preset threshold value, and K is a preset coefficient.
It should be understood that the value of a1 or a2, B, K is preset in a Memory for reading according to the model, and the Memory includes but is not limited to EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), and the like.
Wherein, when the determination result of step S41 is yes, the calculation formula of the current X value in step S42 is:
X=A1+K*FC;
wherein, a1 is the minimum duty cycle of the PWM waveform output; k is a preset coefficient, and FC is the number of feedback pulses recorded in a time period of T1.
In this case, when the determination result of step S41 is yes, step S43 further includes the steps of:
step S431: judging whether the current X value is larger than or equal to B, if so, executing a step S432, and if not, executing a step S433;
step S432: adjusting the current X value to meet the requirement that the current X value is B;
step S433: and updating the X value on the timer to be the current X value.
In the setting, the current air conditioner is an air conditioner type with the minimum PWM waveform duty ratio corresponding to the maximum voltage of a Vsp port, the current X value is increased along with the increase of the rotating speed of the fan in the starting process of the fan, when the current X value is larger than or equal to B, the rotating speed of the fan is too high, wind noise is easy to form, user use experience is influenced, the current X value is set to B, the fan can be operated at the target rotating speed, the wind noise cannot be caused, the user use experience is ensured, when the current X value is smaller than B, the current voltage is lower, the fan cannot be operated at the target rotating speed, the X value on the timer is updated to the current X value, the fan can be ensured to be operated at the maximum rotating speed under the current voltage condition, the use requirement of a user is met as much as possible, and the change of the PWM waveform duty ratio can be caused by the change of the X value, the technical scheme realizes that the PWM duty, the starting is ensured to be noiseless, and the potential hidden trouble of abnormal starting is solved.
When the determination result of step S41 is no, the calculation formula of the current X value in step S42 is:
X=A2-K*FC;
wherein, a2 is the maximum duty cycle of the PWM waveform output; k is a preset coefficient, and FC is the number of feedback pulses recorded in a time period of T1.
In this case, when the determination result of step S41 is no, step S43 further includes the steps of:
step S431: judging whether X is less than or equal to B, if so, executing step S432, otherwise, executing step S433;
step S432: adjusting the value of X to satisfy X ═ B;
step S433: and updating the X value on the timer to be the current X value.
In the setting, the current air conditioner is an air conditioner type with the maximum PWM waveform duty ratio corresponding to the maximum voltage of a Vsp port, the current X value is reduced along with the increase of the rotating speed of the fan in the starting process of the fan, when the current X value is less than or equal to B, the rotating speed of the fan is too high, wind noise is easy to form, user use experience is influenced, the current X value is set to B, the fan can be operated at the target rotating speed, wind noise cannot be caused, user use experience is ensured, when the current X value is greater than B, the current voltage is lower, the fan cannot be operated at the target rotating speed, the X value on a timer is updated to the current X value, the fan can be ensured to be operated at the maximum rotating speed under the current voltage condition, the use requirement of a user is met as much as possible, and the change of the PWM waveform duty ratio can be caused by the change of the X value, so that the technical scheme realizes that the PWM duty ratio automatically adapts to the load change, the starting is ensured to be noiseless, and the potential hidden trouble of abnormal starting is solved.
Example 2
The embodiment discloses a starting device of a direct current motor, which is used for realizing the starting control method of the direct current motor in the embodiment 1.
The DC motor starting device comprises:
the PWM duty ratio control module is used for outputting and controlling the duty ratio of a PWM waveform;
the pulse output module is used for outputting rotating speed feedback pulses after the motor rotates;
the pulse receiving module is used for receiving and recording the number of the rotating speed feedback pulses;
and the calculation judgment module is used for calculating a current X value, comparing the current X value with a B value and outputting a judgment result to the PWM duty ratio control module to adjust the PWM waveform duty ratio, wherein X is a duty ratio timer value output by PWM and B is a preset threshold value.
Through the cooperation between the modules, when the direct current motor is started, the duty ratio of the PWM waveform is automatically adjusted according to the load, so that the slow start of the direct current motor is realized, the problem of wind noise caused by overlarge rotating speed of a fan when the direct current motor is started is also avoided, and the comfort and satisfaction of a user are greatly improved.
Example 3
The embodiment discloses an air conditioner, which comprises the direct current motor starting device in the embodiment 2.
The air conditioner disclosed in the present embodiment includes a computer-readable storage medium storing a computer program and a processor, and when the computer program is read and executed by the processor, the method for controlling the start of the dc motor according to embodiment 1 is implemented.
Compared with the prior art, the air conditioner and the direct current motor starting control method in embodiment 1 have the same advantages, and are not described again here.
Example 4
The embodiment discloses a computer-readable storage medium, which stores a computer program, and when the computer program is read and executed by a processor, the computer program implements the dc motor start control method according to embodiment 1.
Although the present invention is disclosed above, the present invention is not limited thereto. In the description herein, references to the description of the term "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.