Motor control method and device, door lock and storage medium

By calibrating the motor reset time, the problem of motor reset stroke drift is solved, and the user experience and operation reliability of the door lock are improved.

CN119093819APending Publication Date: 2024-12-06TP-LINK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411209373.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

During the long-term use of door locks, the motor reset stroke distance drifts, resulting in the motor being unable to reset accurately, affecting the user experience.

Method used

By obtaining the motor reset time currently set in the door lock, determine the idle cycle of the motor during operation, and calibrate the initial reset time according to the idle cycle to obtain the target reset time, ensuring that the motor reset position falls on the preset of the motor idle stroke Within the location range.

Benefits of technology

It effectively reduces functional abnormalities caused by the failure of the motor reset time, improves the user experience, and ensures the normal operation of the door lock.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119093819A_ABST
    Figure CN119093819A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of door lock control, and provides a motor control method and device, a door lock and a storage medium, and the method comprises the following steps: obtaining the initial reset time by obtaining the reset time of a motor currently set in the door lock, and determining the idle period of the motor in the working process; the initial reset time is calibrated according to the idle period of the motor in the working process to obtain target reset time, and finally the motor is controlled to execute reset operation according to the target reset time, so that the reset position of the motor falls within the preset position range of the idle stroke of the motor. According to the embodiment, the reset time of the motor can adapt to the actual use condition, the reset stroke distance drift of the motor caused by objective factors can be automatically corrected, the situation that the motor cannot be accurately reset is reduced, the situation that the function of the door lock is abnormal is effectively reduced, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of door lock control, and in particular to a motor control method, device, door lock and storage medium. Background Art

[0002] At present, fully automatic door locks with pure mechanical lock bodies usually use DC or AC motors to realize automatic door lock control. The motor rotates to drive the square and oblique tongues of the pure mechanical lock body to open and close the door. After opening or closing the door, the motor needs to idle back to the original position, that is, to perform a rotary reset, so as to perform the subsequent closing or opening action. Therefore, when the fully automatic door lock leaves the factory, a fixed motor reset time will be set, so that the motor will perform the reset operation according to the set motor reset time after completing the door opening and closing.

[0003] However, in the actual use of the door lock, as the use time increases, the inside of the lock body may rust, the lubricating oil may dry up, the square tongue may be slightly skewed, etc., which will increase the friction of the switch lock. Continuing to use the original motor reset time will cause the motor reset travel distance to drift, and the motor cannot be reset accurately, causing abnormal function of the door lock and affecting the user experience. Summary of the invention

[0004] The present invention provides a motor control method, device, door lock and storage medium to solve the problem that after the door lock is used for a long time, the motor reset travel distance drifts and the motor cannot be accurately reset, resulting in abnormal function of the door lock and affecting the user experience.

[0005] In a first aspect, an embodiment of the present application provides a motor control method, comprising:

[0006] Obtain the reset time of the motor currently set in the door lock, obtain the initial reset time, and determine the idling period of the motor during operation;

[0007] The initial reset time is calibrated according to the idling period of the motor during operation to obtain the target reset time;

[0008] The motor is controlled to perform a reset operation according to the target reset time, so that the reset position of the motor falls within a preset position range of the motor idling stroke.

[0009] Optionally, the initial reset time includes a locking initial reset time and an unlocking initial reset time, and the target reset time includes a locking target reset time and an unlocking target reset time. The initial reset time is calibrated according to the idling cycle of the motor during operation to obtain the target reset time, including:

[0010] Determine a first idling full cycle and a second idling full cycle, the first idling full cycle being the sum of the initial reset time of locking and the unlocking idling cycle in the subsequent unlocking process, and the second idling full cycle being the sum of the initial reset time of unlocking and the locking idling cycle in the subsequent locking process;

[0011] Determine a first target cycle according to the first idling full cycle, and determine a second target cycle according to the second idling full cycle;

[0012] Calibrate the lock initial reset time according to the first target period to obtain the lock target reset time;

[0013] The unlocking initial reset time is calibrated according to the second target period to obtain the unlocking target reset time.

[0014] Optionally, determining the first target cycle according to the first idling full cycle, and determining the second target cycle according to the second idling full cycle, comprises:

[0015] The first idling full cycle is calibrated according to a first calibration coefficient to obtain a first target cycle, wherein the first calibration coefficient is determined according to the factory unlocking idling cycle and the factory locking reset time of the motor;

[0016] The second idling full cycle is calibrated according to the second calibration coefficient to obtain a second target cycle. The second calibration coefficient is determined according to the factory locked idling cycle and the factory unlocked reset time of the motor.

[0017] Optionally, calibrating the lock initial reset time according to the first target period to obtain the lock target reset time includes:

[0018] When the ratio of the unlocking idling cycle to the first target cycle is not within the first ratio range, the locking initial reset time is calibrated according to the unlocking idling cycle, the first target cycle and the first ratio coefficient to obtain the locking target reset time.

[0019] Optionally, calibrating the unlocking initial reset time according to the second target period to obtain the unlocking target reset time includes:

[0020] When the ratio of the locking idling cycle to the second target cycle is not within the second ratio range, the unlocking initial reset time is calibrated according to the locking idling cycle, the second target cycle and the second ratio coefficient to obtain the unlocking target reset time.

[0021] Optionally, the idling cycle includes a locking idling cycle and an unlocking idling cycle, and determining the idling cycle of the motor during the working process includes:

[0022] During the locking process, the working current of the motor is sampled to obtain locking working current data, and according to the current change in the locking working current data, the duration from the start time of idling to the end time of idling of the motor during the locking process is determined to obtain the locking idling cycle;

[0023] During the unlocking process, the working current of the motor is sampled to obtain the unlocking working current data, and according to the current change in the unlocking working current data, the duration from the start time to the end time of the idling of the motor during the unlocking process is determined to obtain the unlocking idling cycle.

[0024] Optionally, sampling the working current of the motor to obtain locking working current data includes:

[0025] During the locking process, based on the analog-to-digital converter sampling algorithm, the voltage signal of the sampling resistor connected in series in the motor drive circuit is collected to obtain the locking working voltage data of the sampling resistor;

[0026] The locking working voltage data is converted into current to obtain locking working current data.

[0027] In a second aspect, an embodiment of the present application provides a motor control device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned motor control method when executing the computer program.

[0028] In a third aspect, an embodiment of the present application provides a readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned motor control method are implemented.

[0029] In a fourth aspect, an embodiment of the present application provides a door lock, comprising a motor and the above-mentioned motor control device.

