Control method, control device and control system
By comparing the transition edge sequences of the first Hall signal and the second Hall signal of the stepper motor, the problem that the single Hall element cannot accurately distinguish the rotor state is solved, and the rapid calibration of the stepper motor is achieved, which shortens the initialization time and improves the service life.
Patent Information
- Application Number
- CN202311783196.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-06-24
AI Technical Summary
During the initialization process of stepper motor, the jump signal generated by the single Hall element cannot accurately distinguish the rotor in the one-way rotation stage and the impact rebound stage, resulting in the inability to quickly determine the initial position, which extends the initialization time.
By obtaining the first Hall signal and the second Hall signal generated by the magnetic field change of the stepper motor magnetic rotor, the actual jump edge sequence is sampled, and the sequence with the expected jump edge sequence is compared. If it is different, the stepper motor is calibrated.
It realizes a quick and accurate judgment of whether the stepper motor hits the end, shortens the initialization time, reduces noise, improves the user experience, and extends the service life of the electric valve.
Smart Images

Figure CN120200505A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of thermal management, and in particular, to a control method, a control device, and a control system. Background Art
[0002] During the initialization process of an electric valve, a single Hall element is used to calibrate the initial position of a stepper motor, and the initial position includes the fully open position and the fully closed position of the stepper motor. The entire initialization process can be divided into a one-way rotation stage of the rotor, an impact rebound stage, and a collision stop stage. When the rotor is in the collision stop stage, the single Hall element generates a constant signal, and then the current position of the stepper motor is calibrated as the initial position. Although when the rotor is in the impact rebound stage, the rotor is already in the initial position, however, when the rotor is in the one-way rotation stage and the impact rebound stage, the single Hall element generates a jumping signal, which causes the electric valve to be unable to determine whether the rotor is in the one-way rotation stage or the collision stop stage, and thus unable to shorten the initialization time of the stepper motor. Summary of the Invention
[0003] Based on the above problems, the present application provides a control method, a control device, and a control system, which shorten the initialization time of the stepper motor.
[0004] The embodiments of the present application disclose the following technical solutions:
[0005] In a first aspect, the present application discloses a control method for controlling a stepper motor, including:
[0006] Obtaining a first Hall signal and a second Hall signal generated based on the magnetic field change of the magnetic rotor of the stepper motor;
[0007] Sampling the first Hall signal and the second Hall signal to obtain a measured jump edge sequence;
[0008] Comparing the measured jump edge sequence with an expected jump edge sequence to obtain a comparison result;
[0009] If the comparison result indicates that the measured jump edge sequence is different from the expected jump edge sequence, calibrate the stepper motor.
[0010] In a second aspect, the present application provides a control device for controlling a stepper motor, the control device including:
[0011] An obtaining unit for obtaining a first Hall signal and a second Hall signal generated based on the magnetic field change of the magnetic rotor of the stepper motor;
[0012] A sampling unit for sampling the first Hall signal and the second Hall signal to obtain a measured jump edge sequence;
[0013] A comparison unit for comparing the measured edge transition sequence and the expected edge transition sequence to obtain a comparison result;
[0014] A calibration unit for calibrating the stepper motor if the comparison result indicates that the measured edge transition sequence is different from the expected edge transition sequence.
[0015] In a third aspect, the present application provides a control system, the control system includes a controller, a stepper motor, a first Hall sensor, and a second Hall sensor, the controller includes the control device as described in the second aspect, the controller is connected to the stepper motor, the first Hall sensor, and the second Hall sensor, the first Hall sensor is configured to generate the first Hall signal based on the magnetic field change of the magnetic rotor of the stepper motor, and the second Hall sensor is configured to generate the second Hall signal based on the magnetic field change of the magnetic rotor of the stepper motor.
[0016] In a fourth aspect, the present application provides an electric valve, including the control system as described in the third aspect, the electric valve further includes a stop assembly and a mechanical limit portion, the stop assembly is connected to the magnetic rotor in a limiting manner, the mechanical limit portion is connected to the coil stator in a limiting manner, and at least a part of the mechanical limit portion is located on the rotation path of the stop assembly.
[0017] Compared with the prior art, in a control method, device, and system provided by the present application, the expected edge transition sequence is the edge transition sequence of the first Hall signal and the second Hall signal when the rotor is in the one-way rotation stage. When the measured edge transition sequence is different from the expected edge transition sequence, the stepper motor is calibrated. That is, when the rotor is in the impact rebound stage, the stepper motor is calibrated, which shortens the initialization time of the stepper motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 It is a schematic flowchart of a control method provided by an embodiment of the present application;
[0020] Figure 2A It is a schematic diagram of a motor rotor and a Hall sensor provided by an embodiment of the present application;
[0021] Figure 2B It is a waveform schematic diagram of a Hall signal provided by an embodiment of the present application;
[0022] Figure 3 Schematic diagram of the relationship between a first Hall signal waveform and a second Hall signal waveform provided by an embodiment of the present application;
[0023] Figure 4 Schematic diagram of the structure of a control device provided by an embodiment of the present application;
[0024] Figure 5 Schematic diagram of the structure of a control system provided by an embodiment of the present application. Detailed implementation manners
[0025] As described above, electric valves are mostly used in thermal management systems, and thermal management systems are used to regulate the refrigerant flow rate. The electric valve adjusts the voltage or current applied to the electric valve based on the Hall signal generated by the Hall sensor. Adjusting the voltage or current applied to the electric valve can change the opening degree of the electric valve, thereby achieving the purpose of regulating the refrigerant flow rate. In order to improve the regulation accuracy of the refrigerant flow rate, after the electric valve is powered on, it is necessary to initialize the electric valve first, that is, calibrate the fully open position and the fully closed position of the electric valve. After the initialization is completed, the electric valve starts to work. It can be understood that power-on means that the device to which the electric valve is applied is powered on. For example, if the electric valve is a vehicle electric valve, then each time the vehicle is powered on, the vehicle electric valve needs to be initialized. The electric valve has a mechanical limit part. During the initialization process, the electric valve will move in the fully closed direction, and when the electric valve moves in the fully closed direction, it will hit the mechanical limit part. The movement of the rotor is restricted by the mechanical limit part to ensure that the electric valve is in the fully closed position, thereby facilitating the calibration of the fully closed position of the electric valve. During the initialization process, the electric valve will also move in the fully open direction, and when the electric valve moves in the fully open direction, it will also hit the mechanical limit part. The movement of the rotor is restricted by the mechanical limit part to ensure that the electric valve is in the fully open position, thereby facilitating the calibration of the fully open position of the electric valve.
[0026] Generally, in the initialization stage, an electric valve reaches the fully closed position or the fully open position by hitting the end. In the current technology, a single Hall sensor is used to sense the magnetic field change of the magnetic rotor to determine whether the electric valve hits the end. For example, in the current end-hitting detection strategy, when the system provides pulsed current to the coil, the magnetic rotor rotates step by step in one direction, which is called the one-way rotation stage. At this time, the single Hall signal is a continuously jumping signal; when the rotor hits the mechanical limit part and rebounds, which is called the impact rebound stage, the Hall signal is still a continuously jumping signal; until the rotor stops hitting at the mechanical limit part, which is called the stop hitting stage, the Hall signal is a constant signal. When the hitting stops (that is, when the Hall signal is a constant signal), the initial position of the stepper motor is calibrated. The initial position of the stepper motor includes the fully closed position and the fully open position. Generally, when calibrating the fully closed position of the stepper motor, the number of steps or pulses of the stepper motor is set to zero; when calibrating the fully open position of the stepper motor, the number of steps or pulses generated by the Hall sensor during the process from the fully closed position to the fully open position of the stepper motor is counted, and the counted number of steps or pulses is calibrated as the number of steps or pulses of the fully closed position of the stepper motor. Since in the electric valve, the end-hitting structure of the mechanical limit part and the rotor includes an elastic part, the elastic part plays a role in slowing down the impact. However, during the initialization process, due to the material characteristics of the elastic part and the system providing continuous pulsed current to the coil, the impact rebound of the rotor relative to the mechanical limit part is more frequent, which results in a longer initialization time of the stepper motor. On the other hand, the noise generated by the impact rebound belongs to high-frequency vibration and lasts longer, seriously affecting the user experience.
[0027] Furthermore, in the current technology, continuous impact rebound during the initialization stage will cause unnecessary wear on the stroke of the electric valve, resulting in a reduced service life of the thermal management system and further poor user experience.
[0028] The present application provides a control method for controlling the initialization of a stepper motor, including: controlling the stepper motor based on a drive signal; obtaining a first Hall signal and a second Hall signal generated based on the magnetic field change of the magnetic rotor of the stepper motor; sampling the first Hall signal and the second Hall signal to obtain a measured jump edge sequence; comparing the measured jump edge sequence with an expected jump edge sequence to obtain a comparison result; if the comparison result indicates that the measured jump edge sequence is different from the expected jump edge sequence, calibrate the stepper motor. Through the two Hall signals generated by the two Hall sensors, it is possible to quickly and accurately determine whether the stepper motor hits the end, shorten the initialization time of the stepper motor, and at the same time reduce the noise generated by repeated end-hitting, improving the user experience.
[0029] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
[0030] Embodiment 1:
[0031] The following combines Figures 1 - 3 , and details a control method provided by the embodiment of this application. The control method is used to control the initialization of a stepper motor.
[0032] S101. Control the stepper motor based on a drive signal.
[0033] Among them, the stepper motor includes a magnetic rotor and a coil stator. The magnetic rotor is rotatably connected to the coil stator.
[0034] Among them, when the stepper motor is powered on or re-powered on after being connected to the power supply, the stepper motor is controlled based on the drive signal. In the initial stage when the stepper motor starts, the magnetic rotor rotates unidirectionally relative to the coil stator. The drive signal includes at least one of a speed value, a current value, and a voltage value.
[0035] In a possible implementation manner, the stepper motor is driven at a preset speed so that the magnetic rotor rotates at a preset speed, enabling the magnetic rotor to act in the fully open direction or the fully closed direction.
[0036] S102. Obtain a first Hall signal and a second Hall signal generated based on the magnetic field change of the magnetic rotor of the stepper motor.
[0037] Among them, the first Hall signal is generated based on the magnetic field change of the magnetic rotor, and the second Hall signal is generated based on the magnetic field change of the magnetic rotor.
[0038] In a possible implementation manner, the first Hall signal and the second Hall signal may be respectively generated by the first Hall sensor and the second Hall sensor sensing the magnetic field change of the magnetic rotor of the stepper motor. Among them, the first Hall sensor and the second Hall sensor are a type of magnetic sensor that uses the Hall effect to detect the magnetic field change of the magnetic rotor, and has characteristics such as high precision, fast response, and good reliability. Specifically, the positions of the first Hall sensor and the second Hall sensor on the stepper motor are different, and there is a position difference between the first Hall sensor and the second Hall sensor. Using this position difference, two Hall signals can be generated, namely the first Hall signal and the second Hall signal.
[0039] In a possible implementation, the first Hall signal and the second Hall signal may be generated by a single Hall sensor sensing the change in the magnetic field of the magnetic rotor of the stepper motor. Specifically, the single Hall sensor is limit-connected to the coil stator. First, the starting angle of the magnetic rotor of the stepper motor can be obtained. Starting from the starting angle, the stepper motor is driven, and the signal of the single Hall sensor is obtained as the first Hall signal. Then, the position of the single Hall sensor on the coil stator is adjusted. For example, the single Hall sensor is driven to rotate around the magnetic rotor by θ, where 0° < θ ≤ 180°. Then, the stepper motor is reset to the starting angle and driven, and the signal of the single Hall sensor is obtained as the second Hall signal. There is a time difference between the acquisition of the first Hall signal and the acquisition of the second Hall signal. Using this time difference, two Hall signals can also be generated, namely the first Hall signal and the second Hall signal.
[0040] For ease of understanding, the following combines Figure 2A and Figure 2B to describe, taking the Hall sensor sensing the change in the magnetic field of the magnetic rotor of the stepper motor to generate a Hall signal as an example, that is, the Hall sensor senses the change in the magnetic field of the magnetic rotor of the stepper motor to generate a Hall signal. As Figure 1 only takes the induction process of one Hall sensor as an example.
[0041] As Figure 2A shown, the magnetic rotor 201 includes an iron core (not shown in the figure) and magnetic poles. The magnetic poles are fixedly connected to the iron core. There are at least two magnetic poles, and at least two magnetic poles are arranged in a circumferential pattern. Figure 2A The white magnetic poles in Figure 2A and Figure 2A The black magnetic poles in Figure 2A are arranged alternately. The magnetic poles include N poles (north poles) and S poles (south poles).
[0042] For example, when the motor rotor magnetic pole corresponding to the Hall sensor 202 is the N pole, the Hall sensor 202 generates a feedback signal of a low level L. When the motor rotor magnetic pole corresponding to the Hall sensor 202 is the S pole, the Hall sensor 202 generates a feedback signal of a high level H. Therefore, when the motor rotor magnetic pole corresponding to the Hall sensor 202 jumps from the N pole to the S pole, the feedback signal generated by the Hall sensor 202 jumps from L to H. Similarly, when the motor rotor magnetic pole corresponding to the Hall sensor 202 jumps from the S pole to the N pole, the feedback signal generated by the Hall sensor 202 jumps from H to L. The signal part that jumps from L to H and the signal part that jumps from H to L can be regarded as the transition edges of the Hall sensor 202. Among them, the transition edges are generally divided into rising edges and falling edges. The signal part that jumps from L to H is generally regarded as the rising edge, and the signal part that jumps from H to L is generally regarded as the falling edge. As Figure 2A shown, the optional magnetic rotor 201 rotates in the clockwise direction. As the magnetic rotor 201 rotates in the clockwise direction, the magnetic rotor magnetic poles corresponding to the Hall sensor 202 alternate in the order of N pole, S pole, N pole, S pole, N pole, S pole. Then as Figure 2B shown, the feedback signal generated by the Hall sensor 202 jumps in the order of L, H, L, H, L, H. It can be seen from this that the waveform of the Hall signal generated by the Hall sensor 202 is approximately a square wave. The period of this square wave is related to the rotation speed and state of the magnetic rotor 201. When the operating state of the stepper motor is different, the period of the Hall signal output by the Hall sensor 202 will also be different, and the operating duration of the Hall signal will also be different.
[0043] It should be noted that Figure 2B the Hall signal shown in
[0044] is taken as an example of a square wave signal, and it can also be understood as a digital signal. In addition, the Hall signal can also be an analog signal, which is not specifically limited in this application.
[0045] S103. Sample the first Hall signal and the second Hall signal to obtain an actual measured transition edge sequence.
[0046] Specifically, sample the first Hall signal to obtain a first edge transition sequence, which is equivalent to the sequence of edge transitions of the first Hall signal, and sample the second Hall signal to obtain a second edge transition sequence, which is equivalent to the sequence of edge transitions of the second Hall signal; merge the first edge transition sequence and the second edge transition sequence in chronological order to obtain an edge transition sequence; sample the edge transition sequence to obtain an actual edge transition sequence.
[0047] In a possible implementation, sample the first Hall signal periodically to obtain a first Hall signal sequence; screen the first Hall signal sequence to obtain a first edge transition sequence. For example: sample the first Hall signal periodically to obtain a first Hall signal sequence {A k-1 , A k , A k+1 , …, A n}, where 0 < k - 1 < k < k + 1 < n. A k-1 is the value of the first Hall signal at the (k - 1)-th moment, A k is the value of the first Hall signal at the k-th moment, A k+1 is the value of the first Hall signal at the (k + 1)-th moment, A n is the value of the first Hall signal at the n-th moment. Calculate the difference between the values of the first Hall signal at two adjacent moments, that is, calculate the difference between A k and A k-1 to obtain a first difference calculation result. When the first difference calculation result indicates that the absolute value of the difference between A k and A k-1 is not less than the first edge transition threshold, then A k is used as an element of the first edge transition sequence, that is, A k is regarded as an edge transition in the first Hall signal.
[0048] Similarly, sample the second Hall signal periodically to obtain a second Hall signal sequence; screen the second Hall signal sequence to obtain a second edge transition sequence. For example: sample the second Hall signal periodically to obtain a second Hall signal sequence {B y-1 , B y , B y+1 , …, B m}, where 0 < y - 1 < y < y + 1 < m. B y-1 is the value of the second Hall signal at the (y - 1)-th moment, B y is the value of the second Hall signal at the y-th moment, B y+1 is the value of the second Hall signal at the (y + 1)-th moment, B m is the value of the second Hall signal at the m-th moment. Calculate the difference between the values of the second Hall signal at two adjacent moments, that is, calculate the difference between B y and B y-1Perform a difference calculation to obtain a second difference calculation result. When the second difference calculation result represents B y and B y-1 the absolute value of the difference is not less than the second jump threshold, then B y is used as an element of the second jump edge sequence, that is, B is regarded as y a jump edge in the second Hall signal. This can effectively filter out the signal values that do not represent jump edges in periodic sampling.
[0049] In a possible implementation, the position of the stepper motor can be determined based on at least one of the first Hall signal and the second Hall signal; it is determined whether the position of the stepper motor is within the collision range; when it is determined that the position of the stepper motor is within the collision range, the jump edge sequence is sampled to obtain a measured jump edge sequence.
[0050] Among them, the collision range is a pre-set position range of the magnetic rotor. When the magnetic rotor is within this collision range, the magnetic rotor is very likely to collide. By judging the collision position, the amount of useless data in the obtained measured jump edge sequence can be reduced, avoiding the identification of the magnetic rotor collision during the idle stroke of the magnetic rotor detection, and reducing the data processing pressure.
[0051] S104. Compare the measured jump edge sequence and the expected jump edge sequence to obtain a comparison result.
[0052] Among them, the sequence length of the measured jump edge sequence is equal to the sequence length of the expected jump edge sequence, so as to facilitate comparing the measured jump edge sequence and the expected jump edge sequence together.
[0053] In a possible implementation, the expected jump edge sequence includes: a first expected jump edge sequence and a second expected jump edge sequence. Compare the measured jump edge sequence with the first expected jump edge sequence to obtain a first comparison result; compare the measured jump edge sequence with the second expected jump edge sequence to obtain a second comparison result.
[0054] S105. If the comparison result indicates that the measured jump edge sequence is different from the expected jump edge sequence, calibrate the stepper motor.
[0055] Specifically, when the comparison result indicates that the measured jump edge sequence is different from the expected jump edge sequence, calibrate the initial position of the stepper motor to complete the initialization. Among them, the initial position of the stepper motor includes at least one of the fully open position and the fully closed position.
[0056] In a possible implementation, the expected transition edge sequence includes: a first expected transition edge sequence and a second expected transition edge sequence. When obtaining a first comparison result and a second comparison result based on the first expected transition edge sequence and the second expected transition edge sequence, if the first comparison result indicates that the measured transition edge sequence is different from the first expected transition edge sequence, and the second comparison result indicates that the measured transition edge sequence is different from the second expected transition edge sequence, calibrate the stepper motor.
[0057] Furthermore, if the first comparison result and the second comparison result indicate that the measured transition edge sequence is the same as at least one of the first expected transition edge sequence and the second expected transition edge sequence, do not calibrate the stepper motor.
[0058] Specifically, only when the measured transition edge sequence is different from the first expected transition edge sequence and different from the second expected transition edge sequence, calibrate the stepper motor. In other cases, do not calibrate the stepper motor.
[0059] For ease of understanding, the following is combined with Figure 3 an example for illustration, where the Hall signal is taken as a square wave signal.
[0060] Among them, as Figure 3 (a) shows the Hall signal corresponding to the first expected transition edge sequence. Therefore, for the first Hall signal and the second Hall signal shown in Figure 3 (a), the first expected transition edge sequence can be expressed as {1, 2, 1, 2}, where 1 represents the transition edge of the first Hall signal, and 2 represents the transition edge of the second Hall signal. In the expected transition edge sequence, the rising edge and the falling edge of the first Hall signal are not distinguished, and the rising edge and the falling edge of the first Hall signal are uniformly regarded as the transition edge of the first Hall signal. Similarly, the rising edge and the falling edge of the second Hall signal are not distinguished, and the rising edge and the falling edge of the second Hall signal are uniformly regarded as the transition edge of the second Hall signal.
[0061] Among them, as Figure 3 (b) shows the Hall signal corresponding to the second expected transition edge sequence. Therefore, for the first Hall signal and the second Hall signal shown in Figure 3 (b), the second expected transition edge sequence can be expressed as {2, 1, 2, 1}.
[0062] In actual measurement, the edge transition sequence can be: {1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1}. If the first Hall signal and the second Hall signal are sampled and the actual edge transition sequence obtained is: {1, 2, 2, 1}, when comparing this actual edge transition sequence with the first expected edge transition sequence and the second expected edge transition sequence respectively, if it is determined that the actual edge transition sequence is different from the first expected edge transition sequence and the actual edge transition sequence is different from the second expected edge transition sequence, then calibrate this stepper motor.
[0063] An embodiment of the present application provides a control method for controlling a stepper motor, including: controlling the stepper motor based on a drive signal; obtaining a first Hall signal and a second Hall signal generated based on the magnetic rotor magnetic field change of the stepper motor; sampling the first Hall signal and the second Hall signal to obtain an actual edge transition sequence; comparing the actual edge transition sequence with an expected edge transition sequence to obtain a comparison result; and calibrating the stepper motor in response to the comparison result indicating that the actual edge transition sequence is different from the expected edge transition sequence. Through the first Hall signal and the second Hall signal (i.e., two Hall signals), it is possible to quickly and accurately determine whether the stepper motor hits the end, shortening the initialization time of the stepper motor, and at the same time reducing the noise generated due to repeated hitting of the end, improving the user experience.
[0064] Furthermore, the number of times the electric valve repeatedly hits the end is effectively reduced, thereby reducing unnecessary wear during the stroke of the electric valve and improving the service life of the electric valve, further improving the user experience.
[0065] Embodiment 2:
[0066] The following will introduce in detail a control device provided by an embodiment of the present application for controlling a stepper motor in combination with Figure 4 ,.
[0067] A driving unit 401 for controlling the stepper motor based on a drive signal;
[0068] An obtaining unit 402 for obtaining a first Hall signal and a second Hall signal generated based on the magnetic rotor magnetic field change of the stepper motor;
[0069] A sampling unit 403 for sampling the first Hall signal and the second Hall signal to obtain an actual edge transition sequence;
[0070] A comparing unit 404 for comparing the actual edge transition sequence with an expected edge transition sequence to obtain a comparison result;
[0071] A calibrating unit 405 for calibrating the stepper motor if the comparison result indicates that the actual edge transition sequence is different from the expected edge transition sequence.
[0072] Further, the expected transition edge sequence includes: a first expected transition edge sequence and a second expected transition edge sequence.
[0073] The comparison unit 404 is specifically configured to compare the measured transition edge sequence with the first expected transition edge sequence to obtain a first comparison result; compare the measured transition edge sequence with the second expected transition edge sequence to obtain a second comparison result.
[0074] The calibration unit 405 is specifically configured to calibrate the stepper motor if the first comparison result indicates that the measured transition edge sequence is different from the first expected transition edge sequence, and the second comparison result indicates that the measured transition edge sequence is different from the second expected transition edge sequence.
[0075] Further, the calibration unit 405 is further configured not to calibrate the stepper motor if the first comparison result and the second comparison result indicate that the measured transition edge sequence is the same as at least one of the first expected transition edge sequence and the second expected transition edge sequence.
[0076] Further, the sampling unit 403 is specifically configured to sample the first Hall signal to obtain a first transition edge sequence, sample the second Hall signal to obtain a second transition edge sequence; combine the first transition edge sequence and the second transition edge sequence in chronological order to obtain a transition edge sequence; sample the transition edge sequence to obtain a measured transition edge sequence.
[0077] Further, the sampling unit 403 is specifically configured to determine the position of the stepper motor based on at least one of the first Hall signal and the second Hall signal; determine whether the position of the stepper motor is within the collision end range; when the position of the stepper motor is within the collision end range, sample the transition edge sequence to obtain a measured transition edge sequence.
[0078] Further, the sampling unit 403 is specifically configured to periodically sample the first Hall signal to obtain a first Hall signal sequence; screen the first Hall signal sequence to obtain a first transition edge sequence; periodically sample the second Hall signal to obtain a second Hall signal sequence; screen the second Hall signal sequence to obtain a second transition edge sequence.
[0079] An embodiment of the present application provides a control device for controlling a stepper motor, including: a driving module 401 for controlling the stepper motor based on a driving signal; an acquisition unit 402 for acquiring a first Hall signal and a second Hall signal generated based on the magnetic rotor magnetic field change of the stepper motor; a sampling unit 403 for sampling the first Hall signal and the second Hall signal to obtain an actual edge jump sequence; a comparison unit 404 for comparing the actual edge jump sequence with an expected edge jump sequence to obtain a comparison result; a calibration unit 405 for calibrating the stepper motor if the comparison result indicates that the actual edge jump sequence is different from the expected edge jump sequence. Through two Hall signals, it is possible to quickly and accurately determine whether the stepper motor hits the end, shortening the initialization time of the stepper motor, reducing the noise generated by repeated hitting of the end, and improving the user experience.
[0080] Furthermore, the number of times the electric valve hits the end repeatedly is effectively reduced, thereby reducing unnecessary wear during the stroke of the electric valve, increasing the service life of the electric valve, and further improving the user experience.
[0081] Embodiment Three:
[0082] The following combines Figure 5 to introduce in detail a control system provided by an embodiment of the present application.
[0083] A control system provided by an embodiment of the present application includes: a controller 501, a stepper motor 502, a first Hall sensor 503, and a second Hall sensor 504. The controller 501 includes the control device described in Embodiment Two. The controller 501 is respectively connected to the stepper motor 502, the first Hall sensor 503, and the second Hall sensor 504. Among them, the first Hall sensor 503 is used to generate a first Hall signal based on the magnetic rotor magnetic field change of the stepper motor 502, and the second Hall sensor 504 is used to generate a second Hall signal based on the magnetic rotor magnetic field change of the stepper motor 502.
[0084] Furthermore, the stepper motor 502 includes a magnetic rotor and a coil stator. The magnetic rotor is rotatably connected to the coil stator. The coil stator is connected to the controller 501. The first Hall sensor 503 and the second Hall sensor 504 are fixedly connected to the coil stator. The first Hall sensor 503 and the second Hall sensor 504 are located radially outside the magnetic rotor, and the first Hall sensor 503 and the second Hall sensor 504 are arranged at an angle.
[0085] Further, the included angle between the first Hall sensor 503 and the second Hall signal 504 is θ, that is, the first Hall sensor 503 and the second Hall signal 504 are arranged at an included angle. When the included angle θ between the first Hall sensor 503 and the second Hall signal 504 is 90°, the number of magnetic poles N of the magnetic rotor is 4x + 2; or when the included angle θ between the first Hall sensor 503 and the second Hall signal 504 is 180°, the number of magnetic poles N of the magnetic rotor is 2x + 1. Wherein, x is a non-negative integer, and accordingly N is a positive integer, and 0° ≤ θ ≤ 180°.
[0086] The present application further provides an electric valve, which includes the control system described in Embodiment 3 and can implement a control method as described in the embodiment. In addition, the electric valve further includes a stop assembly and a mechanical limit portion. The stop assembly is limit-connected to the magnetic rotor, and the mechanical limit portion is limit-connected to the coil stator. At least part of the mechanical limit portion is located on the moving path of the stop assembly. When the stop assembly impacts the mechanical limit portion (i.e., the electric valve hits the end), the electric valve is in the fully open position or the fully closed position. The specific structures of the stop assembly and the mechanical limit portion relate to the prior art and will not be specifically described herein.
[0087] It should be noted that the embodiments in this specification are all described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments. In particular, for the method, device, and system embodiments, since they are basically similar to the method embodiments, they are described relatively simply, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components prompted as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0088] The above is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A control method for controlling a stepper motor, characterized in that, Including: Obtain a first Hall signal and a second Hall signal generated based on the magnetic rotor magnetic field change of the stepping motor; Sample the first Hall signal and the second Hall signal to obtain an actual jump edge sequence; Compare the actual jump edge sequence with the expected jump edge sequence to obtain a comparison result; If the comparison result indicates that the actual jump edge sequence is different from the expected jump edge sequence, calibrate the stepping motor.
2. The method according to claim 1, wherein The expected jump edge sequence includes: a first expected jump edge sequence and a second expected jump edge sequence; The comparing the actual jump edge sequence with the expected jump edge sequence to obtain a comparison result includes: Compare the actual jump edge sequence with the first expected jump edge sequence to obtain a first comparison result; Compare the actual jump edge sequence with the second expected jump edge sequence to obtain a second comparison result; The if the comparison result indicates that the actual jump edge sequence is different from the expected jump edge sequence, calibrate the stepping motor includes: If the first comparison result indicates that the actual jump edge sequence is different from the first expected jump edge sequence, and the second comparison result indicates that the actual jump edge sequence is different from the second expected jump edge sequence, calibrate the stepping motor.
3. The method according to claim 2, characterized in that, The method further includes: If the first comparison result and the second comparison result indicate that the actual jump edge sequence is the same as at least one of the first expected jump edge sequence and the second expected jump edge sequence, do not calibrate the stepping motor.
4. The method according to any one of claims 1 to 3, characterized in that, The sampling the first Hall signal and the second Hall signal to obtain an actual jump edge sequence includes: Sample the first Hall signal to obtain a first jump edge sequence, and sample the second Hall signal to obtain a second jump edge sequence; Merge the first jump edge sequence and the second jump edge sequence in chronological order to obtain a jump edge sequence; Sample the jump edge sequence to obtain the actual jump edge sequence.
5. The method according to claim 4, characterized in that, The sampling the jump edge sequence to obtain the actual jump edge sequence includes: Based on at least one of the first Hall signal and the second Hall signal, determine the position of the stepping motor; Judge whether the position of the stepping motor is within the collision end range; When the position of the stepping motor is within the collision end range, sample the jump edge sequence to obtain the actual jump edge sequence.
6. The method according to claim 4 or 5, characterized in that The sampling the first Hall signal to obtain a first jump edge sequence, and sampling the second Hall signal to obtain a second jump edge sequence includes: Periodically sample the first Hall signal to obtain a first Hall signal sequence; Screen the first Hall signal sequence to obtain the first jump edge sequence; Periodically sample the second Hall signal to obtain a second Hall signal sequence; Screen the second Hall signal sequence to obtain the second jump edge sequence.
7. A control device for controlling a stepper motor, characterized in that, The control device includes: An acquisition unit for acquiring a first Hall signal and a second Hall signal generated based on the magnetic rotor magnetic field change of the stepping motor; A sampling unit for sampling the first Hall signal and the second Hall signal to obtain an actual jump edge sequence; A comparison unit for comparing the measured edge transition sequence and the expected edge transition sequence to obtain a comparison result; A calibration unit for calibrating the stepping motor if the comparison result indicates that the measured edge transition sequence is different from the expected edge transition sequence.
8. A control system, characterized in that, The control system includes a controller, a stepping motor, a first Hall sensor, and a second Hall sensor. The controller includes the control device according to claim 7. The controller is connected to the stepping motor, the first Hall sensor, and the second Hall sensor. The first Hall sensor is configured to generate the first Hall signal based on the magnetic field change of the magnetic rotor of the stepping motor, and the second Hall sensor is configured to generate the second Hall signal based on the magnetic field change of the magnetic rotor of the stepping motor.
9. The control system according to claim 8, wherein The stepping motor includes a magnetic rotor and a coil stator. The magnetic rotor is rotatably connected to the coil stator. The coil stator is connected to the controller. The first Hall sensor and the second Hall sensor are fixedly connected to the coil stator. The first Hall sensor and the second Hall sensor are located radially outside the magnetic rotor, and the first Hall sensor and the second Hall sensor are arranged at an angle.
10. A control system according to claim 8, characterized in that, The angle between the first Hall sensor and the second Hall sensor is θ, and the number of magnetic poles of the magnetic rotor is N; the angle θ between the first Hall sensor and the second Hall sensor is 90°, and the number of magnetic poles N of the magnetic rotor is 4x + 2; or the angle θ between the first Hall sensor and the second Hall sensor is 180°, and the number of magnetic poles N of the magnetic rotor is 2x + 1; where x is a non-negative integer.