Fan head shaking control method and device, electronic equipment and storage medium
By detecting the beat signal during the unidirectional rotation of the stepper motor and using the parameter difference of the voltage waveform signal to determine whether the stepper motor is stalled, the problems of misjudgment and high cost of stepper motor limit position detection in the existing technology are solved, and higher detection accuracy and cost-effectiveness are achieved.
Patent Information
- Application Number
- CN202410408455.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-07
- Publication Date
- 2025-10-14
AI Technical Summary
In the existing fan swing control method, the stepper motor is prone to misjudgment when detecting the limit position, and there are problems with high material and installation costs.
By detecting the beat signal in the unidirectional rotation of the stepper motor, the parameter difference of the voltage waveform signal is used to determine whether the stepper motor is blocked. The steering parameter of the stepper motor is used as an influencing factor to determine the preset beat and improve the detection accuracy.
This effectively improves the accuracy of stepper motor stall detection and reduces the cost of additional mechanical structures.
Smart Images

Figure CN120777221A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of motor control, in particular to a fan head shaking control method and device, electronic equipment and storage medium. BACKGROUND
[0002] The current fan basically has the function of shaking head, and some fans use stepping motor to realize it. There are many methods for detecting the limit position of fan head shaking. A common way is to use a reed switch with a magnet to achieve it. This scheme has a rotation dead zone and cannot achieve 180° rotation in the left and right directions. In addition, additional wires, magnets and other materials need to be added during assembly, which increases the material cost and installation cost. Another way is to use the voltage change of the motor beat when rotating to the limit to judge the limit position. This detection method has better judgment and experience, but it is easy to misjudge. SUMMARY
[0003] Problems to be solved by the application
[0004] In view of the problem that misjudgment is prone to occur in the process of detecting motor stall, a fan head shaking control method, device, electronic equipment and storage medium are provided.
[0005] Solution to the problem
[0006] The first aspect of the present application provides a fan head shaking control method, applied to a control terminal for controlling the turning switching of a fan at a limit position, the method comprising:
[0007] The control terminal is configured to obtain a start signal, a rotation instruction and a head shaking instruction;
[0008] The rotation instruction is independent of the start signal or integrated with the start signal. Similarly, the head shaking instruction is independent of the start signal or integrated with the start signal.
[0009] The rotation instruction is woken up, so that a first driving source drives the fan blades to rotate;
[0010] The head shaking instruction is woken up, so that a second driving source drives the fan to shake; wherein the second driving source comprises a stepping motor;
[0011] Detect the beat signal in the one-way rotation of the stepping motor, the beat signal has one driving period for one rotation of the stepping motor, and in one driving period, the beat signal comprises voltage waveform signals output by a plurality of beats of the stepping motor, and the parameter values of a plurality of the voltage waveform signals form a set;
[0012] According to the beat signal in a driving cycle, a first parameter value and a second parameter value of each voltage waveform signal output in the set are determined; wherein the second parameter value is greater than the first parameter value;
[0013] The parameter difference value of the first parameter value and the second parameter value of each voltage waveform signal is determined;
[0014] At least one preset beat located in the set is selected according to a first influence factor; the first influence factor includes a turning parameter of the stepper motor;
[0015] In a driving cycle, whether the stepper motor is stalled is determined according to the comparison result of the parameter difference value corresponding to the preset beat and the parameter difference value corresponding to the remaining beats in the set.
[0016] Optionally, the beat signal in the unidirectional rotation of the stepper motor includes:
[0017] All beat signals in the unidirectional rotation of the stepper motor are detected in real time;
[0018] Alternatively, part of the beat signals in the unidirectional rotation of the stepper motor in a driving cycle that can cover the limit position of the fan head rotation are detected in real time.
[0019] Optionally, the voltage waveform signal in the beat signal is converted into a current signal monitored by the control terminal in real time, the first parameter value and the second parameter value are both current analog-to-digital (AD) values in the current signal, and the parameter difference value is the difference between the AD value converted from the second parameter value and the AD value converted from the first parameter value.
[0020] Optionally, the first parameter value is the minimum current value corresponding to the beat in a driving cycle; and / or, the second parameter value is the maximum current value corresponding to the beat in a driving cycle.
[0021] Optionally, the beat in a driving cycle is an even beat.
[0022] Optionally, a second influence factor of the beat signal of the stepper motor in a driving cycle in the set is filtered out; the second influence factor includes the voltage waveform signal output by an odd beat of the stepper motor;
[0023] The voltage waveform signal output by an even beat of the stepper motor in a driving cycle in the set is selected, and the difference between the AD value converted from the second parameter value and the AD value converted from the first parameter value corresponding to each beat is output respectively;
[0024] determining a preset beat in the even beats according to the turning parameter of the stepper motor, and determining a lower limit beat corresponding to a minimum difference according to a ratio of a parameter difference of the preset beat to parameter differences of the rest of the even beats;
[0025] determining that the stepper motor generates a stall in response to the lower limit beat not being the preset beat.
[0026] Optionally, the method further comprises:
[0027] determining a rotation direction of the stepper motor;
[0028] The determining that the stepper motor generates a stall in response to the lower limit beat not being the preset beat comprises:
[0029] determining that the stepper motor generates a stall in response to the rotation direction of the stepper motor being forward rotation and the lower limit beat not being a first preset beat;
[0030] determining that the stepper motor generates a stall in response to the rotation direction of the stepper motor being reverse rotation opposite to the forward rotation and the lower limit beat not being a second preset beat.
[0031] Optionally, the motor is a four-phase eight-beat motor, and the eighth beat of the stepper motor is defined as the preset beat when the motor is in forward rotation, and the second beat of the stepper motor is defined as the preset beat when the motor is in reverse rotation; and the stepper motor is switched from forward rotation to reverse rotation when the fan reaches an extreme position in normal operation.
[0032] Optionally, the determining that the stepper motor generates a stall in response to the lower limit beat not being the preset beat comprises:
[0033] determining whether the lower limit beat in each of a plurality of drive cycles within a preset time range is a corresponding preset beat, and recording a number of error frequencies;
[0034] determining that the stepper motor generates a stall in response to a sum of the number of error frequencies being greater than or equal to a preset threshold.
[0035] Optionally, the determining whether the stepper motor generates a stall according to the parameter difference comprises:
[0036] determining a maximum parameter difference corresponding to the even beats within a same drive cycle in response to the lower limit beat being the preset beat; the parameter difference being a difference between the AD value converted from the second parameter value and the AD value converted from the first parameter value of each of the even beats after filtering out the preset beat;
[0037] determining a relationship between the maximum parameter difference and a difference threshold value;
[0038] determining that the stepper motor generates a stall in response to the maximum parameter difference being greater than or equal to the difference threshold value.
[0039] Optionally, the determining that the stepper motor generates a stall in response to the maximum parameter difference being greater than or equal to the difference threshold value comprises:
[0040] determining a frequency of the maximum parameter difference being greater than or equal to the difference threshold value in each driving cycle in a preset time range;
[0041] determining that the stepper motor generates a stall in response to a total number of the frequency being greater than or equal to a number threshold value.
[0042] A second aspect embodiment of the present disclosure provides a control device for a fan swing head, the device comprising:
[0043] a detection module configured to detect a beat signal of unidirectional rotation of a stepper motor, the beat signal having one driving cycle for one rotation of the stepper motor, and the beat signal comprising voltage waveform signals output by multiple beats of the stepper motor in one driving cycle, and parameter values of the multiple voltage waveform signals forming a set;
[0044] a first determination module connected to the detection module to obtain the multiple voltage waveform signals in the set in real time and determine first parameter values and second parameter values output by each voltage waveform signal in the set, wherein the second parameter values are greater than the first parameter values;
[0045] a second determination module connected to the first determination module and configured to determine parameter differences between the first parameter values and the second parameter values of each voltage waveform signal;
[0046] a third determination module connected to the second determination module and configured to select at least one preset beat in the set according to a first influence factor, and determine whether the stepper motor generates a stall according to a comparison result of the parameter differences corresponding to the preset beat and the parameter differences corresponding to the remaining beats in one driving cycle, wherein the first influence factor comprises a rotation direction parameter of the stepper motor.
[0047] Optionally, the detection module comprises:
[0048] a driving module electrically connected to the motor;
[0049] A voltage dividing resistor, one end of which is electrically connected to the sampling module, and the other end of which is electrically connected to the driving module;
[0050] A sampling resistor, one end of which is connected in parallel to the other end of the voltage dividing resistor and is located between the voltage dividing resistor and the driving module, and the other end of which is grounded;
[0051] A sampling module, which is connected to the sampling resistor to obtain the beat signal in the unidirectional rotation of the stepper motor.
[0052] Optionally, the sampling module is an analog-to-digital conversion (ADC) module, which is configured to convert the voltage waveform signal output by the sampling resistor into a current signal, and then output the digital current AD value corresponding to each beat signal through analog-to-digital conversion.
[0053] The third aspect of the present disclosure provides an electronic device applied to a fan, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the control method of the fan head shaking when executing the computer program.
[0054] The fourth aspect of the present disclosure provides a computer readable storage medium applied to a fan, the computer readable storage medium storing a computer program, and the computer program implementing the control method of the fan head shaking when executed by a processor.
[0055] Effects of the application
[0056] In the control method of the fan head shaking, one driving cycle corresponds to one unidirectional rotation of the stepper motor, and the voltage waveform signals output by multiple beats in one driving cycle fluctuate to different degrees. The parameter difference between the first parameter value and the second parameter value corresponding to the voltage waveform signal can effectively determine whether the stepper motor is blocked, and the larger the parameter difference, the more effectively the accuracy of the detection of the stepper motor blocking can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0057] Figure 1a One of the flowcharts of the control method of the fan head shaking in some optional embodiments of the present disclosure;
[0058] Figure 1b The second flowchart of the control method in some optional embodiments of the present disclosure;
[0059] Figure 2 In some optional embodiments of the present disclosure, the voltage waveform of the stepper motor at different beats when rotating forward;
[0060] Figure 3For some optional embodiments of the present disclosure, when the step motor is reversed, the voltage waveform of the step motor at different beats is inverted;
[0061] Figure 4 For some optional embodiments of the present disclosure, when the step motor is reversed, the voltage waveform of the step motor at different beats is inverted;
[0062] Figure 5 For some optional embodiments of the present disclosure, the flowchart of the control method of the fan head is shown in Figure 2;
[0063] Figure 6 For some optional embodiments of the present disclosure, when the step motor is reversed, the voltage waveform of the step motor at different beats is inverted;
[0064] Figure 7 For some optional embodiments of the present disclosure, the flowchart of the control method of the fan head is shown in Figure 2;
[0065] Figure 8 For some optional embodiments of the present disclosure, the flowchart of the control method of the fan head is shown in Figure 2;
[0066] Figure 9 For some optional embodiments of the present disclosure, the flowchart of the control method of the fan head is shown in Figure 2;
[0067] Figure 10 For some optional embodiments of the present disclosure, the flowchart of the control method of the fan head is shown in Figure 2. DETAILED DESCRIPTION
[0068] In order to make the technical solutions and beneficial effects of the embodiments of the present disclosure more obvious and easy to understand, the following will be described in detail by enumerating specific embodiments. The drawings are not necessarily drawn to scale, and local features can be enlarged or reduced to more clearly show the details of local features; unless otherwise defined, the technical and scientific terms used herein have the same meaning as the technical and scientific terms in the technical field to which the present application belongs.
[0069] In the description of the embodiments of the present disclosure, the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "height", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of the simplified description of the embodiments of the present disclosure, and do not indicate that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, that is, cannot be understood as a limitation on the embodiments of the present disclosure.
[0070] In the embodiments of the present disclosure, the terms "first", "second" are only used for the purpose of description and cannot be understood as the relative importance of the indicated features or the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly include at least one of the features. In the description of the embodiments of the present disclosure, the meaning of "multiple" is at least two, such as two, three, etc.; the meaning of "several" is at least one, such as one, two, three, etc.; except for the explicit specific limitation.
[0071] In the embodiments of the present disclosure, unless otherwise explicitly limited, the terms "mounting", "connecting", "connecting", "fixing", "setting" and the like should be broadly understood. For example, "connecting" can be fixed connection, or detachable connection, or integral; can be mechanical connection, or electrical connection; can be directly connected, or indirectly connected through intermediate medium, or the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the embodiments of the present disclosure can be understood according to the specific circumstances.
[0072] In the embodiments of the present disclosure, unless otherwise explicitly limited, the first feature "on", "over", "above" and "on", "below", "under", "below" or "below" the second feature can be that the first feature and the second feature are in direct contact, or the first feature and the second feature are in indirect contact through an intermediate medium. Moreover, the first feature "over", "above" and "above" the second feature can be that the first feature is directly above or obliquely above the second feature, or only indicates that the horizontal height of the first feature is higher than the horizontal height of the second feature. The first feature "under", "below" and "below" the second feature can be that the first feature is directly below or obliquely below the second feature, or only indicates that the horizontal height of the first feature is less than the horizontal height of the second feature.
[0073] Using the voltage change of the motor beat, the detection method of the soft control judgment limit position, because of its detection voltage cumulative value or average value and other voltage data, the corresponding control module output voltage of the motor itself is low, usually in 3-3.5V, the difference between the voltage data of the motor in normal operation and the voltage data after the occurrence of the block is small relative to the threshold voltage, which cannot be effectively judged for block, and further misjudgment risk is prone to occur.
[0074] In order to further improve the effective detection and control of motor block, the embodiments of the present disclosure provide the following technical solutions.
[0075] As Figure 1a shown, the control method of the fan swing head provided by the embodiments of the present disclosure is applied to the control terminal for controlling the turning switching of the fan at the limit position, and includes the following steps:
[0076] S110, detecting a beat signal in one-way rotation of the stepper motor, the beat signal having one rotation of the stepper motor as one driving period, and the beat signal including voltage waveform signals respectively output by multiple beats of the stepper motor in one driving period, and parameter values of the multiple voltage waveform signals forming a set;
[0077] S120, determining a first parameter value and a second parameter value of each voltage waveform signal in the set according to the beat signal in one driving period; the second parameter value is greater than the first parameter value;
[0078] S130, determining a parameter difference between the first parameter value and the second parameter value of each voltage waveform signal;
[0079] S140, selecting at least one preset beat in the set according to a first influence factor; the first influence factor includes a turning parameter of the stepper motor;
[0080] S150, determining whether the stepper motor is stalled according to a comparison result of a parameter difference corresponding to the preset beat and parameter differences corresponding to the remaining beats in the set in one driving period.
[0081] Non-limitingly, the beat and the voltage waveform signal are in one-to-one correspondence, i.e., one beat outputs one voltage waveform signal.
[0082] The stepper motor is a driving source for driving the fan to swing.
[0083] Non-limitingly, two driving sources can be used to drive the rotation and the swinging of the fan, respectively.
[0084] The control terminal is configured to acquire a start-up signal, a rotation instruction and a swinging instruction. The control terminal can receive the start-up signal, the rotation instruction or the swinging instruction through wireless communication or wired communication.
[0085] As shown in FIG. 1, before step S110, the control method can further include steps S100 and S101: Figure 1b
[0086] S100, the control terminal receives the start-up signal to perform a power-on action;
[0087] S101, the control terminal receives the rotation instruction, the rotation instruction is woken up, and the first driving source drives the fan blades to rotate; or, the control terminal receives the swinging instruction, the swinging instruction is woken up, and the second driving source drives the fan to swing; the second driving source includes the stepper motor.
[0088] It is also worth noting that the rotation instruction is independent of the power-on signal or integrated with the power-on signal; similarly, the shaking instruction is independent of the power-on signal or integrated with the power-on signal, and the above steps S100 and S101 are independent of the power-on signal. It is also worth noting that the power-on signal can be independently operated, that is, only step S100 is executed, only the power supply of the circuit board and other elements is provided, and step S101 is not executed.
[0089] When integrated with the power-on signal, that is, the power-on is the rotation and the power-on is the shaking, it can be adaptively adjusted according to the needs.
[0090] Without limitation, the control terminal of the embodiment of the present disclosure can be a controller installed on the fan or independent of the fan, a mobile phone or a wearable device, etc.
[0091] The one-way rotation of the stepping motor drives the one-way rotation of the fan to shake. Without limitation, the rotation angle of the fan at the two limit positions is 180°. If not blocked, the fan will immediately reverse the shaking when rotating to the first limit position or the second limit position, and will feed back a reverse cycle start signal, that is, generate a turning parameter. If blocked, the fan will be stuck.
[0092] For an N-phase P-tap stepping motor, there are P taps in one driving cycle, where N and P are positive integers greater than 0. For example, for a four-phase eight-tap stepping motor, there are eight taps in one driving cycle, which are 1, 2, 3, 4, 5, 6, 7, and 8. When the stepping motor rotates forward, the tap sequence of the motor is: 1->2->3->4->5->6->7->8->1……, where 1->2->3->4->5->6->7->8 is the eight taps in one driving cycle. When the stepping motor reverses, the tap sequence of the stepping motor is: 1->8->7->6->5->4->3->2->1……, where 8->7->6->5->4->3->2->1 is the eight taps in one driving cycle, and the direction of the reverse rotation is opposite to that of the forward rotation. Unless otherwise specified, the stepping motor of the embodiment of the present disclosure refers to a four-phase eight-tap motor.
[0093] Reference Figure 2 and Figure 3 , Figure 2 and Figure 3 are voltage waveform signals of the stepping motor when the stepping motor is not blocked, where the abscissa is time t and the ordinate is voltage V. Figure 2 represents the voltage waveform signal of multiple taps of one driving cycle of the stepping motor rotating forward, Figure 3 represents the voltage waveform signal of multiple taps of one driving cycle of the stepping motor reversing. When the stepping motor is not blocked, the voltage waveform signal of the tap changes regularly. Taking Figure 2 and Figure 3For example, the regularity includes but is not limited to: the voltage change amplitude of even beats is greater than that of odd beats, the voltage change amplitude of a beat in even beats is the smallest, and the even beat can be used as a preset beat. The above-mentioned regularity can be reflected by the preset beat and characterized by the parameter difference, so that the parameter difference between the first parameter value and the second parameter value corresponding to the voltage waveform signal can be used to effectively determine whether the stepping motor is blocked. Moreover, the larger the parameter difference is, the more effectively the accuracy of the stepping motor blocking detection can be improved.
[0094] Exemplarily, taking a four-phase eight-beat stepping motor as an example, the preset beat can be beat 2 or beat 8, and the first influence factor of the preset beat can be determined by the turning parameter of the stepping motor, i.e., when the stepping motor is turned forward, beat 8 is the preset beat; when the stepping motor is turned backward, beat 2 is the preset beat. In normal operation, the stepping motor is switched from forward to backward at the limit position of the fan swing.
[0095] As shown in Figure 2 and Figure 3 , the beat signal fluctuates in the timing corresponding to each beat, and the first parameter value and the second parameter value can be two parameter values at different times in the timing corresponding to the same beat.
[0096] According to some optional embodiments, detecting the beat signal in the one-way rotation of the stepping motor includes: detecting all beat signals in the one-way rotation of the stepping motor in real time; or, detecting beat signals in a driving period capable of covering the limit position of the fan swing in the one-way rotation of the stepping motor in real time. Compared with detecting all beat signals, detecting part of the beat signals in real time processes less data, which is beneficial to saving computing resources.
[0097] When part of the beat signals are detected in real time, part of the beat signals with a larger change amplitude can be selected, and the first guarantee is that the part of the beat signals is in a driving period. In this way, a larger parameter difference can be obtained.
[0098] Exemplarily, as shown in Figure 2 and Figure 3 , the change amplitude of the beat signal corresponding to the even beat is larger than that of the odd beat, so in step S11, the multiple beats in a driving period can be even beats, and to avoid the influence of the odd beat, the signal of the odd beat can be filtered.
[0099] The first parameter value and the second parameter value can be two parameter values in a beat, so as to further increase the parameter difference.
[0100] In some optional embodiments, the first parameter value is: the minimum current value of a beat in a driving period; and / or, the second parameter value is: the maximum current value of the same beat in a driving period.
[0101] If the first parameter is the minimum current value corresponding to a beat, and the second parameter is the maximum current value corresponding to the same beat, then the parameter difference can also be called the extreme difference value. The greater the gap between the maximum and minimum current values within a beat, the larger the parameter difference is. Compared with a circuit board that only measures voltage values and has lower voltage values, the detection values of the parameters in this application reflect larger fluctuations and are easier to intuitively obtain information on whether the stepper motor is stalled, thereby effectively improving the accuracy of stepper motor stall detection.
[0102] In some optional embodiments, the beat signal includes a current signal, and the voltage waveform signal in the beat signal is converted into a current signal monitored by the control terminal in real time. The first parameter value and the second parameter value are both current analog-to-digital AD values, that is, the first parameter value and the second parameter value are both analog-to-digital AD values in the current signal. The parameter difference is the difference between the AD value converted from the second parameter value and the AD value converted from the first parameter value. The above-mentioned method of converting analog quantities into digital quantities is based on the fact that the fluctuation of digital quantities is greater than that of analog quantities, so it is easier to intuitively obtain the fluctuation of data, thereby effectively improving the accuracy of stepper motor stall detection.
[0103] The fan shaking control method of the embodiment of the present disclosure does not require an additional mechanical structure and has lower costs.
[0104] like Figure 5 As shown, according to some optional embodiments, step S150 further includes:
[0105] S151, filtering out the second influencing factor of the beat signal of the stepping motor in one driving cycle in the set; the second influencing factor includes the voltage waveform signal output by the odd beats of the stepping motor;
[0106] S152, selecting the voltage waveform signals outputted by the remaining even beats in one driving cycle of the stepping motor in the set, and outputting the difference between the AD value converted from the second parameter value and the AD value converted from the first parameter value corresponding to each beat;
[0107] S153, determining a preset beat in the even beats by using the steering parameters of the stepping motor, and determining a lower limit beat corresponding to the minimum difference based on the ratio of the parameter difference of the preset beat to the parameter differences of the remaining even beats;
[0108] S154: In response to the lower limit beat not being the preset beat, determining that the stepper motor is stalled. It is understandable that in response to the lower limit beat being the preset beat, determining that the stepper motor is not stalled.
[0109] Taking a four-phase eight-beat stepper motor as an example, within one driving cycle, the beats in the set include: beat 2 (also called the second beat, and the following beats can be replaced by the same name), beat 4, beat 6 and beat 8.
[0110] Figure 4 Table 1 shows, by way of example, the extreme difference data corresponding to the even-numbered beats in a four-phase eight-step stepper motor when the stepper motor is rotating forward, the stepper motor is not locked, and the motor is locked. Figure 4 The horizontal axis is time, and the vertical axis is the AD range difference of the current. "Normal" in Table 1 means that the stepper motor is not blocked. Figure 4 In the figure, area A on the left side of the dividing line indicates that when there is no stall, the even-numbered beats correspond to the extreme value data; area B on the left side of the dividing line indicates that when there is stall, the even-numbered beats correspond to the extreme value data. The vertical line between area A and area B indicates the dividing line between the two.
[0111] Beat / Current Beat 2 Beat 4 Beat 6 Beat 8 Normal 1 145 160 138 87 Normal 2 144 137 133 99 Normal 3 145 149 147 95 Locked 1 68 148 121 228 Locked 2 68 156 116 224 Locked 3 80 161 133 226
[0112] Table 1, the extreme value data corresponding to the even beat when the stepper motor rotates forward, the stepper motor is not locked, and the stepper motor is locked
[0113] Depend on Figure 4 As can be seen from Table 1, when the stepper motor is not stalled, the range of beat 8 among all even-numbered beats is the smallest. When the stepper motor is stalled, the range of beat 8 among all even-numbered beats is the largest. Furthermore, the range of beat 8 varies significantly before and after the stepper motor is stalled. Therefore, when the stepper motor is rotating forward, using beat 8 as the preset beat can improve the accuracy of stall judgment.
[0114] When the stepper motor reverses and the stepper motor is not stalled or is stalled, the current AD value of beat 2 changes greatly. Therefore, when the stepper motor reverses, using beat 2 as the preset beat can improve the accuracy of stall judgment.
[0115] For example, when the stepper motor rotates forward, the preset threshold value can be set to 120, 130 or 150, etc.
[0116] In some optional embodiments, step S154 includes:
[0117] The preset time range includes multiple driving cycles, judging whether the lower limit beat in each driving cycle is the corresponding preset beat, and recording the error frequency;
[0118] In response to the sum of the error frequency times being greater than or equal to a preset threshold, it is determined that the stepping motor is stalled.
[0119] According to some optional embodiments, the method further includes:
[0120] determining a rotation direction of the stepper motor;
[0121] in response to the lower limit beat not being the preset beat, determining that the stepper motor generates a stall, comprising:
[0122] in response to the rotation direction being a forward rotation, and the lower limit beat not being the first preset beat, determining that the stepper motor generates a stall;
[0123] in response to the rotation direction being a reverse rotation opposite to the forward rotation, and the lower limit beat not being the second preset beat, determining that the stepper motor generates a stall.
[0124] The preset beat is different when the stepper motor rotates forward or reversely. When the stepper motor rotates forward, the preset beat is the first preset beat, and when the stepper motor reverses, the preset beat is the second preset beat. Taking a four-phase eight-step motor as an example, the corresponding first preset beat is the eighth beat when the motor rotates forward, and the corresponding second preset beat is the second beat when the motor reverses.
[0125] If the lower limit beat of a certain driving period is not the preset beat, it can be preliminarily determined that there is a possibility of stall, and it is recorded as a number of error frequencies. If the lower limit beat is not the preset beat in the next multiple driving periods, the number of error frequencies is increased by 1 each time the lower limit beat is not the preset beat. If the number of error frequencies is greater than or equal to a preset threshold, it is finally determined that the stepper motor stalls. This case is conducive to reducing misjudgment and improving the accuracy of detecting stall.
[0126] The preset threshold can be 2 times, 3 times, 4 times, or 5 times, and is not limited thereto. In general, if the lower limit beat is not the preset beat, it is determined that the stepper motor stalls.
[0127] The number of multiple error frequencies can come from continuous multiple driving periods or non-continuous multiple driving periods. In this case, the number of error frequencies can not be continuous. For example, there are 5 driving periods in a preset time, the preset threshold is 3, the lower limit beat of the first driving period is not the preset beat, and it is recorded as a number of error frequencies. The lower limit beat of the second driving period is not the preset beat, and it is recorded as the number of error frequencies + 1. At this time, the number of error frequencies is 2. The lower limit beat of the fifth driving period is not the preset beat, and it is recorded as the number of error frequencies + 1. At this time, the number of error frequencies is 3. The number of error frequencies is equal to 3, and it is determined that the stepper motor stalls. This mainly reflects the possibility of misjudgment in the form of error frequency accumulation, which can effectively avoid the misjudgment.
[0128] According to some optional embodiments, determining whether the stepper motor generates a stall according to a parameter difference value, comprising:
[0129] In response to the lower limit beat being the preset beat, a maximum parameter difference corresponding to a plurality of even beats in a same driving cycle is determined; the parameter difference is a difference between an AD value converted from a second parameter value corresponding to each even beat after the preset beat is filtered out and a first parameter value;
[0130] A relationship between the maximum parameter difference and a difference threshold value is determined.
[0131] In response to the maximum parameter difference being greater than or equal to the difference threshold value, it is determined that the stepper motor is stalled.
[0132] In some optional embodiments, according to the parameter difference, it is determined whether the stepper motor is stalled, including: in response to the maximum parameter difference being less than the difference threshold value, it is determined that the stepper motor is not stalled.
[0133] If the lower limit beat is the preset beat, the parameter differences corresponding to a plurality of beats in a driving cycle are compared again, and if the maximum parameter difference is greater than or equal to the difference threshold value, it is still determined that the stepper motor is stalled, as shown in FIG. 8, the stepper motor is stalled in the forward direction, but the parameter difference corresponding to beat 8 is still the smallest. This way can reduce the missed detection of stall and improve the detection accuracy in the case where the lower limit beat is the preset beat but the stall still occurs. Figure 6
[0134] The difference threshold value can be preset and stored in the memory of the control terminal.
[0135] In some optional embodiments, in response to the maximum parameter difference being greater than or equal to the difference threshold value, it is determined that the stepper motor is stalled, including:
[0136] In a preset time range including a plurality of driving cycles, a frequency of a ratio of the maximum parameter difference being greater than the difference threshold value in each driving cycle is determined.
[0137] In response to a total number of times of the ratio frequency being greater than or equal to a number threshold value, it is determined that the stepper motor is stalled.
[0138] In some optional embodiments, in response to the maximum parameter difference being greater than or equal to the difference threshold value, it is determined that the stepper motor is stalled, including: in response to the number of the ratio frequency being less than the number threshold value, it is determined that the stepper motor is not stalled.
[0139] If the lower limit beat of a certain drive cycle is the preset beat, but the maximum parameter difference of multiple beats in a drive cycle is greater than or equal to the difference threshold, it can be preliminarily determined that there is a possibility of stalling, and this is used as a ratio frequency count. If the lower limit beat is still the preset beat in the next multiple drive cycles, and the maximum parameter difference of multiple beats in a drive cycle is greater than or equal to the difference threshold, the ratio frequency count is increased by 1 each time this situation occurs. If the ratio frequency count is greater than or equal to the count threshold, it is finally determined that the stepper motor is stalled. This situation helps to reduce misjudgments and improve the accuracy of stall detection.
[0140] Optionally, the number threshold may be equal to a preset threshold, but is not limited thereto.
[0141] The sum of the ratio frequency times may be a sum determined based on a plurality of continuous or discontinuous driving cycles.
[0142] like Figure 7 As shown, in one example, the motor is a four-phase eight-beat stepper motor, and the circuit corresponding to the control method includes Figure 8 The circuit structure shown utilizes a grounded sampling resistor R6 and an ADC (Analog-to-Digital Converter) module to sample the continuous current AD value of the stepper motor. The control method includes the following steps:
[0143] S10, determining the difference threshold RL and the number threshold N, and recording the stall record Count = 0 (the difference threshold RL is determined to record the error frequency, and the number threshold N is determined to record the ratio frequency);
[0144] S20: Sample the AD value of the continuous current of the stepper motor through the sampling resistor R6, and record the maximum current value and the minimum current value of each even beat;
[0145] The forward rotation beat sequence of a stepper motor is 1->2->3->4->5->6->7->8->1, with emphasis on beat 8 (i.e., the beat before the first beat of the next drive cycle). The reverse rotation beat sequence is 1->8->7->6->5->4->3->2->1, with emphasis on beat 2 (i.e., the beat before the first beat of the next drive cycle).
[0146] When sampling, the sampling data of even beats (beat 2, beat 4, beat 6, beat 8) are recorded, and the maximum current data (Max2, Max4, Max6, Max8) and the minimum current data (Min2, Min4, Min6, Min8) corresponding to each beat are collected by using a data conversion module (i.e., an ADC module) connected to the interface of the ADC module, wherein Max2 represents the maximum current value corresponding to beat 2, Max4 represents the maximum current value corresponding to beat 4, and so on. Min2 represents the minimum current value corresponding to beat 2, Min4 represents the minimum current value corresponding to beat 4, and so on.
[0147] The range values of the even beat currents are calculated to form a set.
[0148] S30, according to the data in the set, the corresponding range values (the difference between the maximum value and the minimum value) are calculated, which are denoted as R2, R4, R6, and R8. For example, R2 = Max2-Min2. The calculation methods of R4, R6, and R8 are the same.
[0149] S40: Determine whether the motor is rotating forward or backward, and preliminarily judge the state of the stepper motor through the comparison between the range values of the even beat currents and the corresponding relationship between the preset beats.
[0150] The comparison between the range values of the even beat currents includes: selecting the smallest range value from the set, and comparing it with the preset beat corresponding to the stepper motor to preliminarily judge the state of the stepper motor.
[0151] Step S50, if the motor is rotating forward: compare the range values of the even beat currents in the multiple beats in one driving period, if the comparison result shows that the range value of beat 8 (the preset beat in the forward rotation state) is the smallest, it is preliminarily determined that the stepper motor is not blocked, otherwise, if the comparison result shows that the range value of beat 8 is not the smallest, record a blocked record, and return to step S20 for re-detection.
[0152] As shown in Table 1, when rotating forward: R2, R4, and R6 are approximately equal, but are obviously greater than R8; Min(R2, R4, R6, R8) = R8. Figure 2 As shown in Table 1, when rotating forward: R2, R4, and R6 are approximately equal, but are obviously greater than R8; Min(R2, R4, R6, R8) = R8.
[0153] Figure 3 As shown in Table 1, when rotating forward: R2, R4, and R6 are approximately equal, but are obviously greater than R8; Min(R2, R4, R6, R8) = R8.
[0154] Step S60, if the stepper motor reverses: the minimum value of the difference between the even beats of the current in a driving cycle is compared, if the comparison result shows that the difference of beat 2 (preset beat in reverse state) is the minimum, it is preliminarily determined that the stepper motor is not blocked; otherwise, if the comparison result shows that the difference of beat 2 is not the minimum, a blocked record is recorded once, and the detection is returned to step S20.
[0155] S70: if the beat corresponding to the minimum value of the difference between the even beats of the current is the preset beat, the difference between the even beats of the current is compared with the difference threshold value RL, and the state of the stepper motor is judged according to the comparison result.
[0156] S80, if the maximum value of the difference between the even beats of the current in a driving cycle is less than the difference threshold value RL, it is finally determined that the stepper motor is not blocked, and the blocked record Count is recorded as 0.
[0157] S90: if the maximum value of the difference between the even beats of the current in a driving cycle is greater than or equal to the difference threshold value, a blocked record Count is recorded, and the detection is returned to step S20.
[0158] S91, if the maximum value of the difference between the even beats of the current in a driving cycle is greater than or equal to the threshold value N (3 times), it is determined that the stepper motor is blocked. If the maximum value of the difference between the even beats of the current in a beat is less than the threshold value, the detection is returned to step S20. It is worth noting that usually when the number reaches 3 times, in order to avoid the fan damage caused by the long blocking time, the protection module of the control terminal will send a direct steering switching signal to the stepper motor, so that the fan steering is switched.
[0159] The stepper motor will have an extreme phenomenon: when the blocking occurs, the minimum value of the difference does not change, at this time although the blocking occurs, but still satisfies Min (R2, R4, R6, R8) = R8, at this time the blocking can be judged by judging Max (R2, R4, R6, R8) >= RL, which can further improve the accuracy of detection.
[0160] Example: the initial position of the fan is A1, the limit position of left rotation is A2, the theoretical input pulse signal is M, the pulse signal required for rotating from A1 to A2 is N, M>N;
[0161] Start the fan, and the fan rotates left from A1 position to A2 position;
[0162] When reaching A2 position, the mechanical structure restricts the fan to continue left rotation, and the pulse signal of the soft control part still gives the instruction of the fan to continue left rotation, at this time the fan appears the blocking condition and is recorded;
[0163] If the pulse signal exists, the stall times are proportional to the beat amount and will be recorded multiple times;
[0164] Long stall will cause damage to the stepper motor (for example, the current value increases rapidly and exceeds the allowed range, generating a large amount of heat);
[0165] At the same time, it can avoid false detection, and the stall times will be recorded 3 times according to the needs;
[0166] After the recording times reach the preset value (3 times), the protection module will intervene and control the fan to rotate to the right;
[0167] At this time, it is worth noting that the limit position is marked as the reference position, and the stepper motor can drive the fan to rotate from the reference position to the center position of the fan through angle calculation, and then rotate regularly at the input swing angle.
[0168] As shown in Figure 9 The control device 200 of the fan swing head provided by the embodiment of the disclosure comprises:
[0169] A detection module 210 is configured to detect a beat signal of one-way rotation of a stepper motor, wherein the beat signal has one driving period for one rotation of the stepper motor, and the beat signal comprises voltage waveform signals output by multiple beats of the stepper motor in one driving period, and parameter values of the multiple voltage waveform signals form a set;
[0170] A first determination module 220 is connected with the detection module 210, configured to acquire the multiple voltage waveform signals in the set in real time, and determine first parameter values and second parameter values output by each voltage waveform signal in the set, wherein the second parameter value is greater than the first parameter value;
[0171] A second determination module 230 is connected with the first determination module 220, configured to determine parameter difference values of the first parameter values and the second parameter values of each voltage waveform signal;
[0172] A third determination module 240 is connected with the second determination module 230, configured to select at least one preset beat located in the set according to a first influence factor, wherein the first influence factor comprises a steering parameter of the stepper motor, and determine whether the stepper motor stalls according to a comparison result of the parameter difference values of the preset beat and the parameter difference values of the remaining beats in the set in one driving period.
[0173] According to some optional embodiments, the beat signal comprises a current signal, and the first parameter value and the second parameter value are both analog-to-digital (AD) values.
[0174] According to some optional embodiments, the first parameter value is a minimum current value of the beat in one driving cycle; and / or, the second parameter value is a maximum current value of the beat in one driving cycle.
[0175] According to some optional embodiments, the multiple beats in one driving cycle are even beats.
[0176] According to some optional embodiments, the detection module 210 is further configured to detect all beat signals in one-way rotation of the stepper motor in real time; or, detect beat signals in a driving cycle of the stepper motor in one-way rotation which can cover the limit position of the fan head.
[0177] According to some optional embodiments, the third determination module 240 is further configured to:
[0178] filtering out a second influence factor of the beat signals in one driving cycle of the stepper motor in the set; the second influence factor includes the voltage waveform signals of odd beat outputs of the stepper motor;
[0179] selecting the voltage waveform signals of even beat outputs of the stepper motor in one driving cycle in the set, and outputting the difference between the AD value converted from the second parameter value and the AD value converted from the first parameter value of each beat respectively;
[0180] determining a preset beat in the even beats through the steering parameter of the stepper motor, and determining a lower limit beat corresponding to a minimum difference value according to a ratio of the parameter difference of the preset beat to the parameter difference of the remaining even beats;
[0181] in response to the lower limit beat not being the preset beat, determining that the motor generates a stall;
[0182] According to some optional embodiments, the apparatus further comprises:
[0183] a fourth determination module configured to determine a rotation direction of the stepper motor;
[0184] the third determination module 240 is further configured to:
[0185] in response to the rotation direction of the stepper motor being forward rotation and the lower limit beat not being the first preset beat, determining that the stepper motor generates a stall;
[0186] in response to the rotation direction of the stepper motor being reverse rotation opposite to the forward rotation and the lower limit beat not being the second preset beat, determining that the stepper motor generates a stall.
[0187] According to some optional embodiments, the motor is a four-phase eight-tap motor, when rotating forward, the eighth tap of the stepper motor is defined as the preset tap; when rotating reversely, the second tap of the stepper motor is defined as the preset tap; in normal operation, the stepper motor is switched from rotating forward to rotating reversely at the limit position of the fan swing.
[0188] According to some optional embodiments, the third determining module 240 is further configured to:
[0189] In the preset time range, a plurality of the driving periods are included, it is judged whether the lower limit tap in each of the driving periods is the corresponding preset tap, and the error frequency number is recorded;
[0190] In response to the sum of the error frequency numbers being greater than or equal to a preset threshold value, it is determined that the stepper motor generates a locked-rotor.
[0191] According to some optional embodiments, the third determining module 240 is further configured to:
[0192] In response to the lower limit tap being the preset tap, the maximum parameter difference corresponding to the even taps in the same driving period is determined; the parameter difference is the difference between the AD value converted from the second parameter value of each of the even taps after filtering out the preset tap and the AD value converted from the first parameter value.
[0193] The relationship between the maximum parameter difference and a difference threshold value is determined.
[0194] In response to the maximum parameter difference being greater than or equal to the difference threshold value, it is determined that the stepper motor generates a locked-rotor.
[0195] According to some optional embodiments, the third determining module 240 is further configured to:
[0196] In the preset time range, a plurality of the driving periods are included, the ratio frequency number of the maximum parameter difference being greater than the difference threshold value in each of the driving periods is determined.
[0197] In response to the sum of the ratio frequency numbers being greater than or equal to a frequency threshold value, it is determined that the stepper motor generates a locked-rotor.
[0198] According to some optional embodiments, as shown in Figure 8 The detection module 210 includes:
[0199] The driving module 212 is electrically connected to the stepper motor 100.
[0200] The voltage dividing resistor R5 has one end electrically connected to the sampling module and the other end electrically connected to the driving module 212.
[0201] a sampling resistor R6, one end of which is connected in parallel to the other end of the voltage divider resistor R5 and is located between the voltage divider resistor R5 and the driving module 212, and the other end of the sampling resistor R6 is grounded;
[0202] The sampling module 211 is connected to the sampling resistor R6 for signal acquisition to obtain the beat signal of the unidirectional rotation of the stepping motor.
[0203] When the motor 100 is powered on, each phase passes through the driving module 212 and is then connected to the sampling resistor R6 and then grounded. When the motor 100 is working, the current of each beat will flow through the sampling resistor R6, thereby sampling the beat signal of the motor 100.
[0204] Optionally, the sampling module 211 is an analog-to-digital conversion ADC module, which is used to convert the voltage waveform signal output by the sampling resistor into a current signal, and then output the current AD value of the digital quantity corresponding to each beat signal through analog-to-digital conversion.
[0205] For example, the resistance value of the sampling resistor R6 is 39Ω, and the reference voltage corresponding to the sampling resistor R6 is 3.3V;
[0206] For example: The voltage corresponding to beat 2 in a normal beat is:
[0207] The voltage corresponding to beat 8 in a normal beat is:
[0208] like Figure 10 As shown, the first determination module, the second determination module and the third determination module of the embodiment of the present disclosure may all be part of the judgment module 250 .
[0209] The control device also includes: a protection module 260: the protection module 260 is electrically connected to the judgment module 250. When the motor's stall record reaches a threshold number, the stepper motor is commutated to reduce the possibility of motor damage; the control device also includes: a control module 270: the control module 270 is electrically connected to the sampling module 211, the judgment module 250 and the protection module 260. The control module 270 outputs the stall result determined by the judgment module 250.
[0210] An embodiment of the present disclosure further provides an electronic device applied to a fan, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned fan shaking control method when executing the computer program.
[0211] The present disclosure also provides a computer readable storage medium applied to a fan, the computer readable storage medium storing a computer program, and the computer program is executed by a processor to implement the fan head shaking control method.
[0212] In the case of no conflict, the different embodiments or different technical features in the present disclosure can be combined arbitrarily to form new embodiments.
[0213] It should be understood that the above embodiments are exemplary and are not intended to include all possible implementations of the claims. Various modifications and changes can also be made on the basis of the above embodiments without departing from the scope of the present disclosure. Similarly, the technical features of the above embodiments can also be combined arbitrarily to form additional embodiments of the present disclosure which can not be explicitly described. Therefore, the above embodiments only express several implementations of the present disclosure, and do not limit the protection scope of the patent of the present disclosure.
Claims
1. A method for controlling fan shaking, characterized in that: A control terminal for controlling the direction switching of a fan at an extreme position, the method comprising: The control terminal is used to obtain power-on signals, rotation instructions and head shaking instructions; The rotation instruction is independent of the power-on signal or integrated with the power-on signal; similarly, the head shaking instruction is independent of the power-on signal or integrated with the power-on signal; The rotation instruction is awakened, so that the first driving source drives the fan blades to rotate; The shaking instruction is awakened, so that the second driving source drives the fan to shake; wherein the second driving source includes a stepping motor; Detecting a beat signal during unidirectional rotation of the stepper motor, wherein the beat signal has one driving cycle defined as one rotation of the stepper motor. Within one driving cycle, the beat signal includes voltage waveform signals outputted by a plurality of beats of the stepper motor, wherein parameter values of the plurality of voltage waveform signals form a set; Determining a first parameter value and a second parameter value of each of the voltage waveform signals output in the set according to the beat signal in one driving cycle; wherein the second parameter value is greater than the first parameter value; determining a parameter difference between the first parameter value and the second parameter value of each of the voltage waveform signals; selecting at least one preset beat in the set according to a first influencing factor; wherein the first influencing factor includes a steering parameter of the stepping motor; In one driving cycle, whether the stepping motor is stalled is determined based on a comparison result of the parameter difference corresponding to the preset beat and the parameter difference corresponding to the rest of the beats in the set.
2. The control method according to claim 1, characterized in that: The method for detecting the beat signal during the unidirectional rotation of the stepping motor comprises: Real-time detection of all beat signals during the unidirectional rotation of the stepping motor; Alternatively, the beat signal of the driving cycle of the stepping motor which is capable of partially covering the fan's swing limit position during the unidirectional rotation is detected in real time. Preferably, the voltage waveform signal in the beat signal is converted into a current signal monitored by the control terminal in real time, the first parameter value and the second parameter value are both current analog-to-digital AD values in the current signal, and the parameter difference is the difference between the AD value converted from the second parameter value and the AD value converted from the first parameter value.
3. The control method according to claim 1 or 2, characterized in that: The first parameter value is: a minimum current value corresponding to the beat within one driving cycle; and / or the second parameter value is: a maximum current value corresponding to the beat within one driving cycle. Preferably, the beat in one driving cycle is an even-numbered beat.
4. The control method according to claim 1, wherein: The determining whether the stepping motor is stalled according to a comparison result of the parameter difference corresponding to the preset beat and the parameter difference corresponding to the rest of the beats in the set includes: Filtering out a second influencing factor of the beat signal within one driving cycle of the stepping motor in the set; the second influencing factor includes the voltage waveform signal output by the odd beats of the stepping motor; Selecting the voltage waveform signals outputted by the remaining even beats in one driving cycle of the stepping motor in the set, and outputting the difference between the AD value converted from the second parameter value and the AD value converted from the first parameter value corresponding to each beat respectively; Determining a preset beat in the even beats by using the steering parameter of the stepping motor, and determining a lower limit beat corresponding to a minimum difference according to a ratio of a parameter difference of the preset beat to a parameter difference of the remaining even beats; In response to the lower limit beat not being a preset beat, it is determined that the stepping motor is stalled.
5. The control method according to claim 4, characterized in that: The method further comprises: determining a rotation direction of the stepper motor; In response to the lower limit beat not being a preset beat, determining that the stepping motor is stalled includes: In response to the stepping motor rotating in a forward direction and the lower limit beat being not the first preset beat, determining that the stepping motor is stalled; In response to the stepping motor rotating in a reverse direction opposite to the forward rotation and the lower limit beat being not the second preset beat, it is determined that the stepping motor is stalled. Preferably, the stepping motor adopts a four-phase eight-beat system. During forward rotation, the eighth beat of the stepping motor is defined as the preset beat; During reverse rotation, the second beat of the stepping motor is defined as the preset beat; During normal operation, the stepper motor switches from forward rotation to reverse rotation when the fan is shaken to the extreme position.
6. The control method according to claim 4, characterized in that: In response to the lower limit beat not being a preset beat, determining that the stepping motor is stalled includes: A preset time range includes a plurality of driving cycles, determining whether the lower limit beat in each driving cycle is the corresponding preset beat, and recording the error frequency; In response to the sum of the error frequency times being greater than or equal to a preset threshold, it is determined that the stepping motor is stalled. Preferably, determining whether the stepper motor is stalled based on the parameter difference includes: In response to the lower limit beat being the preset beat, determining the maximum parameter difference value corresponding to the even beats belonging to the same driving cycle; the parameter difference value is the difference between the AD value converted from the second parameter value and the AD value converted from the first parameter value corresponding to each even beat after filtering out the preset beat; Determining a relationship between a maximum parameter difference and a difference threshold; In response to the maximum parameter difference being greater than or equal to the difference threshold, it is determined that the stepper motor is stalled. Preferably, in response to the maximum parameter difference being greater than or equal to the difference threshold, determining that the stepper motor is stalled includes: A preset time range includes a plurality of driving cycles, and determining a frequency ratio in which the maximum parameter difference in each driving cycle is greater than or equal to the difference threshold; In response to the sum of the ratio frequency times being greater than or equal to a times threshold, it is determined that the stepping motor is stalled.
7. A fan shaking control device, characterized in that: The device comprises: a detection module for detecting a beat signal of unidirectional rotation of a stepper motor, wherein the beat signal has one driving cycle consisting of one rotation of the stepper motor. Within one driving cycle, the beat signal includes voltage waveform signals outputted by a plurality of beats of the stepper motor, wherein parameter values of the plurality of voltage waveform signals form a set; a first determining module, signal-connected to the detecting module, for acquiring in real time a plurality of the voltage waveform signals in the set, and determining a first parameter value and a second parameter value output by each of the voltage waveform signals in the set; wherein the second parameter value is greater than the first parameter value; a second determining module, signal-connected to the first determining module, configured to determine a parameter difference between the first parameter value and the second parameter value of each of the voltage waveform signals; The third determination module is signal-connected to the second determination module, and selects at least one preset beat in the set according to a first influencing factor; the first influencing factor includes a steering parameter of the stepper motor; and then determines whether the stepper motor is stalled based on a comparison result of the parameter difference corresponding to the preset beat in one driving cycle and the parameter difference corresponding to the remaining beats in the set.
8. The device according to claim 7, characterized in that The detection module includes: A driving module, electrically connected to the stepping motor; a voltage-dividing resistor, one end of which is electrically connected to the sampling module, and the other end of which is electrically connected to the driving module; a sampling resistor, one end of which is connected in parallel to the other end of the voltage divider resistor and is located between the voltage divider resistor and the driving module, and the other end of the sampling resistor is grounded; The sampling module is connected to the sampling resistor signal to obtain the beat signal of the unidirectional rotation of the stepping motor. Preferably, the sampling module is an analog-to-digital conversion ADC module, which is used to convert the voltage waveform signal output by the sampling resistor into a current signal, and then output the digital current AD value corresponding to each beat signal through analog-to-digital conversion.
9. An electronic device used for a fan, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the fan shaking control method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium applied to a fan, wherein the computer-readable storage medium stores a computer program, characterized in that: When the computer program is executed by a processor, the fan shaking control method according to any one of claims 1 to 6 is implemented.