[0030] In one solution provided by the above motor control method, device, door lock and storage medium, the initial reset time is obtained by acquiring the reset time of the motor currently set in the door lock, and the idling period of the motor during operation is determined, and then the initial reset time is calibrated according to the idling period of the motor during operation to obtain the target reset time, and finally the motor is controlled to perform the reset operation according to the target reset time, so that the reset position of the motor falls within the preset position range of the motor idling stroke. In this embodiment, the reset time of the motor is calibrated according to the idling period of the motor during operation, so that the reset time of the motor can be adapted to the actual use situation, and the drift of the motor reset stroke distance caused by objective factors can be automatically corrected, reducing the situation where the motor cannot be accurately reset, thereby effectively reducing the situation where the door lock has functional abnormalities and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0032] Figure 1 is a schematic diagram of a motor stroke when a door lock works normally in one embodiment of the present invention;

[0033] Figure 2 is a schematic diagram of a motor stroke when a door lock works abnormally in one embodiment of the present invention;

[0034] Figure 3 is another schematic diagram of the motor travel when the door lock works abnormally in one embodiment of the present invention;

[0035] Figure 4 is a structural schematic diagram of a door lock in one embodiment of the present invention;

[0036] Figure 5 is a flow chart of a motor control method according to an embodiment of the present invention;

[0037] Figure 6 yes Figure 5 A schematic diagram of an implementation process of step S10;

[0038] Figure 7 yes Figure 5 A schematic diagram of an implementation process of step S20;

[0039] Figure 8 Schematic diagram of the motor travel during the unlocking and locking process of the motor in one embodiment of the present invention;

[0040] Fig. 9 is a structural schematic diagram of a motor control device in one embodiment of the present invention;

[0041] Fig.10 It is a structural schematic diagram of an electronic device in one embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or their collections. It should also be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0044] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0045] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0046] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0047] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.

[0048] It is important to understand that a fully automatic door lock with a purely mechanical lock body usually drives the square tongue and the oblique tongue of the lock body to unlock and lock, but since the lock body does not have a sensor, an overcurrent detection circuit is usually designed on the printed circuit board PCB to detect whether the motor is blocked and stop the motor from rotating. When a blockage occurs, that is, after the square tongue that drives the door lock is fully extended or the oblique tongue is fully retracted, the motor needs to rotate a certain distance, that is, reset, to prevent the motor from getting stuck in the transmission device, resulting in the inability to mechanically unlock or lock. The reset of the motor is divided into unlock reset and lock reset, that is, the reset time of the motor includes the unlock reset time and the lock reset time. Figure 1 As shown in the figure, the arrow indicates the motor stroke. During the unlocking process, the motor first starts to idle, and then drives the latch bolt to retract to the fully retracted position. At this time, the motor stroke of the unlocking process is as follows Figure 1The long arrow in the unlocking process indicates that the square tongue shrinks synchronously during the unlocking process. After the unlocking is completed, the motor needs to be reset to the unlocking reset position A. During the unlocking reset process, the oblique tongue is released. At this time, the unlocking reset stroke of the motor is as follows: Figure 1 The short arrow in the unlocking process indicates that during the locking process, the motor starts to idle from point A, and then drives the tongue to be pushed out to the fully pushed out position. At this time, the motor travel of the locking process is as follows: Figure 1 The long arrow in the unlocking process indicates that the latch bolt is retracted and released synchronously during the locking process. After the locking is completed, the motor needs to be reset to the locking reset position B so that the unlocking process can be performed from point B. At this time, the locking reset stroke of the motor is as follows: Figure 1 The locking process is indicated by a short arrow.

[0049] like Figure 1 As shown in the figure, the motor reset positions (A, B) are both within the motor idling stroke, and the reset stroke is completely determined by the drive time. In the actual use of the door lock, as the use time increases, the lock body may rust, the lubricating oil may dry, and the tongue may be slightly skewed, which increases the friction of the switch lock. When the friction increases, if the original motor reset time is continued to be used, the motor reset stroke distance will drift, and the motor cannot be accurately reset, resulting in abnormal function of the door lock, affecting the user experience.

[0050] For example, take the unlocking process and the reset process after unlocking as an example. Figure 2 As shown, there are two abnormal unlocking situations: abnormal unlocking process 1 and abnormal unlocking process 2. Figure 2 As shown in the figure, the arrow indicates the motor stroke. During the unlocking process, the motor drives the latch bolt to retract to the fully retracted position. At this time, the motor stroke of the unlocking process is as follows Figure 2 The long arrow for unlocking process abnormality 1 and the short arrow for unlocking process abnormality 2 indicate that after unlocking is completed, the motor performs a reset operation. If the unlocking reset time is too short, resulting in the motor's unlocking reset stroke being too short and unable to reach the expected unlocking reset position, the oblique tongue may not be fully released and extended, affecting the door closing, or the square tongue's push-out path is blocked and does not reach the reset state, or both the oblique tongue and the square tongue do not reach the reset state, and the subsequent indoor handle and key locks will not be in place, resulting in the indoor handle and key closing being stuck, such as Figure 2 Unlock abnormal process 1. If the unlock reset time is too long, causing the motor's unlock reset stroke to be too long and exceeding the expected unlock reset position, the tongue may be accidentally pushed out and collide with the tongue when closing the door. Figure 2 Abnormal unlocking process 2.

[0051] After the locking process is completed, the motor performs locking reset, such as Figure 3As shown, there are two kinds of abnormal locking situations: abnormal locking process 1 and abnormal locking process 2. Figure 3 As shown in the figure, the arrow indicates the motor stroke. During the locking process, the motor drives the tongue to be pushed out to the fully pushed out position. At this time, the motor stroke of the locking process is as follows: Figure 2 The long arrow of locking process abnormality 1 and the short arrow of locking process abnormality 2 indicate that after locking is completed, the motor is reset. If the locking reset time is too short, the locking reset stroke of the motor is too short and the expected locking reset position cannot be reached, which affects the indoor handle unlocking and key unlocking. That is, the indoor handle and key may get stuck. Figure 3 Abnormal locking process 1. If the locking reset time is too long, resulting in the motor's locking reset stroke being too long and exceeding the expected locking reset position, the square tongue and the oblique tongue may be partially retracted, such as Figure 3 The locking exception process 2.

[0052] In view of the above problems, the motor control method provided by the embodiment of the present invention can be applied in Figure 4 In the door lock 1 shown, the door lock includes a motor 11 and a motor control device 12, wherein the motor 11 communicates with the motor control device 12 via a cable.

[0053] The motor control device 12 obtains the initial reset time by acquiring the initial reset time of the motor 11 in the door lock 1, and determines the idling period of the motor 11 during the working process, and then calibrates the initial reset time according to the idling period of the motor 11 during the working process to obtain the target reset time, and finally controls the motor 11 to perform the reset operation according to the target reset time, so that the reset position of the motor falls within the preset position range of the motor idling stroke, that is, Figure 1 The reset time of the motor is calibrated according to the idling cycle of the motor 11 during operation, so that the reset time of the motor can be adapted to the actual usage, and the drift of the motor reset stroke caused by objective factors can be automatically corrected, thereby reducing the situation where the motor 11 cannot be accurately reset, thereby effectively reducing the situation where the door lock has functional abnormalities and improving the user experience.

[0054] The motor 11 may be a DC motor or an AC motor, and the motor control device 12 may be a door lock controller, such as a main control chip. In this embodiment, the door lock 1 includes the motor 11 and the motor control device 12 for exemplary purposes only. In other embodiments, the door lock 1 also includes other necessary structures, such as a square tongue, a bevel tongue, and a drive circuit.

[0055] In one embodiment, if Figure 5 As shown, a motor control method is provided, which is applied in Figure 4 The motor control device in the example is used as an example to illustrate, including the following steps:

[0056] S10: Acquire the reset time of the motor currently set in the door lock, obtain the initial reset time, and determine the idling period of the motor during the working process.

[0057] In actual use, the motor control device needs to obtain the reset time of the motor currently set in the door lock, obtain the initial reset time, and then perform the reset operation according to the reset time of the motor currently set. The motor control device will perform reset operation time calibration according to a certain period or in response to user instructions. When the motor control device determines that the reset operation time calibration needs to be performed, it is necessary to determine the idling period of the motor during the working process (including the unlocking process and the locking process), and obtain the reset time of the motor currently set in the door lock to obtain the initial reset time.

[0058] The reset time of the motor includes the unlock reset time and the lock reset time. The idling period of the motor during operation may include the idling period of the motor during the unlock process (unlock idling period) and the idling period of the motor during the lock process (lock idling period).

[0059] like Figure 1 As shown, during the unlocking process, the motor first idles from the locked reset position, and then drives the square tongue and the oblique tongue to retract. During this process, the motor control device needs to determine and record the idling start time and idling end time of the motor during the unlocking process (i.e., the time when the square tongue and the oblique tongue are driven), and obtain the unlocking idling cycle, i.e., the unlocking idling cycle is the length of time from the idling start time to the idling end time of the motor during the unlocking process. Then, the motor performs a reset operation according to the currently set unlocking reset time of the motor, and resets to the unlocking reset position.

[0060] like Figure 1 As shown, during the locking process, the motor idles from the unlocking reset position and then drives the tongue to be pushed out. During this process, the motor control device needs to determine and record the idling start time and idling end time of the motor during the locking process (i.e., the time when the locking drives the tongue), and obtain the locking idling cycle, i.e., the locking idling cycle is the length of time from the idling start time to the idling end time of the motor during the locking process. Then, the motor performs a reset operation according to the currently set motor locking reset time and resets to the locking reset position.

[0061] S20: Calibrate the initial reset time according to the idling period of the motor during operation to obtain a target reset time.

[0062] Then, the motor control device calibrates the initial reset time according to the idling period of the motor during operation to obtain the target reset time, so that the target reset time is adapted to the idling period of the motor. When the reset operation is subsequently performed according to the target reset time, the reset position of the motor stops within the preset range of the motor idling stroke.

[0063] Among them, the idling full cycle of the motor is the sum of the idling time when the motor is reset (i.e., the reset time) and the idling period in the subsequent unlocking or locking process. The idling full cycle of the motor includes the first idling full cycle and the second idling full cycle. For example, the sum of the idling period when the motor is unlocked and reset and the locking idling period in the locking process (i.e., before resetting) is taken as the second idling full cycle, and the idling period when the motor is locked and reset and the unlocking idling period in the unlocking process (i.e., before resetting) are taken as the first idling full cycle. In theory, the first idling full cycle and the second idling full cycle have the same duration.

[0064] By calibrating the motor reset time, the end time of the reset time after calibration (i.e., the target reset time), such as the time when the unlock reset position A is reached and the time when the lock reset position B is reached, is always within the preset time period of the target cycle after the idling full cycle calibration, such as always falling within the time period from the first ratio (e.g., 45%) of the target cycle to the second ratio (e.g., 55%) of the target cycle, so that the motor reset positions (A, B) can be ensured to stop within the preset range of the motor idling stroke, thereby automatically correcting the motor reset stroke distance drift caused by objective factors. Among them, the target cycle after the idling full cycle calibration is the idling full cycle multiplied by a certain ratio to obtain a calibration cycle that is less than the idling full cycle.

[0065] S30: Controlling the motor to perform a reset operation according to the target reset time, so that the reset position of the motor falls within a preset position range of the motor idling stroke.

[0066] After obtaining the target reset time, the motor control device controls the motor to perform a reset operation according to the target reset time, so that the reset position of the motor falls within the preset position range of the motor idling stroke, that is, the target reset time is updated to the storage space of the motor control device, so that the motor executes the target reset time when it works next time.

[0067] The target reset time includes the unlock reset time and the lock reset time. After the motor control device updates the unlock reset time to the motor, the motor resets according to the unlock reset time after the next unlock is completed, so that the motor can be reset to the vicinity of the expected unlock reset position A. The motor resets according to the lock reset time after the next lock is completed, so that the motor can be reset to the vicinity of the expected lock reset position B.

[0068] In this embodiment, the motor control device obtains the initial reset time by acquiring the reset time of the motor currently set in the door lock, and determines the idling cycle of the motor during the working process, and then calibrates the initial reset time according to the idling cycle of the motor during the working process to obtain the target reset time, and finally controls the motor according to the target reset time so that the reset position of the motor falls within the preset position range of the motor idling stroke. Calibrating the reset time of the motor according to the idling cycle of the motor during the working process can make the motor reset time adapt to the actual use situation, and can automatically correct the drift of the motor reset stroke distance caused by objective factors, reducing the situation where the motor cannot be accurately reset due to the failure of the motor reset time, thereby effectively reducing the situation of functional abnormalities in the door lock and improving the user experience.

[0069] In one embodiment, the idling cycle includes a locked idling cycle and an unlocked idling cycle. Figure 6 As shown, in step S10, the idling period of the motor during operation is determined, which specifically includes the following steps:

[0070] S11: During the locking process, the working current of the motor is sampled to obtain the locking working current data, and according to the current change in the locking working current data, the duration from the start time to the end time of the idling of the motor during the locking process is determined to obtain the locking idling cycle.

[0071] It should be understood that the current value of the motor in the idling state will be significantly smaller than the current value in other states. When the current suddenly changes from large to small, it can be determined that the motor has entered the idling state, and the start time of the idling can be obtained. When the current suddenly changes from small to large, it can be determined that the idling has ended, and the end time of the idling can be obtained.

[0072] During the locking process, the motor control device needs to sample the working current of the motor, so as to determine the idling period of the motor during the locking process, ie, the locking idling period, according to the sampled current changes.

[0073] That is, during the locking process, it is necessary to sample the working current of the motor to obtain the locking working current data, and determine the duration from the start time of idling to the end time of idling during the locking process according to the current change in the locking working current data, and obtain the locking idling cycle. In the locking process, the motor will first idle and then push out the square tongue, and the time when the motor starts working can be used as the idling start time.

[0074] S12: During the unlocking process, the working current of the motor is sampled to obtain unlocking working current data, and according to the current change in the unlocking working current data, the duration from the start time to the end time of the idling of the motor during the unlocking process is determined to obtain the unlocking idling cycle.

[0075] During the unlocking process, the motor control device needs to sample the working current of the motor, so as to determine the idling period of the motor during the unlocking process, ie, the unlocking idling period, according to the sampled current changes.

[0076] That is, during the unlocking process, it is necessary to sample the working current of the motor to obtain the unlocking working current data, and determine the duration from the start time of idling to the end time of idling during the unlocking process according to the current change in the unlocking working current data, and obtain the unlocking idling cycle. In the unlocking process, the motor will first idle and then push the tongue, and the time when the motor starts working can be used as the idling start time.

[0077] In this embodiment, during the locking process, the working current of the motor is sampled to obtain the locking working current data, and according to the current change in the locking working current data, the duration from the start time of idling to the end time of idling of the motor during the locking process is determined to obtain the locking idling cycle; during the unlocking process, the working current of the motor is sampled to obtain the unlocking working current data, and according to the current change in the unlocking working current data, the duration from the start time of idling to the end time of idling of the motor during the unlocking process is determined to obtain the unlocking idling cycle. The types of idling cycles and the determination methods of each idling cycle are clarified, and the idling cycle is determined by current, that is, the start and end time of idling is determined, which is simple, intuitive and highly accurate.

[0078] In one embodiment, in step S11, sampling the working current of the motor to obtain the locking working current data specifically includes the following steps:

[0079] S111: During the locking process, based on the analog-to-digital converter sampling algorithm, the voltage signal of the sampling resistor connected in series in the driving circuit of the motor is collected to obtain the locking working voltage data of the sampling resistor;

[0080] S111: Convert the locking working voltage data into current to obtain locking working current data.

[0081] In this embodiment, a sampling resistor is pre-connected in series in the motor drive circuit. During the locking process, the motor control device uses an analog to digital converter (ADC) sampling algorithm to collect voltage signals from the sampling resistor connected in series in the motor drive circuit to obtain locking working voltage data of the sampling resistor, and then converts the locking working voltage data into current to obtain locking working current data.

[0082] This method connects a small resistor in series in the drive circuit of the motor. During the locking process, the current on the sampling resistor is sampled in real time through the analog-to-digital converter ADC, and the real-time current waveform is restored. The voltage change on the analog-to-digital converter pin is used to characterize the current change pattern and map it one-to-one with the actual current size, thereby obtaining the locking working current data with higher accuracy.

[0083] In this embodiment, during the locking process, based on the analog-to-digital converter sampling algorithm, the voltage signal of the sampling resistor connected in series in the drive circuit of the motor is collected to obtain the locking working voltage data of the sampling resistor, and then the locking working voltage data is converted into current to obtain the locking working current data. Real-time sampling is achieved through the current on the sampling resistor, and the real-time current waveform is restored with higher accuracy.

[0084] In one embodiment, in step S12, the working current of the motor is sampled to obtain unlocking working current data, and according to the current change in the unlocking working current data, the following steps are specifically included:

[0085] S111: During the unlocking process, based on the analog-to-digital converter sampling algorithm, the voltage signal of the sampling resistor connected in series in the driving circuit of the motor is collected to obtain the unlocking working voltage data of the sampling resistor;

[0086] S111: Convert the unlocking working voltage data into current to obtain unlocking working current data.

[0087] In this embodiment, during the unlocking process, the motor control device uses an ADC sampling algorithm to collect voltage signals from a sampling resistor connected in series in the motor drive circuit to obtain unlocking working voltage data of the sampling resistor, and then converts the unlocking working voltage data into current to obtain unlocking working current data. Real-time sampling is achieved through the current on the sampling resistor, and the real-time current waveform is restored, which is more accurate.

[0088] In other embodiments, during the unlocking process or the locking process, the working current sampling can also be performed by other means. For example, the current consumption of the driving module of the entire motor can be directly sampled to obtain the current flowing through the motor driving module, thereby obtaining the unlocking working current data or the locking working current data of the motor.

[0089] In one embodiment, the initial reset time includes the locking initial reset time and the unlocking initial reset time, and the target reset time includes the locking target reset time and the unlocking target reset time. Figure 7 As shown, in step S20, the initial reset time is calibrated according to the idling period of the motor during operation to obtain the target reset time, which specifically includes the following steps:

[0090] S21: Determine a first idling full cycle and a second idling full cycle.

[0091] The idling full cycle in this embodiment represents the sum of the idling time when the motor is reset (i.e., the reset time) and the idling period in the unlocking process or the locking process. It is necessary to determine the first idling full cycle and the second idling full cycle of the motor, wherein the first idling full cycle is the sum of the idling period when the motor is locked and reset (e.g., the initial reset time of locking) and the unlocking idling period in the subsequent unlocking process, and the second idling full cycle is the sum of the idling period when the motor is unlocked and reset (e.g., the initial reset time of unlocking) and the locking idling period in the subsequent locking process.

[0092] For example, data can be directly collected every time the user opens and closes the door, so as to determine the first idling full cycle and the second idling full cycle. In addition, the first idling full cycle and the second idling full cycle can also be determined in the following manner: a reset time calibration mode can be set for the door lock in advance, and when the reset time calibration mode is triggered by the user, that is, when the user manually triggers the reset time calibration, the motor control device controls the motor to enter the reset time calibration mode. After the motor enters the reset time calibration mode, it will first obtain the reset time of the motor currently set, and then determine the idling cycle of the motor during the working process. The motor will execute the process according to the preset program: lock-reset after lock-unlock-reset after unlock-lock-reset after lock-lock. In this process, the motor is in an idling state from the reset after lock-unlocking process idling end time, and the reset after unlocking-locking process idling end time. The motor control device records the motor from the start time of reset after lock-unlocking to the end time of idling in the unlocking process, and can obtain a continuous idling cycle from reset after lock-unlocking to the end time of idling in the unlocking process, that is, the first idling full cycle. The motor control device records the time from the start of the motor reset after unlocking to the end of the idling time during the locking process, and can obtain a continuous idling cycle from the reset after unlocking to the completion of unlocking, that is, the second idling full cycle. When the reset time calibration mode is triggered, the motor control device can generate a calibration mode reminder and broadcast the calibration mode reminder through voice or other means to inform the user in time and avoid the reset time calibration mode being accidentally interrupted.

[0093] In this embodiment, by setting the reset time calibration mode, the motor can execute a complete and continuous idling cycle, thereby obtaining two idling full cycles of the motor, which is more accurate and does not require complex calculations. There is no need to determine the two idling full cycles through the corresponding data of the unlocking and locking processes in different time periods, and the reset time calibration can be achieved more quickly.

[0094] S22: Determine a first target cycle according to the first idling full cycle, and determine a second target cycle according to the second idling full cycle.

[0095] After the first idling full cycle and the second idling full cycle are obtained, a first target cycle is determined according to the first idling full cycle, and a second target cycle is determined according to the second idling full cycle.

[0096] Among them, the first target cycle is the sum of the preset idling time when the lock is reset and the idling cycle when the lock is unlocked. The preset idling time when the lock is reset is the idling time from the first preset position (the position where the motor starts to push the tongue out, that is, the position at time T2) to the lock reset position (such as point B) during the motor lock reset process. The second target cycle is the sum of the preset idling time when the lock is reset and the lock idling cycle. The preset idling time when the lock is reset is the idling time from the second preset position (the position where the motor starts to retract the tongue, that is, the position at time T1) to the unlock reset position (such as point A) during the motor unlock reset process.

[0097] Since the first target cycle and the second target cycle cannot be accurately calculated based on the motor idling time, it is necessary to perform cycle calculations based on the first idling full cycle and the second idling full cycle, respectively, to obtain the first target cycle and the second target cycle. For example, a calibrated calibration coefficient can be directly obtained, and then the first idling full cycle and the second idling full cycle are multiplied by the calibration coefficient, respectively, to obtain the first target cycle and the second target cycle. The calibration coefficient can be the ratio of the first target cycle (or the second target cycle) of the motor at the time of leaving the factory to the first idling full cycle (or the second idling full cycle), which improves accuracy.

[0098] S23: Calibrate the lock initial reset time according to the first target period to obtain the lock target reset time.

[0099] The motor control device calibrates the locking initial reset time according to the second target period to obtain the locking target reset time, so that the locking reset position of the motor falls within a first preset range of the motor idling stroke.

[0100] For example, when the ratio of the unlocking idling cycle to the first target cycle is not within the preset ratio range, it is determined that the initial locking reset time is invalid, and the locking target reset time needs to be calculated through the first target cycle of the calibrated ratio, so that the locking target reset time is consistent with the first target cycle, and the locking reset position of the motor can fall within the first preset range of the motor idling stroke, and the end time of the locking target reset time always falls within the time period from the first target cycle of the first ratio (such as 45%) to the first target cycle of the second ratio (such as 55%).

[0101] The preset ratio is within a preset ratio range. In one embodiment, the preset ratio may be a ratio of the unlocking idling cycle of the door lock when it leaves the factory to the first target cycle when it leaves the factory, which has higher accuracy.

[0102] S24: Calibrate the unlocking initial reset time according to the second target period to obtain the unlocking target reset time.

[0103] Then, the motor control device calibrates the unlocking initial reset time according to the first target period to obtain the unlocking target reset time, so that the unlocking reset position of the motor falls within the second preset range of the motor idling stroke.

[0104] For example, when the ratio of the lock idling cycle to the second target cycle is not within the preset ratio range, it is determined that the initial unlocking reset time is invalid, and the unlocking target reset time needs to be calculated through the calibrated ratio of the second target cycle, so that the unlocking target reset time is adapted to the second target cycle, and the unlocking reset position of the motor can fall within the second preset range of the motor idling stroke, that is, the end moment of the unlocking target reset time always falls within the time period from the second target cycle of the first ratio (such as 45%) to the second target cycle of the second ratio (such as 55%).

[0105] The preset ratio is within a preset ratio range. In one embodiment, the preset ratio may be a ratio of the locked idle cycle of the door lock when it leaves the factory to the second target cycle when it leaves the factory, which has higher accuracy.

[0106] In this embodiment, by determining the first idling full cycle and the second idling full cycle, then determining the first target cycle according to the first idling full cycle, and determining the second target cycle according to the second idling full cycle, and then calibrating the locking initial reset time according to the first target cycle, the locking target reset time is obtained, so that the end time of the locking target reset time is within the preset time period of the first target cycle, and then calibrating the unlocking initial reset time according to the second target cycle, the unlocking target reset time is obtained, so that the end time of the unlocking target reset time is within the preset time period of the second target cycle. The influence of the motor idling during the opening and closing process on the target cycle of the motor idling is fully considered, and the accuracy of the idling cycle is improved. When calibrating the two reset times, a cross calibration method is adopted, which has higher accuracy.

[0107] In one embodiment, step S21, that is, determining the first idling full cycle and the second idling full cycle, specifically includes the following steps:

[0108] S211: determining an unlocking idling period of the motor during the unlocking process, and determining a locking idling period of the motor during the locking process.

[0109] During the process of locking the lock by the user, the duration from the start time to the end time of the idling of the motor during the locking process is determined, and the locking idling cycle is obtained and recorded. During the process of unlocking the lock by the user, the duration from the start time to the end time of the idling of the motor during the unlocking process is determined, and the unlocking idling cycle is obtained and recorded.

[0110] S212: Add the unlocked idling cycle to the locked initial reset time to obtain a first idling full cycle, and add the locked idling cycle to the unlocked initial reset time to obtain a second idling full cycle.

[0111] After obtaining the unlock idling cycle and the unlock idling cycle, the unlock idling cycle can be added to the locking initial reset time to obtain the first idling full cycle, and the locking idling cycle can be added to the unlock initial reset time to obtain the second idling full cycle.

[0112] like Figure 8 As shown in the figure, the one-way arrow in the figure represents the motor stroke. During the locking process, the motor starts idling from the unlocking reset position point A to the moment T2, and the locking idling cycle a is the time from the unlocking reset position point A to the moment T2; then the motor drives the tongue to be pushed out until it is completely pushed out. The motor stroke of the locking process is Figure 8 The long arrow of the locking process in FIG. 8; thereafter, the motor is reset from the position where the square tongue is fully pushed out to the locking reset position B. The locking reset stroke of the motor is as shown in the short arrow of the locking process in FIG. 8, and the initial locking reset time is b. In the unlocking process, the motor starts idling from the locking reset position B to the moment T1, and the unlocking idling cycle c is the time from the moment of the motor from the locking reset position B to the moment T1; then the motor drives the oblique tongue to retract until it is fully retracted. The motor stroke of this unlocking process is Figure 8 Thereafter, the motor is reset from the fully retracted position of the latch to the unlocking reset position A, and the unlocking reset stroke of the motor is as shown in the one-way short arrow of the locking process in 8, and the initial unlocking reset time is d.

[0113] Since in the actual use of the door lock, the user's unlocking and locking are usually interrupted, that is, the unlocking and resetting process is not continuous with the locking process, it is difficult to obtain the accurate motor idling full cycle at one time. Figure 8 It can be seen that the first idling full cycle is obtained by adding the locking initial reset time b and the unlocking idling cycle c, which fully considers the influence of idling in the process of opening and closing the lock on the idling full cycle, and ensures the accuracy of the first idling full cycle; the second idling full cycle is obtained by adding the unlocking initial reset time d and the locking idling cycle a, which fully considers the influence of idling in the process of opening and closing the lock on the idling full cycle, and ensures the accuracy of the second idling full cycle.

[0114] In this embodiment, the unlocking idling cycle of the motor during the unlocking process is determined, and the locking idling cycle of the motor during the locking process is determined. The unlocking idling cycle is added to the initial reset time for locking to obtain the first idling full cycle, and the locking idling cycle is added to the initial reset time for unlocking to obtain the second idling full cycle. The determination process of the first idling full cycle and the second idling full cycle is clarified, ensuring the accuracy of the first idling full cycle and the second idling full cycle.

[0115] In one embodiment, step S22, that is, determining the first target cycle according to the first idling full cycle, and determining the second target cycle according to the second idling full cycle, specifically includes the following steps:

[0116] S221: Calibrate the first idling full cycle according to the first calibration coefficient to obtain a first target cycle.

[0117] S222: Calibrate the second idling full cycle according to the second calibration coefficient to obtain a second target cycle.

[0118] In this embodiment, after obtaining the first idling full cycle and the second idling full cycle, it is necessary to obtain the first calibration coefficient and the second calibration coefficient that are pre-calibrated and stored. The first calibration coefficient is determined according to the factory unlocking idling cycle and the factory locking reset time of the motor; the second calibration coefficient is determined according to the factory locking idling cycle and the factory unlocking reset time of the motor.

[0119] It should be noted that the motor is in idle state during the entire locking and unlocking reset stroke. Figure 8 As shown, before or when the door lock leaves the factory, the lock reset position of the motor is set at position T2, that is, point B coincides with the corresponding position at time T2. Setting the lock reset position at this position will not affect the handle from fully retracting the tongue. Figure 8 As shown, the motor lock reset time (i.e., the factory lock reset time) is x, and the motor unlock idling period (i.e., the factory unlock idling period) is y, then the factory unlock idling period y is divided by the sum of the factory lock reset time and the factory unlock idling period y to obtain the first calibration coefficient n, i.e., n=y / (x+y).

[0120] Before or when the door lock leaves the factory, the motor's unlocking and resetting position is set at position T1, that is, point A coincides with the corresponding position at time T1. Setting the unlocking and resetting position at this position will not affect the handle from fully retracting and pushing out the tongue. Figure 8 As shown, the motor lock reset time (i.e., factory unlock reset time) is u, and the motor lock idling period (i.e., factory lock idling period) is v. Then, the factory lock idling period v is divided by the sum of the factory unlock reset time u and the factory lock idling period v to obtain the second calibration coefficient m, i.e., m=v / (v+u).

[0121] After obtaining the first calibration coefficient and the second calibration coefficient, the first idling full cycle is calibrated according to the first calibration coefficient to obtain the first target cycle; and the second idling full cycle is calibrated according to the second calibration coefficient to obtain the second target cycle.

[0122] Among them, Figure 8As shown, the first idling full cycle is equal to the sum of the current motor's lock reset time b and unlock idling cycle c, then the first target cycle is equal to (b+c)*n; the second idling full cycle is equal to the sum of the current motor's unlock reset time d and the lock idling cycle a, then the second target cycle is equal to (d+a)*m.

[0123] In this embodiment, the first idling full cycle is calibrated according to the first calibration coefficient to obtain the first target cycle, the first calibration coefficient is determined according to the factory unlocking idling cycle and the factory locking reset time of the motor, and the second idling full cycle is calibrated according to the second calibration coefficient to obtain the second target cycle, the second calibration coefficient is determined according to the factory locking idling cycle and the factory unlocking reset time of the motor. It clarifies the determination process of the first target cycle and the second target cycle, determines the target cycle according to the factory settings and the current idling full cycle of the motor, and ensures the accuracy of the two target cycles.

[0124] In one embodiment, in step S23, that is, calibrating the lock initial reset time according to the first target period to obtain the lock target reset time, specifically includes the following steps:

[0125] S231: Determine whether the ratio of the unlocking idling cycle to the first target cycle is within a first ratio range.

[0126] S232: When the ratio of the unlocking idling cycle to the first target cycle is not within the first ratio range, the locking initial reset time is calibrated according to the unlocking idling cycle, the first target cycle and the first ratio coefficient to obtain the locking target reset time.

[0127] Determine whether the ratio of the unlocking idling cycle c to the first target cycle is within the first ratio range. When the ratio of the unlocking idling cycle c to the first target cycle is not within the first ratio range, it indicates that the door lock can be locked and reset normally, and there is no need to calibrate the locking reset time of the motor. When the ratio of the unlocking idling cycle c to the first target cycle is not within the first ratio range, it indicates that the door lock is abnormal, the motor stroke is drifting, and the current locking reset time (i.e., the locking initial reset time) has expired. It is necessary to calibrate the locking initial reset time according to the unlocking idling cycle, the first target cycle and the first ratio coefficient to obtain the locking target reset time.

[0128] Specifically, Figure 8 As shown, the unlocking idling period c is subtracted from the product of the first target period and the first proportional coefficient to obtain the first calibration time; the locking initial reset time b is added to the first calibration time to obtain the locking target reset time. The locking target reset time is calculated by the formula:

[0129] t rc =b+c-t1*k1;

[0130] Among them, t rc is the target reset time for locking; b is the initial reset time for locking; c-t1*k1 is the first calibration time; c is the unlocking idling period; k1 is the first proportional coefficient; t1 is the first target period; the first target period is (b+c)*n.

[0131] The first proportional range is a pre-calibrated range; and the first proportional coefficient is within the first proportional range.

[0132] Among them, the first proportional range can be a proportional range of 40% to 60%, and the first proportional coefficient can be 45%. Determine whether the ratio of the unlocking idling cycle c to the first target cycle, that is, whether the ratio of c to (b+c)*n is in the first proportional range (40% to 60%), that is, whether the unlocking idling cycle c is within (40% to 60%) of (b+c)*n. When the ratio of the unlocking idling cycle c to the first target cycle is not within the first proportional range (40% to 60%), that is, the unlocking idling cycle c is not within (40% to 60%) of ((b+c)*n), it means that the door lock is abnormal, the motor stroke drifts, and the current lock reset time (that is, the lock initial reset time) has expired. It is necessary to calibrate the lock initial reset time b according to the first proportional coefficient 45%, the first target cycle and the unlocking idling cycle c to obtain the calibrated lock initial reset time, that is, the lock target reset time.

[0133] In this embodiment, the first ratio range may be a ratio range of 40% to 60%, and the first ratio coefficient may be 45%. This is only an exemplary description. In other embodiments, the first ratio range and the first ratio coefficient may also be other values. For example, the first ratio range may be a ratio range of 45% to 65%, or a ratio range of 41% to 60%; the first ratio coefficient may also be 50%, 49%, 48%, 47%, 46%, etc.

[0134] In other embodiments, the first proportionality coefficient may also be the ratio of the default unlocking idling cycle c of the door lock when it leaves the factory to the first target cycle, and may be calibrated according to the factory ratio to improve accuracy.

[0135] In this embodiment, it is determined whether the ratio of the unlocking idling cycle to the first target cycle is within the first proportional range. When the ratio of the unlocking idling cycle to the first target cycle is not within the first proportional range, the lock initial reset time is calibrated according to the unlocking idling cycle, the first target cycle and the first proportional coefficient to obtain the lock target reset time. It clarifies the specific process of calibrating the lock initial reset time. When it is determined that the unlocking idling cycle is not within a certain proportional range of the first target cycle, the lock initial reset time is calibrated based on the unlocking idling cycle, the first target cycle and the first proportional coefficient, and the lock target reset time is obtained by calibration, so that the end moment of the lock target reset time can accurately fall within the preset time period of the motor target cycle.

[0136] In one embodiment, in step S24, that is, calibrating the unlocking initial reset time according to the second target period to obtain the unlocking target reset time, specifically includes the following steps:

[0137] S241: Determine whether the ratio of the locking and idling cycle to the second target cycle is within a second ratio range.

[0138] S242: When the ratio of the locking idling cycle to the second target cycle is not within the second ratio range, the locking initial reset time is calibrated according to the locking idling cycle, the second target cycle and the second ratio coefficient to obtain the unlocking target reset time.

[0139] Determine whether the ratio of the lock-off idling cycle a to the second target cycle is within the second ratio range. When the ratio of the lock-off idling cycle to the second target cycle is within the second ratio range, it indicates that the door lock is unlocked and reset normally, and there is no need to calibrate the unlocking reset time of the motor. When the ratio of the lock-off idling cycle a to the second target cycle is not within the second ratio range, it indicates that the door lock is abnormal, the motor stroke is drifting, and the current unlocking reset time (i.e., the unlocking initial reset time) is invalid. It is necessary to calibrate the unlocking initial reset time according to the lock-off idling cycle, the second target cycle, and the second ratio coefficient to obtain the unlocking target reset time.

[0140] Specifically, Figure 8 As shown, the product of the second target period and the second proportional coefficient is subtracted from the lock idling period a, and the second calibration time is obtained; the unlocking initial reset time d is added to the second calibration time to obtain the unlocking target reset time. Among them, the unlocking target reset time is calculated by the formula:

[0141] t ro =d+a-t2*k2;

[0142] Among them, t rois the unlock target reset time; d is the unlock initial reset time; a-t2*k2 is the second calibration time; a is the lock idling period; k2 is the second proportional coefficient; t2 is the second target period; the second target period is (d+a)*m.

[0143] The first proportional range is a pre-calibrated range; and the first proportional coefficient is within the first proportional range.

[0144] The second proportional range is a pre-calibrated range; the second proportional coefficient is within the second proportional range. The second proportional range may be the same as or different from the first proportional range; the second proportional coefficient may be the same as or different from the first proportional coefficient.

[0145] For example, the second proportional range can be a proportional range of 40% to 60%, and the second proportional coefficient can be 45%. Determine whether the ratio of the locking idling cycle a to the second target cycle, that is, whether the locking idling cycle a is within (40% to 60%) of (d+a)*m. When the ratio of the locking idling cycle a to the second target cycle is not within the second proportional range (40% to 60%), that is, the locking idling cycle a is not within (40% to 60%) of (d+a)*m, it indicates that the door lock is abnormal, the motor stroke is drifting, and the current unlocking reset time (that is, the unlocking initial reset time) has expired. It is necessary to calibrate the unlocking initial reset time according to the second proportional coefficient of 45%, the second target cycle and the second proportional coefficient to obtain the calibrated unlocking initial reset time, that is, the unlocking target reset time.

[0146] In this embodiment, the second proportional range may be the same as the first proportional range, and the second proportional coefficient may be the same as the first proportional coefficient. This is only for exemplary purposes. In other embodiments, the second proportional range may be different from the first proportional range, and the second proportional coefficient may be different from the first proportional coefficient.

[0147] In this embodiment, the second ratio range may be a ratio range of 40% to 60%, and the second ratio coefficient may be 45%. This is only an exemplary description. In other embodiments, the second ratio range and the second ratio coefficient may also be other values. For example, the second ratio range may be a ratio range of 45% to 65%, and the second ratio coefficient may also be 46%, 47%, 48%, 49%, 50%, etc.

[0148] In other embodiments, the second proportional coefficient may also be the ratio of the default locked idling cycle a of the door lock when it leaves the factory to the second target cycle, and may be calibrated according to the factory ratio to improve accuracy.

[0149] In this embodiment, by determining whether the ratio of the locking idling cycle to the second target cycle is within the second ratio range, when the ratio of the locking idling cycle to the second target cycle is not within the second ratio range, the unlocking initial reset time is calibrated according to the locking idling cycle, the second target cycle and the second ratio coefficient to obtain the unlocking target reset time, and the specific process of calibrating the unlocking initial reset time is clarified. When it is determined that the locking idling cycle is not within a certain ratio range of the second target cycle, the unlocking initial reset time is calibrated according to the locking idling cycle, the second target cycle and the second ratio coefficient to obtain the unlocking target reset time, so that the end moment of the unlocking target reset time can accurately fall within the preset time period of the motor target cycle.

[0150] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0151] In one embodiment, a motor control device is provided, which corresponds one-to-one to the motor control method in the above embodiment. Fig. 9 As shown, the motor reset time update includes a determination module 901, a calibration module 902 and a control module 903. Each functional module is described in detail as follows:

[0152] The determination module 901 is used to obtain the reset time of the motor currently set in the door lock, obtain the initial reset time, and determine the idling period of the motor during the working process;

[0153] A calibration module 902 is used to calibrate the initial reset time according to the idling period of the motor during operation to obtain a target reset time;

[0154] The control module 903 is used to control the motor to perform a reset operation according to the target reset time, so that the reset position of the motor falls within a preset position range of the motor idling stroke.

[0155] Optionally, the initial reset time includes a locking initial reset time and an unlocking initial reset time, and the target reset time includes a locking target reset time and an unlocking target reset time. The calibration module 902 is specifically used to:

[0156] Determine a first idling full cycle and a second idling full cycle, the first idling full cycle being the sum of the initial reset time of locking and the unlocking idling cycle in the subsequent unlocking process, and the second idling full cycle being the sum of the initial reset time of unlocking and the locking idling cycle in the subsequent locking process;

[0157] Determine a first target cycle according to the first idling full cycle, and determine a second target cycle according to the second idling full cycle;

[0158] Calibrate the lock initial reset time according to the first target cycle to obtain the lock target reset time, so that the end moment of the lock target reset time is within the preset time period of the first target cycle;

[0159] The locking initial reset time is calibrated according to the second target cycle to obtain the unlocking target reset time, so that the end moment of the unlocking target reset time is within the preset time period of the second target cycle.

[0160] Optionally, the calibration module 902 is further configured to:

[0161] When the ratio of the unlocking idling cycle to the first target cycle is not within the first ratio range, the locking initial reset time is calibrated according to the unlocking idling cycle, the first target cycle and the first ratio coefficient to obtain the locking target reset time.

[0162] Optionally, the calibration module 902 is further configured to:

[0163] When the ratio of the locking idling cycle to the second target cycle is not within the second ratio range, the unlocking initial reset time is calibrated according to the locking idling cycle, the second target cycle and the second ratio coefficient to obtain the unlocking target reset time.

[0164] Optionally, the calibration module 902 is further configured to:

[0165] The first idling full cycle is calibrated according to a first calibration coefficient to obtain a first target cycle, wherein the first calibration coefficient is determined according to the factory unlocking idling cycle and the factory locking reset time of the motor;

[0166] The second idling full cycle is calibrated according to the second calibration coefficient to obtain a second target cycle. The second calibration coefficient is determined according to the factory locked idling cycle and the factory unlocked reset time of the motor.

[0167] Optionally, the idling cycle includes a locked idling cycle and an unlocked idling cycle, and the determination module 901 is specifically used to:

[0168] During the locking process, the working current of the motor is sampled to obtain locking working current data, and according to the current change in the locking working current data, the duration from the start time of idling to the end time of idling of the motor during the locking process is determined to obtain the locking idling cycle;

[0169] During the unlocking process, the working current of the motor is sampled to obtain the unlocking working current data, and according to the current change in the unlocking working current data, the duration from the start time to the end time of the idling of the motor during the unlocking process is determined to obtain the unlocking idling cycle.

[0170] Optionally, the determining module 901 is further configured to:

[0171] During the locking process, based on the analog-to-digital converter sampling algorithm, the voltage signal of the sampling resistor connected in series in the motor drive circuit is collected to obtain the locking working voltage data of the sampling resistor;

[0172] The locking working voltage data is converted into current to obtain locking working current data.

[0173] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0174] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0175] The present application also provides an electronic control device, which is an electronic device such as Fig.10 As shown, the electronic device 2 includes: at least one processor 20, a memory 21, and a computer program 23 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps in any of the above-mentioned method embodiments when executing the computer program 23, or implements the functions of each module / unit in the above-mentioned device embodiments when executing the computer program 23.

[0176] Exemplarily, the computer program 23 may be divided into one or more modules / units, which are stored in the memory 21 and executed by the processor 20 to complete the present application. The one or more modules / units may be a series of computer program 23 instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 23 in the electronic device 2.

[0177] Those skilled in the art will understand that Fig.10 These are merely examples of the computer device and do not constitute a limitation of the computer device. The computer device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0178] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0179] The memory may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. The memory may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Furthermore, the memory may also include both an internal storage unit of the computer device and an external storage device.

[0180] An embodiment of the present application further provides a readable storage medium, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0181] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0182] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0183] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0184] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0185] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0186] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0187] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A motor control method, characterized in that: include: Obtaining the reset time of the motor currently set in the door lock, obtaining the initial reset time, and determining the idling period of the motor during operation; Calibrate the initial reset time according to the idling period of the motor during operation to obtain a target reset time; The motor is controlled to perform a reset operation according to the target reset time, so that the reset position of the motor falls within a preset position range of the motor idling stroke.

2. The motor control method according to claim 1, characterized in that: The initial reset time includes a locking initial reset time and an unlocking initial reset time, the target reset time includes a locking target reset time and an unlocking target reset time, and the initial reset time is calibrated according to the idling period of the motor during operation to obtain the target reset time, including: Determine a first idling full cycle and a second idling full cycle, wherein the first idling full cycle is the sum of the locking initial reset time and the unlocking idling cycle in the subsequent unlocking process, and the second idling full cycle is the sum of the unlocking initial reset time and the locking idling cycle in the subsequent locking process; determining a first target cycle according to the first idling full cycle, and determining a second target cycle according to the second idling full cycle; Calibrate the lock initial reset time according to the first target period to obtain the lock target reset time; The unlocking initial reset time is calibrated according to the second target period to obtain the unlocking target reset time.

3. The motor control method according to claim 2, characterized in that: The determining of the first target cycle according to the first idling full cycle, and the determining of the second target cycle according to the second idling full cycle, comprises: Calibrate the first idling full cycle according to a first calibration coefficient to obtain the first target cycle, wherein the first calibration coefficient is determined according to the factory unlocking idling cycle and the factory locking reset time of the motor; The second idling full cycle is calibrated according to a second calibration coefficient to obtain the second target cycle, wherein the second calibration coefficient is determined according to the factory locked idling cycle and the factory unlocked reset time of the motor.

4. The motor control method according to claim 2, characterized in that: The step of calibrating the lock initial reset time according to the first target period to obtain the lock target reset time includes: When the ratio of the unlocking idling cycle to the first target cycle is not within a first ratio range, the locking initial reset time is calibrated according to the unlocking idling cycle, the first target cycle and a first ratio coefficient to obtain the locking target reset time.

5. The motor control method according to claim 2, characterized in that: The step of calibrating the unlocking initial reset time according to the second target period to obtain the unlocking target reset time includes: When the ratio of the locking idling cycle to the second target cycle is not within a second ratio range, the unlocking initial reset time is calibrated according to the locking idling cycle, the second target cycle and a second ratio coefficient to obtain the unlocking target reset time.

6. The motor control method according to any one of claims 1 to 5, characterized in that: The idling cycle includes a locking idling cycle and an unlocking idling cycle, and determining the idling cycle of the motor during operation includes: In the locking process, the working current of the motor is sampled to obtain locking working current data, and according to the current change in the locking working current data, the duration from the idling start time to the idling end time of the motor in the locking process is determined to obtain the locking idling cycle; During the unlocking process, the working current of the motor is sampled to obtain the unlocking working current data, and according to the current change in the unlocking working current data, the duration from the start time to the end time of the idling of the motor in the unlocking process is determined to obtain the unlocking idling cycle.

7. The motor control method according to claim 6, characterized in that: The step of sampling the working current of the motor to obtain locking working current data includes: During the locking process, based on the analog-to-digital converter sampling algorithm, the voltage signal of the sampling resistor connected in series in the driving circuit of the motor is collected to obtain the locking working voltage data of the sampling resistor; The locking working voltage data is converted into current to obtain the locking working current data.

8. A motor control device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the motor control method according to any one of claims 1 to 7 are implemented.

9. A door lock, characterized in that: It comprises a motor and the motor control device as claimed in claim 8.

10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the motor control method according to any one of claims 1 to 7 are implemented.