Motor detection method, device, equipment, storage medium and program product

By introducing detection of working power and current slope in the motor in place detection, the problem that the motor still needs to withstand the duration of the locking current in the prior art after reaching the locking current is solved, and more efficient motor in place detection and longer service life are achieved.

CN119535208APending Publication Date: 2025-02-28NINGBO GONEO ELECTRIC APPLIANCE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411672294.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

After the existing motor in-place detection method reaches the blockage current, the motor needs to withstand a duration of blockage current, which affects the service life of the motor and has a low detection efficiency.

Method used

By introducing working power to participate in motor placement detection, the operating power and current slope of the motor are obtained, and the motor stops rotation in response to at least one of the motor stop requirements.

Benefits of technology

Accurate motor operating status detection based on multi-dimensional detection parameters is realized, ensuring that the motor stops in time when it reaches the predetermined position, avoid excessive rotation or inadequate conditions, extend the motor service life and improve detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119535208A_ABST
    Figure CN119535208A_ABST
Patent Text Reader

Abstract

The invention discloses a motor detection method, device and equipment, a storage medium and a program product, and relates to the technical field of intelligent locks. The method comprises the steps that in response to a received driving signal, a motor in the intelligent lock equipment is driven to rotate and work, and the motor is used for controlling the intelligent lock equipment to be locked or unlocked; in the rotating working process of the motor, the working power of the motor at the first moment is obtained; the current slope of the motor at the first moment is obtained, and the current slope is used for indicating the current change speed of the working current of the motor within the preset duration interval before the first moment; the motor is controlled to stop rotating in response to the fact that at least one of the working power and the current slope meets the motor stop requirement, the running state of the motor can be accurately detected based on the multi-dimensional detection parameters, braking is conducted in time when the motor is close to the in-place state, the conditions such as locked-rotor or overload are reduced, the service life of the motor is prolonged, and the in-place detection efficiency of the motor is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart lock technology, and in particular to a motor detection method, device, equipment, storage medium and program product. Background Art

[0002] In various automation and control applications, motor in-position detection is a key function that ensures that the motor can accurately stop at the predetermined position, which is essential to ensure the accuracy and safety of mechanical operation.

[0003] The related technology mainly relies on the stall current detection method, which determines whether the motor has reached the predetermined position or encountered an obstacle by monitoring the current changes during the startup and operation of the motor. The specific method includes using a current sensor to monitor the motor current in real time and setting a current threshold. When the current exceeds this threshold and lasts for a certain period of time, the system will determine that the motor has reached the desired position or has stalled, thereby triggering the corresponding control logic.

[0004] However, in the above method, in the motor in-place detection, after reaching the stall current, the motor still needs to withstand the stall current for a period of time, which affects the service life of the motor, and the efficiency of the motor in-place detection is low. Summary of the invention

[0005] The embodiments of the present application provide a motor detection method, device, equipment, storage medium and program product, which can improve the efficiency of motor detection. The technical solution is as follows.

[0006] In one aspect, a motor detection method is provided, the method comprising:

[0007] In response to receiving a driving signal, driving a motor in the smart lock device to rotate, the motor being used to control the smart lock device to lock or unlock;

[0008] During the rotation of the motor, the working power of the motor at a first moment is obtained; and the current slope of the motor at the first moment is obtained, wherein the current slope is used to indicate the current change speed of the working current of the motor within a preset time interval before the first moment;

[0009] In response to at least one of the operating power and the current slope meeting a motor stop requirement, the motor is controlled to stop rotating.

[0010] In another aspect, a motor detection device is provided, the device comprising:

[0011] A control module, configured to drive a motor in the smart lock device to rotate in response to receiving a drive signal, wherein the motor is configured to control the smart lock device to lock or unlock;

[0012] an acquisition module, used to acquire the working power of the motor at a first moment during the rotation of the motor; and to acquire the current slope of the motor at the first moment, wherein the current slope is used to indicate the current change speed of the working current of the motor within a preset time interval before the first moment;

[0013] The control module is further configured to control the motor to stop rotating in response to at least one of the operating power and the current slope meeting the motor stop requirement.

[0014] In some embodiments, the control module is further used to:

[0015] In response to the operating power reaching a preset power threshold, controlling the motor to stop rotating; or,

[0016] In a case where the operating power does not reach the preset power threshold, in response to the current slope reaching a preset slope threshold, the motor is controlled to stop rotating.

[0017] In some embodiments, the control module is further used to:

[0018] Recording the working time of the motor;

[0019] When the working power does not reach the preset power threshold and the current slope does not reach the preset slope threshold, in response to the working duration reaching the preset duration threshold, the motor is controlled to stop rotating.

[0020] In some embodiments, the acquisition module is further used to record the working time of the motor;

[0021] The control module is further configured to control the motor to stop rotating in response to the working time exceeding the starting time and the working power reaching the preset power threshold, wherein the starting time is the time from the starting moment of the motor until the working current reaches the stall current threshold; or

[0022] The control module is further configured to control the motor to stop rotating in response to the working time exceeding the starting time and the current slope reaching the preset slope threshold when the working power does not reach the preset power threshold.

[0023] In some embodiments, the acquisition module is further used to:

[0024] Recording the operating voltage threshold of the motor during the j-th rotation as the reference voltage threshold, where j is a positive integer;

[0025] In response to the difference between the operating voltage threshold value acquired during the k-th rotation and the reference voltage threshold value meeting the threshold adjustment requirement, determining an adjustment coefficient based on the degree of change of the operating voltage threshold value relative to the reference voltage threshold value, and updating the operating voltage threshold value acquired during the k-th rotation to the reference voltage threshold value, where k is a positive integer and k>j;

[0026] The preset power threshold and the preset slope threshold are adjusted based on the adjustment coefficient.

[0027] In some embodiments, the acquisition module is further used to:

[0028] Obtaining the remaining power of the smart lock device;

[0029] The preset power threshold and the preset slope threshold are dynamically adjusted based on the remaining power, wherein, in response to the degree of change of the remaining power relative to the remaining power in a historical time period reaching a preset program threshold, the preset power threshold and the preset slope threshold are adjusted according to the remaining power ratio, the remaining power ratio is the ratio between the remaining power and the device power threshold, and the device power threshold is used to indicate the maximum remaining power of the smart lock device.

[0030] In some embodiments, the control module is further used to:

[0031] When the remaining power of the smart lock device does not drop to the preset power threshold, a first preset power threshold and a first preset slope threshold are adopted;

[0032] In response to the remaining power of the smart lock device dropping to a preset power threshold, automatically turning on an energy-saving mode, wherein the energy-saving mode is used to instruct the smart lock device to adopt a second preset power threshold and a second preset slope threshold;

[0033] The first preset power threshold is greater than the second preset power threshold, and the first preset slope threshold is greater than the second preset slope threshold.

[0034] In some embodiments, the acquisition module is further used to:

[0035] During the rotation of the motor, at least one of the working voltage and the working current of the motor is collected at preset time intervals;

[0036] Determine a first operating power based on at least one of the operating voltage and the operating current acquired at the first moment;

[0037] Determine a second working power based on at least one of the working voltage and the working current acquired at a second moment, where the second moment is a moment acquired by shifting the first moment forward by the preset time interval;

[0038] The average power between the first working power and the second working power is determined as the working power of the motor at the first moment.

[0039] In some embodiments, the acquisition module is further used to:

[0040] Determine a first working current based on the working voltage acquired at the first moment, or use the working current acquired at the first moment as the first working current;

[0041] Determine a second working current based on the working voltage acquired at the second moment, or use the working current acquired at the second moment as the second working current;

[0042] The current slope at the first moment is obtained by determining a ratio of a current difference between the first working current and the second working current to the preset time interval.

[0043] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the motor detection method as described in any of the above-mentioned embodiments of the present application.

[0044] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a motor detection method as described in any of the above-mentioned embodiments of the present application.

[0045] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any of the motor detection methods described in the above embodiments.

[0046] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0047] By introducing working power to participate in motor in-place detection, the motor is controlled to stop rotating when at least one of the working power and the current slope meets the motor stop requirements. The operating status of the motor can be accurately detected based on multi-dimensional detection parameters to ensure that the motor stops in time when it reaches the predetermined position, avoiding excessive rotation or out of position. The motor can also be braked in advance when it is close to being in position, reducing damage to the motor due to stalling or overload, extending the service life of the motor, and improving the efficiency of motor in-place detection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 is a schematic diagram of a motor detection system provided by an exemplary embodiment of the present application;

[0050] Figure 2 is a flow chart of a motor detection method provided by an exemplary embodiment of the present application;

[0051] Figure 3 is a motor detection logic flow chart provided by an exemplary embodiment of the present application;

[0052] Figure 4 is a flow chart of a motor control method provided by an exemplary embodiment of the present application;

[0053] Figure 5 is a schematic diagram of a motor detection process provided by an exemplary embodiment of the present application;

[0054] Figure 6 is a structural block diagram of a motor detection device provided by an exemplary embodiment of the present application;

[0055] Figure 7 It is a structural block diagram of a terminal provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0057] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0058] In various automation and control applications, motor in-place detection is a key function that ensures that the motor can stop accurately at the predetermined position, which is essential to ensure the accuracy and safety of mechanical operation. In the related technology, it mainly relies on the stall current detection method, which determines whether the motor has reached the predetermined position or encountered an obstacle by monitoring the current changes during the startup and operation of the motor. The specific method includes using a current sensor to monitor the motor current in real time and setting a current threshold. When the current exceeds this threshold and lasts for a certain period of time, the system will determine that the motor is in place or has stalled, thereby triggering the corresponding control logic. However, in the above method, in the motor in-place detection, after reaching the stall current, the motor still needs to withstand the stall current for a period of time, which affects the service life of the motor, and the efficiency of the motor in-place detection is low.

[0059] The motor detection method provided in the embodiment of the present application introduces working power to participate in motor arrival detection, and controls the motor to stop rotating when at least one of the working power and the current slope meets the motor stop requirements. It can accurately detect the operating status of the motor based on multi-dimensional detection parameters to ensure that the motor stops in time when it reaches a predetermined position, avoiding excessive rotation or out of position, and can brake the motor in advance when it is close to being in position, thereby reducing damage to the motor due to stalling or overload, extending the service life of the motor, and improving the efficiency of motor arrival detection.

[0060] First, the motor detection system of this application is introduced. Please refer to Figure 1 , which shows a schematic diagram of a motor detection system provided by an exemplary embodiment of the present application, wherein the motor detection system includes: a smart lock device 110.

[0061] The smart lock device 110 is used to achieve the locking or unlocking function. The smart lock device 110 includes a motor. The smart lock device 110 achieves the locking or unlocking function by driving the motor to rotate.

[0062] Optionally, the smart lock device includes but is not limited to a smart door lock, a smart locker lock, a smart bicycle lock, or any other smart device that drives a motor to rotate to lock or unlock based on a drive signal.

[0063] Smart lock devices can support multiple smart unlocking (or locking) methods, including but not limited to password input, fingerprint recognition, Bluetooth communication and integrated circuit (IC) card authentication and other unlocking (or locking) methods.

[0064] In some embodiments, the smart lock device receives a driving signal to drive the motor to rotate.

[0065] The driving signal is a signal received by the smart lock device based on an unlocking or locking operation. The driving signal is used to drive the motor to rotate and change the lock body state of the smart lock device, including driving the motor to rotate to unlock, or driving the motor to rotate to lock.

[0066] It is worth noting that the above-mentioned smart lock device is only an illustrative example and is not limited to the embodiments of the present application.

[0067] In some embodiments, the smart lock device 110 drives the motor in the smart lock device to rotate in response to receiving a driving signal, and the motor is used to control the smart lock device to lock or unlock; during the rotation of the motor, the working power of the motor at the first moment is obtained; and the current slope of the motor at the first moment is obtained, wherein the current slope is used to indicate the current change rate of the working current of the motor within a preset time interval before the first moment; in response to at least one of the working power and the current slope meeting the motor stop requirement, the motor is controlled to stop rotating.

[0068] Optionally, the motor detection system may also include a terminal device 10 and a server 20, and the terminal device 10, the server 20 and the smart lock device 110 are connected via a network.

[0069] The terminal device 10 and the server 20 can be driving devices that send driving signals to the smart lock device 110, or can be detection devices used to assist the smart lock device 110 in performing remote motor detection, which is not limited in the embodiments of the present application.

[0070] Schematically, taking the example that the terminal device 10 is a driving device for sending a driving signal and the server 20 is a detection device for performing motor detection, the terminal device 10 receives an unlocking key input by a user, and in response to the unlocking key being consistent with a preset key, generates and sends a driving signal to the smart lock device 110; the smart lock device 110 drives the motor to rotate based on the driving signal, and during the motor rotation process, the server 20 obtains the working power of the motor at the first moment, and obtains the current slope of the motor at the first moment, and in response to at least one of the working power and the current slope meeting the motor stop requirement, generates and sends a stop signal to the smart lock device 110; the smart lock device 110 controls the motor to stop rotating in response to the stop signal.

[0071] The above-mentioned terminal is optional. The terminal can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a smart TV, a smart car, and other forms of terminal devices, which are not limited to the embodiments of the present application.

[0072] It is worth noting that the above-mentioned servers can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud security, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0073] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant regions. For example, the operation data and account information involved in this application are all obtained with full authorization.

[0074] To further explain, before collecting relevant data of users (for example, account information, historical operation data, and real-time operation data involved in this application) and during the process of collecting relevant data of users, this application can display a prompt interface, pop-up window, or output voice prompt information. The prompt interface, pop-up window, or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining relevant data of users after obtaining the confirmation operation issued by the user to the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user to the prompt interface or pop-up window is not obtained), the relevant steps of obtaining relevant data of users are terminated, that is, the relevant data of users are not obtained. In other words, all user data collected by this application are collected with the consent and authorization of the user, and the collection, use, and processing of relevant user data need to comply with the relevant laws, regulations, and standards of the relevant regions.

[0075] For illustration, please refer to Figure 2, which shows a flowchart of a motor detection method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a smart lock device as an example for explanation. Figure 2 As shown, the method comprises the following steps:

[0076] Step 210, in response to receiving the driving signal, driving the motor in the smart lock device to rotate.

[0077] The motor is used to control the smart lock device to lock or unlock.

[0078] Optionally, the smart lock device includes but is not limited to a smart door lock, a smart locker lock, a smart bicycle lock, or any other smart device that drives a motor to rotate to lock or unlock based on a drive signal.

[0079] Smart lock devices can support multiple smart unlocking methods, including but not limited to password input, fingerprint recognition, iris recognition, voiceprint recognition, Bluetooth communication and integrated circuit (IC) card verification.

[0080] The driving signal is a signal received by the smart lock device based on an unlocking operation or a locking operation. The driving signal is used to drive the motor to rotate and change the lock body state of the smart lock device, including driving the motor to rotate to unlock, or driving the motor to rotate to lock.

[0081] Illustratively, taking a password door lock as an example, in response to the input password received by the door lock matching the preset unlocking password, a drive signal is generated to drive the motor in the door lock to rotate.

[0082] It is worth noting that the above-mentioned smart lock device is only an illustrative example and is not limited to the embodiments of the present application.

[0083] Step 220, during the rotation of the motor, obtaining the working power of the motor at the first moment; and obtaining the current slope of the motor at the first moment.

[0084] The current slope is used to indicate the current change speed of the working current of the motor within a preset time interval before the first moment.

[0085] Optionally, the working power and the current slope may be obtained in parallel, or the working power may be obtained first, and when the working power does not reach a preset power threshold, the current slope may be obtained. This is not limited in the embodiments of the present application.

[0086] In some embodiments, during the rotation of the motor, at least one of the operating voltage and the operating current of the motor is collected to determine the operating power and the current slope.

[0087] The operating voltage is the voltage of the actual load of the motor when the motor is running, and the operating current is the current actually passing through the motor when the motor is running.

[0088] The working current is related to the motor load. When the motor load increases, in order to maintain the motor speed or rotation, the motor needs to generate a larger torque, and the torque is positively correlated with the working current. Therefore, the working current is positively correlated with the motor load. The larger the motor load, the greater the working current.

[0089] Optionally, the working power and the current slope can be determined by collecting the working voltage, or by collecting the working current. The working power and the current slope can also be determined by collecting the working voltage and the working current together. The working power can also be determined by collecting the working voltage and the current slope can be determined by collecting the working current, etc. The embodiments of the present application are not limited to this.

[0090] Schematically, taking the parallel acquisition of working power and current slope as an example, assuming that the working power and current slope are determined by collecting the working voltage, the working power and current slope can be calculated in parallel after collecting the working voltage; taking the acquisition of the working power first and then the current slope as an example, assuming that the working power is determined by collecting the working voltage and the current slope is determined by collecting the working current, the working voltage is collected to calculate the working power, and when the working power does not reach the preset power threshold, the working current is collected to calculate the current slope.

[0091] It is worth noting that the above-mentioned order of obtaining the working power and current slope, and the determination method are only illustrative examples, and the embodiments of the present application are not limited to this.

[0092] The working power at the first moment mentioned above may be the instantaneous power generated by the motor at the first moment, or may be the average power generated by the motor in a preset time period before the first moment, and the embodiment of the present application is not limited to this.

[0093] Illustratively, assuming that the motor corresponds to a first resistor, and taking the working power as the instantaneous power generated by the motor at the first moment as an example, the working power at the first moment is determined based on at least one of the working voltage and the working current collected at the first moment. For example, taking the collection of the working voltage as an example, the working voltage collected at the first moment is obtained, the working current at the first moment is determined based on the ratio of the working voltage to the first resistance, and the working power at the first moment is determined based on the product of the working voltage and the working current.

[0094] The method provided in the embodiment of the present application can make the working power feedback the motor state in real time by directly using instantaneous power as the working power involved in the motor in-place detection, and can accurately reflect the working state of the motor at a specific moment, which is beneficial to the real-time and accuracy of the motor in-place detection. The instantaneous power can quickly respond to changes in the motor state, especially when the motor is started or the load changes suddenly, which helps to avoid system failure or performance degradation caused by delayed processing, and real-time power detection can help diagnose potential faults of the motor, such as load overload, abnormal speed, etc., and can detect motor failures in time. On the other hand, the collection of real-time power data can provide complete motor operation data, which can be centrally stored to ensure data integrity, help automatically adjust the motor's operating parameters, and improve the performance and reliability of the motor.

[0095] Taking the example that the working power is the average power generated by the motor in a preset time period before the first moment, during the rotation of the motor, at least one of the working voltage and working current of the motor can be collected at preset time intervals, and the first working power is determined based on at least one of the working voltage and working current collected at the first moment, and the second working power is determined based on at least one of the working voltage and working current collected at the second moment. The average power between the first working power and the second working power is determined as the working power of the motor at the first moment, and the second moment is the collection moment that is moved forward by the preset time interval from the first moment.

[0096] The method provided in the embodiment of the present application, since the motor may be affected by instantaneous voltage fluctuations or load changes during operation, resulting in instantaneous peak values ​​in the power readings, by adopting average power as the working power involved in motor in-place detection, the influence of instantaneous fluctuations can be reduced, so that the working power can adapt to the dynamic changes of the motor, and the stability and reliability of the working power are improved; and due to noise influence or measurement errors, the power value of a single measurement may not be accurate enough, and adopting average power as the working power can reduce the influence of noise and random errors and improve the accuracy of the working power; on the other hand, the average power can better reflect the actual working state of the motor within a preset time interval, rather than an abnormal value at a certain moment, which is conducive to evaluating the stability of the motor, and when the motor is started or the load suddenly changes, a short period of high power consumption may occur, and the use of average power can avoid misjudgment caused by these short-term phenomena, thereby ensuring the accuracy of motor in-place detection.

[0097] Taking the collection of working voltage as an example, the process of determining the working power includes collecting the working voltage of the motor at preset time intervals, determining the first working power based on the first working voltage collected at the first moment, determining the second working power based on the second working voltage collected at the second moment, and determining the average working power between the first working power and the second working power as the working power of the motor at the first moment. The second moment is the collection moment that is moved forward by a preset time interval from the first moment.

[0098] When determining the instantaneous power corresponding to the current moment, the working current can be determined based on the ratio between the currently acquired working voltage and the motor resistance, and the working power can be determined based on the product between the working voltage and the working current.

[0099] For example, the working power determination method based on the working voltage is shown in the following formula 1:

[0100] P=((V1×V1) / R+(V2×V2) / R)÷2Formula 1,

[0101] Among them, P is the working power at the first moment, V1 is the first working voltage collected at the first moment, V2 is the second working voltage collected at the second moment, and R is the motor resistance.

[0102] The method provided in the embodiment of the present application, by collecting the working voltage to participate in determining the working power, can reflect comprehensive motor status information based on the working voltage, including the power supply condition and electrical performance of the motor. By measuring the working voltage, it can be understood whether the motor is working under the rated voltage, which is beneficial to evaluating the operating efficiency and safety of the motor; and collecting the working voltage can assist in determining the working current, thereby jointly analyzing the working voltage and the working current, improving the motor control accuracy, while reducing parameter measurement elements and reducing measurement costs.

[0103] Taking the collection of working current as an example, the process of determining the working power includes collecting the working current of the motor at preset time intervals, determining the first working power based on the first working current collected at the first moment, determining the second working power based on the second working current collected at the second moment, and determining the average working power between the first working power and the second working power as the working power of the motor at the first moment. The second moment is the collection moment that is moved forward by the preset time interval from the first moment.

[0104] When determining the instantaneous power corresponding to the current moment, the working voltage can be determined based on the product between the currently acquired working current and the motor resistance, and the working power can be determined based on the product between the working voltage and the working current.

[0105] For example, the working power determination method based on the working current is shown in the following formula 2:

[0106] P=((I1×R)×I1+(I2×R)×I2)÷2Formula 2,

[0107] Among them, P is the working power at the first moment, I1 is the first working current collected at the first moment, I2 is the second working current collected at the second moment, and R is the motor resistance.

[0108] The method provided in the embodiment of the present application can monitor the working current of the motor in real time by collecting the working current to participate in determining the working power, and accurately control and protect the motor based on the working current, which is conducive to detecting and preventing the motor from stalling, reducing the situation where the motor generates stalling current, and extending the service life of the motor.

[0109] Taking the collection of working voltage and working current as an example, the process of determining the working power includes collecting the working voltage and working current of the motor at preset time intervals, determining the first working power based on the first working voltage and the first working current collected at the first moment, determining the second working power based on the second working voltage and the second working current collected at the second moment, and determining the average working power between the first working power and the second working power as the working power of the motor at the first moment, and the second moment is the collection moment that is moved forward by the preset time interval from the first moment.

[0110] When determining the instantaneous power corresponding to the current moment, the operating power may be determined based on the product of the currently acquired operating current and the operating voltage.

[0111] Schematically, the working power determination method based on the working voltage and working current is shown in the following formula 3:

[0112] P=(V1×I1+V2×I2)÷2Formula 3,

[0113] Among them, P is the working power at the first moment, V1 is the first working voltage collected at the first moment, I1 is the first working current collected at the first moment, V2 is the second working voltage collected at the second moment, and I2 is the second working current collected at the second moment.

[0114] The method provided in the embodiment of the present application, by collecting the working current and the working voltage to participate in determining the working power, can jointly monitor the working current and the working voltage, reduce the amount of equipment calculation, and improve the precision and accuracy of the working power. It can not only accurately reflect the performance of the motor, but also detect and prevent the motor from stalling, thereby improving the motor control efficiency.

[0115] In some embodiments, the process of determining the current slope includes determining the first working current based on the working voltage collected at the first moment, or using the working current collected at the first moment as the first working current; determining the second working current based on the working voltage collected at the second moment, or using the working current collected at the second moment as the second working power; determining the ratio of the difference between the first working current and the second working current to a preset time interval to obtain the current slope at the first moment, and the second moment is the collection moment of the first moment moved forward by the preset time interval.

[0116] When the operating current is determined based on the operating voltage, the operating current may be determined based on the ratio between the operating voltage and the motor resistance.

[0117] Schematically, the current slope is determined by referring to the following formula 4:

[0118] K=(I1-I2)÷T=(V1 / R-V2 / R)÷TFormula 4,

[0119] Among them, K is the working slope at the first moment, I1 is the first working current, I2 is the second working current, V1 is the working voltage collected at the first moment, V2 is the working voltage collected at the second moment, R is the motor resistance, and T is the preset time interval.

[0120] The method provided in the embodiment of the present application determines the current slope based on the collected working voltage, which can avoid the current signal being affected by electromagnetic interference or signal noise, resulting in inaccurate current detection, thereby resulting in low accuracy of the current slope. By collecting the working voltage to participate in the calculation of the current slope, the influence of noise on the measurement result can be reduced to a certain extent, thereby improving the reliability of the current slope.

[0121] It is worth noting that the above-mentioned method of obtaining the working power and the current slope is only an illustrative example and is not limited to this in the embodiments of the present application.

[0122] Step 230 , in response to at least one of the operating power and the current slope meeting the motor stop requirement, controlling the motor to stop rotating.

[0123] For smart lock devices, when the driving motor rotates to unlock or lock, the motor needs to be rotated to a specified position to achieve unlocking or locking. After the motor rotates to the specified position, the motor needs to be controlled to stop rotating in time to avoid generating stall current and affecting the service life of the motor.

[0124] The motor stop request is used to instruct the motor to stop when it reaches a specified position.

[0125] In some embodiments, it takes a certain amount of time for the motor to stop rotating. In order to prevent the motor from continuing to rotate after it is in place and generating a stall current, the motor can be driven to brake in advance when the motor approaches the specified position to avoid generating a stall current. The motor stop requirement includes the motor reaching a preset position (i.e., close to the specified position for unlocking or locking).

[0126] During normal operation after the motor is started, the motor's operating power will remain within a relatively stable value range. When the motor is close to being in place or encounters an obstacle (stuck), the motor requires a larger torque to overcome the resistance and consumes more power. Therefore, the comparison between the operating power and the preset power threshold can be used to determine whether the motor meets the motor stop requirements.

[0127] Illustratively, the motor stop requirement includes the operating power reaching a preset power threshold.

[0128] The preset power threshold is used to indicate the working power consumed by the motor when the motor rotates to a preset position (close to the position).

[0129] When the resistance to unlocking or locking the smart lock device is low, the motor may not need very high working power to rotate to unlock or lock. In this case, the working power of the motor may always be lower than the preset power threshold, but because the resistance suddenly increases when it is close to the position, the current changes greatly and the current slope will increase rapidly. Therefore, when the working power does not reach the preset power threshold, the comparison relationship between the current slope and the preset slope threshold can be used to determine whether the motor meets the motor stop requirements.

[0130] Illustratively, the motor stop requirement includes that the current slope reaches a preset slope threshold when the operating power does not reach a preset power threshold.

[0131] The preset slope threshold is used to indicate the current slope of the motor when the motor rotates to a preset position (close to the in-position).

[0132] Optionally, in response to the operating power reaching a preset power threshold, the motor is controlled to stop rotating; or, when the operating power does not reach the preset power threshold, in response to the current slope reaching a preset slope threshold, the motor is controlled to stop rotating.

[0133] Controlling the motor to stop rotating includes controlling the motor to brake and reverse until the motor stops rotating.

[0134] For illustration, please refer to Figure 3 , Figure 3 is a motor detection logic flow chart provided by an exemplary embodiment of the present application, such as Figure 3As shown, in the motor control process of the smart lock device, step 310 is executed in sequence to receive the driving signal; step 320 is to drive the motor to rotate; step 330 is to read the working voltage of the motor; step 340 is to read the working voltage of the motor again and calculate the working power of the motor based on the two working voltages; step 350 is to determine whether the working power reaches a preset power threshold, and in response to the working power reaching the preset power threshold, step 380 is executed, otherwise step 360 is executed; step 360 is to calculate the current slope; step 370 is to determine whether the current slope reaches a preset current threshold, and in response to the current slope reaching the preset current threshold, step 380 is executed; step 380 is to control the motor to stop rotating.

[0135] In some embodiments, during the starting phase of the motor, since it needs to start rotating from a stationary state, the resistance is relatively large, and the motor is prone to generate a stall current during the starting phase, resulting in a large working power and current slope. In order to avoid misjudgment of whether the motor is in place due to the stall current during the starting phase, the working power and current slope after the starting phase of the motor can be detected to participate in detecting whether the motor is in place.

[0136] Indicatively, the working time of the motor is recorded. In response to the working time exceeding the starting time and the working power reaching a preset power threshold, the motor is controlled to stop rotating; or, in the case where the working power does not reach the preset power threshold, in response to the working time exceeding the starting time and the current slope reaching a preset slope threshold, the motor is controlled to stop rotating.

[0137] The starting time is the time from when the motor starts to when the working current reaches the stall current threshold.

[0138] Optionally, the preset power threshold and the preset slope threshold may be fixed threshold parameters, or may be automatically and dynamically adaptively adjusted by the smart lock device, which is not limited in the embodiments of the present application.

[0139] After the device lock has been put into use for a period of time, the working power consumed by the motor when it rotates to the preset position may decrease and the current slope may decrease due to the weakening of the electric drive, or the resistance of the motor may increase when it rotates to the preset position due to rust and aging of the lock body, resulting in increased working power consumed by the motor and increased current slope. The smart lock device can automatically adjust the preset power threshold and the preset slope threshold according to the changes in the working power when the motor reaches the preset position within the historical time period.

[0140] Schematically, taking monitoring the working voltage of the motor as an example, the process of automatically adjusting the threshold parameters includes recording the working voltage threshold during the j-th rotation of the motor as the reference voltage threshold, where j is a positive integer; in response to the difference between the working voltage threshold collected during the k-th rotation and the reference voltage threshold meeting the threshold adjustment requirement, determining the adjustment coefficient based on the degree of change of the working voltage threshold relative to the reference voltage threshold, and updating the working voltage threshold collected for the k-th time to the reference voltage threshold, where k is a positive integer and k>j; and adjusting the preset power threshold and the preset slope threshold based on the adjustment coefficient.

[0141] To summarize, the method provided in the embodiment of the present application introduces working power to participate in motor in-place detection, and controls the motor to stop rotating when at least one of the working power and the current slope meets the motor stop requirements. It can accurately detect the operating status of the motor based on multi-dimensional detection parameters to ensure that the motor stops in time when it reaches a predetermined position, avoiding excessive rotation or out of position, and can brake the motor in advance when it is close to being in position, thereby reducing damage to the motor due to stalling or overload, extending the service life of the motor, and improving the efficiency of motor in-place detection.

[0142] For illustration, please refer to Figure 4 , which shows a flow chart of a motor control method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a smart lock device as an example for explanation. Figure 4 As shown, the above step 230 includes the following steps:

[0143] Step 231, in response to the operating power reaching a preset power threshold, controlling the motor to stop rotating.

[0144] In some embodiments, it takes a certain amount of time for the motor to stop rotating. In order to prevent the motor from continuing to rotate after it is in place and generating a stall current, the motor can be driven to brake in advance when the motor approaches the specified position to avoid generating a stall current. The motor stop requirement includes the motor reaching a preset position (i.e., close to the specified position for unlocking or locking).

[0145] During normal operation after the motor is started, the motor's operating power will remain within a relatively stable value range. When the motor is close to being in place or encounters an obstacle (stuck), the motor requires a larger torque to overcome the resistance and consumes more power. Therefore, the comparison between the operating power and the preset power threshold can be used to determine whether the motor meets the motor stop requirements.

[0146] Illustratively, the motor stop requirement includes the operating power reaching a preset power threshold.

[0147] The preset power threshold is used to indicate the working power consumed by the motor when the motor rotates to a preset position (close to the position).

[0148] In some embodiments, during the starting phase of the motor, since it needs to start rotating from a stationary state, the resistance is relatively large, and the motor is prone to generate a stall current during the starting phase, resulting in a large working power. In order to avoid the misjudgment of whether the motor is in place due to the stall current during the starting phase, the working power of the motor after the starting phase can be detected to participate in the detection of whether the motor is in place.

[0149] Illustratively, step 231 includes recording the working time of the motor; in response to the working time exceeding the starting time and the working power reaching a preset power threshold, controlling the motor to stop rotating.

[0150] The starting time is the time from when the motor starts to when the working current reaches the stall current threshold.

[0151] The stall current threshold is used to indicate the minimum current value of the working current when the motor is stalled.

[0152] The above control process includes controlling the motor to stop rotating when the working time exceeds the starting time and the working power rises to a preset power threshold.

[0153] The method provided in the embodiment of the present application introduces a startup time, and in response to the working power reaching a preset power threshold after the startup time, controls the motor to stop rotating. During the process of motor in-place detection, the influence of the stall current in the motor startup phase on the motor in-place detection is avoided, thereby improving the accuracy and efficiency of the motor in-place detection.

[0154] Optionally, the preset power threshold may be a fixed threshold parameter, or may be automatically and dynamically adaptively adjusted by the smart lock device, which is not limited in the embodiments of the present application.

[0155] After the device lock has been put into use for a period of time, the working power consumed by the motor when it rotates to the preset position may decrease due to the weakening of the electric drive, or the resistance of the motor when it rotates to the preset position may increase due to rust and aging of the lock body, resulting in an increase in the working power required by the motor. The smart lock device can automatically adjust the preset power threshold according to the changes in the working power of the motor when it reaches the preset position within the historical time period.

[0156] Taking monitoring the working voltage of the motor as an example, the automatic adjustment process of the preset power threshold includes recording the working voltage threshold during the j-th rotation of the motor as the reference voltage threshold, where j is a positive integer; in response to the difference between the working voltage threshold collected during the k-th rotation and the reference voltage threshold meeting the threshold adjustment requirement, determining an adjustment coefficient based on the degree of change of the working voltage threshold relative to the reference voltage threshold, and updating the working voltage threshold collected for the k-th time to the reference voltage threshold, where k is a positive integer and k>j; and adjusting the preset power threshold based on the adjustment coefficient.

[0157] The operating voltage threshold refers to the maximum operating voltage collected during the rotation of the motor after the start-up phase.

[0158] Optionally, the threshold adjustment requirement includes that the difference between the operating voltage threshold collected during the kth rotation and the reference voltage threshold reaches a preset difference, or that the ratio between the difference and the operating voltage threshold collected during the kth rotation reaches at least one of a threshold ratio, etc. The embodiments of the present application are not limited to this.

[0159] Schematically, when the difference between the working voltage threshold and the reference voltage threshold collected during the kth rotation meets the threshold adjustment requirements, the voltage ratio between the working voltage threshold and the reference voltage threshold is determined as the adjustment coefficient, and the product of the adjustment coefficient and the preset power threshold is used as the updated preset power threshold, wherein the voltage ratio is used to indicate the degree of change of the working voltage threshold relative to the reference voltage threshold.

[0160] The method provided in the embodiment of the present application detects changes in the operating voltage threshold of the motor to reflect the changes in the power threshold required when the motor meets the motor stop requirements, thereby dynamically adjusting the preset power threshold according to the changes in the operating voltage threshold, so that the preset power threshold can fit the power threshold required when the motor is close to being in place during actual application, thereby improving the accuracy and flexibility of motor arrival detection.

[0161] In some embodiments, there may be multiple preset power thresholds corresponding to the smart lock device. Taking the first preset power threshold and the second preset power threshold as examples, the smart lock device may enable the energy-saving mode. In the energy-saving mode, the smart lock device will use less power to drive the motor to rotate. In response to the smart device enabling the energy-saving mode, the first preset power threshold is used as the preset power threshold corresponding to the energy-saving mode; in response to the smart device turning off the energy-saving mode, the second preset power threshold is used as the preset power threshold, wherein the first preset power threshold is less than the second preset power threshold.

[0162] Optionally, the energy-saving mode may be enabled based on a user operation, or the energy-saving mode may be automatically enabled by the smart lock device.

[0163] Taking the automatic activation of the energy-saving mode of a smart lock device as an example, when the smart lock device is first put into use, the resistance to unlocking or locking is usually small due to the new lock body. Therefore, the energy-saving mode can be automatically enabled within a preset time period when the smart lock device is put into use, and a smaller working power is used to drive the motor to rotate and work, and a first preset power threshold is used to detect the motor's position. After the smart lock device has been put into use for a period of time, the resistance to unlocking or locking may increase due to aging of the lock body and other conditions. Therefore, the energy-saving mode can be automatically turned off after the smart lock device has been put into use for a preset time period, and a larger working power is used to drive the motor to work, and a second preset power threshold is used to detect the motor's position.

[0164] Taking the example of a smart lock device that is an energy storage device, the smart lock device can also automatically turn on the energy-saving mode according to the remaining power of the device. For example, when the remaining power of the smart lock device has not dropped to the preset power threshold, the energy-saving mode is not enabled, a larger working power is used to drive the motor to work, and a second preset power threshold is used to detect the motor's position; in response to the remaining power of the smart lock device dropping to the preset power threshold, the energy-saving mode is automatically turned on, a smaller working power is used to drive the motor to rotate, and the first preset power threshold is used to detect the motor's position.

[0165] In some embodiments, the operating voltage of the motor is related to the remaining power of the smart lock device. The preset power threshold and preset slope threshold used to detect the motor's position can also be adjusted in real time according to the remaining power of the device. By adjusting the threshold parameters used to detect the motor's position in real time according to the remaining power, the threshold parameters can be made consistent with the device's actual power drive of the motor, thereby improving the accuracy of motor detection.

[0166] Schematically, the dynamic adjustment process includes obtaining the remaining power of the smart lock device, and dynamically adjusting a preset power threshold and a preset slope threshold based on the remaining power, wherein, in response to the degree of change in the remaining power relative to the remaining power in a historical time period reaching a preset degree threshold, the preset power threshold is adjusted according to the remaining power ratio, the remaining power ratio is the ratio between the remaining power and the device threshold, and the device power threshold is used to indicate the maximum remaining power of the smart device lock.

[0167] The remaining power is used to indicate the remaining driving ability of the smart lock device for the motor. Optionally, the working voltage when the driving motor rotates is positively correlated with the remaining power.

[0168] In schematic form, every time the remaining power decreases by 10%, the preset power threshold is adjusted according to the remaining power ratio. For example, when the remaining power ratio is 100%, the preset power threshold is enabled. When the remaining power decreases by 10%, the current remaining power ratio is 90%, and the preset power threshold is multiplied by 90% to obtain the currently used preset power threshold.

[0169] Optionally, the product of the remaining power ratio and the preset power threshold can be directly used as the adjusted preset power threshold, or the adjustment coefficient can be determined according to the influence of the remaining power on the working voltage, and the product of the adjustment coefficient, the remaining power ratio and the preset power threshold can be used as the adjusted preset power threshold, etc. The embodiments of the present application are not limited to this.

[0170] The method provided in the embodiment of the present application provides an energy-saving mode for the smart lock device by adopting different preset power thresholds. It can not only reduce the working power in the energy-saving mode to achieve energy-saving effect, but also automatically adopt the corresponding preset power threshold according to the mode activation situation, thereby improving the flexibility and accuracy of motor in-place detection.

[0171] Step 232 : When the operating power does not reach the preset power threshold, in response to the current slope reaching the preset slope threshold, the motor is controlled to stop rotating.

[0172] When the resistance to unlocking or locking the smart lock device is low, the motor may not need very high working power to rotate to unlock or lock. In this case, the working power of the motor may always be lower than the preset power threshold, but because the resistance suddenly increases when it is close to the position, the current changes greatly and the current slope will increase rapidly. Therefore, when the working power does not reach the preset power threshold, the comparison relationship between the current slope and the preset slope threshold can be used to determine whether the motor meets the motor stop requirements.

[0173] Illustratively, the motor stop requirement includes that the current slope reaches a preset slope threshold when the operating power does not reach a preset power threshold.

[0174] The preset slope threshold is used to indicate the current slope of the motor when the motor rotates to a preset position (close to the in-position).

[0175] In some embodiments, during the starting phase of the motor, since it needs to start rotating from a stationary state, the resistance is relatively large, and the motor is prone to generate a stall current during the starting phase, resulting in a sudden increase in the current slope. In order to avoid the misjudgment of whether the motor is in place due to the stall current during the starting phase, the current slope after the starting phase of the motor can be detected to participate in detecting whether the motor is in place.

[0176] Illustratively, step 232 includes recording the working time of the motor; when the working power does not reach a preset power threshold, in response to the working time exceeding the start-up time and the current slope reaching a preset slope threshold, controlling the motor to stop rotating.

[0177] The starting time is the time from when the motor starts to when the working current reaches the stall current threshold.

[0178] The stall current threshold is used to indicate the minimum current value of the working current when the motor is stalled.

[0179] The above control process includes controlling the motor to stop rotating when the current slope rises to a preset slope threshold after the working time exceeds the starting time.

[0180] The method provided in the embodiment of the present application introduces a startup time. When the operating power does not reach a preset power threshold, in response to the current slope after the startup time reaching a preset slope threshold, the motor is controlled to stop rotating. During the process of motor in-place detection, the influence of the stall current in the motor startup phase on the motor in-place detection is avoided, thereby improving the accuracy and efficiency of the motor in-place detection.

[0181] Optionally, the preset slope threshold may be a fixed threshold parameter, or may be automatically and dynamically adaptively adjusted by the smart lock device, which is not limited in the embodiments of the present application.

[0182] After the device lock has been put into use for a period of time, the resistance of the motor may increase when it rotates to the preset position due to rust and aging of the lock body, resulting in an increase in the current slope. The smart lock device can automatically adjust the preset slope threshold according to the change in the current slope when the motor reaches the preset position within the historical time period.

[0183] Taking monitoring the working voltage of the motor as an example, the automatic adjustment process of the preset slope threshold includes recording the working voltage threshold during the j-th rotation of the motor as the reference voltage threshold, where j is a positive integer; in response to the difference between the working voltage threshold collected during the k-th rotation and the reference voltage threshold meeting the threshold adjustment requirement, determining an adjustment coefficient based on the degree of change of the working voltage threshold relative to the reference voltage threshold, and updating the working voltage threshold collected for the k-th time to the reference voltage threshold, where k is a positive integer and k>j; and adjusting the preset slope threshold based on the adjustment coefficient.

[0184] The operating voltage threshold refers to the maximum operating voltage collected during the rotation of the motor after the start-up phase.

[0185] Optionally, the threshold adjustment requirement includes that the difference between the operating voltage threshold collected during the kth rotation and the reference voltage threshold reaches a preset difference, or that the ratio between the difference and the operating voltage threshold collected during the kth rotation reaches at least one of a threshold ratio, etc. The embodiments of the present application are not limited to this.

[0186] Schematically, when the difference between the working voltage threshold and the reference voltage threshold collected during the kth rotation meets the threshold adjustment requirements, the voltage ratio between the working voltage threshold and the reference voltage threshold is determined as the adjustment coefficient, and the product of the adjustment coefficient and the preset slope threshold is used as the updated preset slope threshold, wherein the voltage ratio is used to indicate the degree of change of the working voltage threshold relative to the reference voltage threshold.

[0187] The method provided in the embodiment of the present application detects changes in the working voltage threshold of the motor to reflect the change requirements of the slope threshold corresponding to when the motor meets the motor stop requirements, thereby dynamically adjusting the preset slope threshold according to the changes in the working voltage threshold, so that the preset slope threshold can fit the current slope threshold corresponding to when the motor is close to being in place during actual application, thereby improving the accuracy and flexibility of motor in place detection.

[0188] In some embodiments, during the locking or unlocking process of the smart lock device, the load may be low or the power supply voltage may be low, resulting in low operating power and current slope of the motor. The operating power and current slope may not reach the preset threshold. In order to avoid the continuous rotation of the motor to generate stall current, the working time can be introduced to participate in the motor in place detection to improve the motor detection efficiency.

[0189] Therefore, when the working power does not reach the preset power threshold and the current slope does not reach the preset slope threshold, it can be determined whether the motor meets the motor stop requirements by comparing the working time with the preset time threshold.

[0190] The motor stop requirement includes that the working time reaches a preset time threshold.

[0191] In an illustrative manner, the detection process includes recording the working time of the motor; when the working power does not reach a preset power threshold and the current slope does not reach a preset slope threshold, in response to the working time reaching a preset time threshold, controlling the motor to stop rotating.

[0192] The preset slope threshold is used to indicate the time required for the motor to rotate to a preset position (close to the position).

[0193] Optionally, the preset time threshold may be a fixed threshold parameter, or may be automatically and dynamically adaptively adjusted by the smart lock device, which is not limited in the embodiments of the present application.

[0194] After the device lock has been put into use for a period of time, the resistance may increase due to rust and aging of the lock body, resulting in an increase in the working time required for the motor to rotate to the preset position (close to in place). The smart lock device can automatically adjust the preset time threshold based on changes in the working time when the motor reaches the preset position within a historical time period.

[0195] Taking monitoring the working voltage of the motor as an example, the automatic adjustment process of the preset time threshold includes recording the working voltage threshold during the j-th rotation of the motor as the reference voltage threshold, where j is a positive integer; in response to the difference between the working voltage threshold collected during the k-th rotation and the reference voltage threshold meeting the threshold adjustment requirement, determining the adjustment coefficient based on the degree of change of the working voltage threshold relative to the reference voltage threshold, and updating the working voltage threshold collected for the k-th time to the reference voltage threshold, where k is a positive integer and k>j; and adjusting the preset time threshold based on the adjustment coefficient.

[0196] The operating voltage threshold refers to the maximum operating voltage collected during the rotation of the motor after the start-up phase.

[0197] Schematically, when the difference between the working voltage threshold and the reference voltage threshold collected during the kth rotation meets the threshold adjustment requirements, the voltage ratio between the working voltage threshold and the reference voltage threshold is determined as the adjustment coefficient, and the product of the adjustment coefficient and the preset duration threshold is used as the updated preset duration threshold, wherein the voltage ratio is used to indicate the degree of change of the working voltage threshold relative to the reference voltage threshold.

[0198] The method provided in the embodiment of the present application detects changes in the working voltage threshold of the motor to reflect the changes in the working time threshold corresponding to when the motor meets the motor stop requirements, thereby dynamically adjusting the preset time threshold according to the changes in the working voltage threshold, so that the preset time threshold can fit the working time required for the motor to be close to being in place during actual application, thereby improving the accuracy and flexibility of motor arrival detection.

[0199] In some embodiments, the motor detection method provided in the embodiments of the present application includes controlling the motor to stop rotating in response to at least one of the operating power, current slope and operating time meeting the motor stop requirement.

[0200] Optionally, in response to the working power reaching a preset power threshold, the motor is controlled to stop rotating; or, when the working power does not reach the preset power threshold, in response to the current slope reaching a preset slope threshold, the motor is controlled to stop rotating; or, when the working power does not reach the preset power threshold and the current slope does not reach the preset slope threshold, the motor is controlled to stop rotating.

[0201] For illustration, please refer to Figure 5 , Figure 5 is a schematic diagram of a motor detection process provided by an exemplary embodiment of the present application, such as Figure 5 As shown, in the motor control process of the smart lock device, step 501 is executed in sequence to receive the driving signal; step 502 is to drive the motor to rotate and record the working time; step 503 is to read the working voltage of the motor; step 504 is to read the working voltage of the motor again and calculate the working power of the motor based on the two working voltages; step 505 is to determine whether the working power reaches the preset power threshold, in response to the working power reaching the preset power threshold, execute step 509, otherwise execute step 506; step 506 is to calculate the current slope; step 507 is to determine whether the current slope reaches the preset current threshold, in response to the current slope reaching the preset current threshold, execute step 509, otherwise execute step 508; step 508 is to determine whether the working time reaches the preset time threshold, in response to the preset time reaching the preset time threshold, execute step 509, otherwise return to step 504; step 509 is to control the motor to stop rotating.

[0202] To summarize, the method provided in the embodiment of the present application realizes multi-dimensional motor in-place detection by detecting the motor in-place status through at least one of the working power and the current slope, and can accurately control the motor to brake in advance when it is close to being in place to reduce the generation of stall current, thereby extending the service life of the motor and improving the motor detection efficiency.

[0203] Figure 6 is a structural block diagram of a motor detection device provided by an exemplary embodiment of the present application, such as Figure 6 As shown, the device includes the following parts:

[0204] A control module 610 is used to drive the motor in the smart lock device to rotate in response to receiving a driving signal, and the motor is used to control the smart lock device to lock or unlock;

[0205] The acquisition module 620 is used to acquire the working power of the motor at a first moment during the rotation of the motor; and acquire the current slope of the motor at the first moment, wherein the current slope is used to indicate the current change speed of the working current of the motor within a preset time interval before the first moment;

[0206] The control module 610 is further configured to control the motor to stop rotating in response to at least one of the operating power and the current slope meeting the motor stop requirement.

[0207] In some embodiments, the control module 610 is further configured to:

[0208] In response to the operating power reaching a preset power threshold, controlling the motor to stop rotating; or,

[0209] In a case where the operating power does not reach the preset power threshold, in response to the current slope reaching a preset slope threshold, the motor is controlled to stop rotating.

[0210] In some embodiments, the control module 610 is further configured to:

[0211] Recording the working time of the motor;

[0212] When the working power does not reach the preset power threshold and the current slope does not reach the preset slope threshold, in response to the working duration reaching the preset duration threshold, the motor is controlled to stop rotating.

[0213] In some embodiments, the acquisition module 620 is further used to record the working time of the motor;

[0214] The control module 610 is further configured to control the motor to stop rotating in response to the working time exceeding the starting time and the working power reaching the preset power threshold, wherein the starting time is the time from the starting moment of the motor until the working current reaches the stall current threshold; or

[0215] The control module 610 is further configured to control the motor to stop rotating in response to the working time exceeding the starting time and the current slope reaching the preset slope threshold when the working power does not reach the preset power threshold.

[0216] In some embodiments, the acquisition module 620 is further used to:

[0217] Recording the operating voltage threshold of the motor during the j-th rotation as the reference voltage threshold, where j is a positive integer;

[0218] In response to the difference between the operating voltage threshold value acquired during the k-th rotation and the reference voltage threshold value meeting the threshold adjustment requirement, determining an adjustment coefficient based on the degree of change of the operating voltage threshold value relative to the reference voltage threshold value, and updating the operating voltage threshold value acquired during the k-th rotation to the reference voltage threshold value, where k is a positive integer and k>j;

[0219] The preset power threshold and the preset slope threshold are adjusted based on the adjustment coefficient.

[0220] In some embodiments, the acquisition module 620 is further used to:

[0221] Obtaining the remaining power of the smart lock device;

[0222] The preset power threshold and the preset slope threshold are dynamically adjusted based on the remaining power, wherein, in response to the degree of change of the remaining power relative to the remaining power in a historical time period reaching a preset program threshold, the preset power threshold and the preset slope threshold are adjusted according to the remaining power ratio, the remaining power ratio is the ratio between the remaining power and the device power threshold, and the device power threshold is used to indicate the maximum remaining power of the smart lock device.

[0223] In some embodiments, the control module 610 is further configured to:

[0224] When the remaining power of the smart lock device does not drop to the preset power threshold, a first preset power threshold and a first preset slope threshold are adopted;

[0225] In response to the remaining power of the smart lock device dropping to a preset power threshold, automatically turning on an energy-saving mode, wherein the energy-saving mode is used to instruct the smart lock device to adopt a second preset power threshold and a second preset slope threshold;

[0226] The first preset power threshold is greater than the second preset power threshold, and the first preset slope threshold is greater than the second preset slope threshold.

[0227] In some embodiments, the acquisition module 620 is further used to:

[0228] During the rotation of the motor, at least one of the working voltage and the working current of the motor is collected at preset time intervals;

[0229] Determine a first operating power based on at least one of the operating voltage and the operating current acquired at the first moment;

[0230] Determine a second working power based on at least one of the working voltage and the working current acquired at a second moment, where the second moment is a moment acquired by shifting the first moment forward by the preset time interval;

[0231] The average power between the first working power and the second working power is determined as the working power of the motor at the first moment.

[0232] In some embodiments, the acquisition module 620 is further used to:

[0233] Determine a first working current based on the working voltage acquired at the first moment, or use the working current acquired at the first moment as the first working current;

[0234] Determine a second working current based on the working voltage acquired at the second moment, or use the working current acquired at the second moment as the second working current;

[0235] The current slope at the first moment is obtained by determining a ratio of a current difference between the first working current and the second working current to the preset time interval.

[0236] To summarize, the device provided in the embodiment of the present application introduces working power to participate in motor in-place detection, and controls the motor to stop rotating when at least one of the working power and the current slope meets the motor stop requirements. It can accurately detect the operating status of the motor based on multi-dimensional detection parameters to ensure that the motor stops in time when it reaches a predetermined position, avoiding excessive rotation or out of position, and can brake the motor in advance when it is close to being in position, thereby reducing damage to the motor due to stalling or overload, extending the service life of the motor, and improving the efficiency of motor in-place detection.

[0237] It should be noted that the motor detection device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0238] Figure 7 The structure block diagram of a terminal 700 provided by an exemplary embodiment of the present application is shown. The terminal 700 may be: a smart phone, a tablet computer, an MP3 player, an MP4 player, a notebook computer or a desktop computer. The terminal 700 may also be called a user equipment, a portable terminal, a laptop terminal, a desktop terminal or other names.

[0239] Typically, the terminal 700 includes a processor 701 and a memory 702 .

[0240] The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 701 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 701 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 701 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0241] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one instruction, which is used to be executed by the processor 701 to implement the motor detection method provided in the method embodiment of the present application.

[0242] In some embodiments, the terminal 700 further includes some other components 703, and the type and quantity of the other components 703 can be selected based on the functional requirements of the terminal 700. Those skilled in the art will appreciate that Figure 7 The structure shown in the figure does not constitute a limitation on the terminal 700, and the terminal 700 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0243] The embodiment of the present application also provides a computer device, which can be implemented as follows: Figure 1 The computer device includes a processor and a memory, wherein at least one instruction, at least one program, code set or instruction set is stored in the memory, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the motor detection method provided by the above-mentioned method embodiments.

[0244] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the motor detection method provided by the above-mentioned method embodiments.

[0245] The embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the motor detection method provided by the above-mentioned method embodiments.

[0246] Optionally, the computer readable storage medium may include: Read Only Memory (ROM), Random Access Memory (RAM), Solid State Drives (SSD) or optical disks, etc. Among them, the random access memory may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0247] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0248] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A motor detection method, characterized in that: Executed by a smart lock device, the method includes: In response to receiving a driving signal, driving a motor in the smart lock device to rotate, the motor being used to control the smart lock device to lock or unlock; During the rotation of the motor, the working power of the motor at a first moment is obtained; and the current slope of the motor at the first moment is obtained, wherein the current slope is used to indicate the current change speed of the working current of the motor within a preset time interval before the first moment; In response to at least one of the operating power and the current slope meeting a motor stop requirement, the motor is controlled to stop rotating.

2. The method according to claim 1, characterized in that In response to at least one of the operating power and the current slope meeting the motor stop requirement, controlling the motor to stop rotating comprises: In response to the operating power reaching a preset power threshold, controlling the motor to stop rotating; or, In a case where the operating power does not reach the preset power threshold, in response to the current slope reaching a preset slope threshold, the motor is controlled to stop rotating.

3. The method according to claim 2, characterized in that The method further comprises: Recording the working time of the motor; When the working power does not reach the preset power threshold and the current slope does not reach the preset slope threshold, in response to the working duration reaching the preset duration threshold, the motor is controlled to stop rotating.

4. The method according to claim 2, characterized in that: The method further comprises: Recording the working time of the motor; In response to the operating power reaching a preset power threshold, controlling the motor to stop rotating comprises: In response to the working time exceeding the starting time and the working power reaching the preset power threshold, controlling the motor to stop rotating, the starting time being the time from the starting moment of the motor until the working current reaches the stall current threshold; When the operating power does not reach the preset power threshold, in response to the current slope reaching the preset slope threshold, controlling the motor to stop rotating includes: In the case that the working power does not reach the preset power threshold, in response to the working time exceeding the starting time and the current slope reaching the preset slope threshold, the motor is controlled to stop rotating.

5. The method according to claim 2, characterized in that: The method further comprises: Recording the operating voltage threshold of the motor during the j-th rotation as the reference voltage threshold, where j is a positive integer; In response to the difference between the operating voltage threshold value acquired during the k-th rotation and the reference voltage threshold value meeting the threshold adjustment requirement, determining an adjustment coefficient based on the degree of change of the operating voltage threshold value relative to the reference voltage threshold value, and updating the operating voltage threshold value acquired during the k-th rotation to the reference voltage threshold value, where k is a positive integer and k>j; The preset power threshold and the preset slope threshold are adjusted based on the adjustment coefficient.

6. The method according to claim 2, characterized in that The method further comprises: Obtaining the remaining power of the smart lock device; The preset power threshold is dynamically adjusted based on the remaining power, wherein, in response to the degree of change in the remaining power relative to the remaining power in a historical time period reaching a preset degree threshold, the preset power threshold is adjusted according to the remaining power ratio, the remaining power ratio is the ratio between the remaining power and the device power threshold, and the device power threshold is used to indicate the maximum remaining power of the smart lock device.

7. The method according to claim 2, characterized in that: The method further comprises: When the remaining power of the smart lock device does not drop to the preset power threshold, a second preset power threshold is adopted; In response to the remaining power of the smart lock device dropping to a preset power threshold, automatically turning on an energy-saving mode, wherein the energy-saving mode is used to instruct the smart lock device to use a first preset power threshold; The first preset power threshold is smaller than the second preset power threshold.

8. The method according to any one of claims 1 to 7, characterized in that: The step of obtaining the working power of the motor at a first moment during the rotation of the motor comprises: During the rotation of the motor, at least one of the working voltage and the working current of the motor is collected at preset time intervals; Determine a first operating power based on at least one of the operating voltage and the operating current acquired at the first moment; Determine a second working power based on at least one of the working voltage and the working current acquired at a second moment, where the second moment is a moment acquired by shifting the first moment forward by the preset time interval; The average power between the first working power and the second working power is determined as the working power of the motor at the first moment.

9. The method according to claim 8, characterized in that The obtaining the current slope of the motor at the first moment includes: Determine a first working current based on the working voltage acquired at the first moment, or use the working current acquired at the first moment as the first working current; Determine a second working current based on the working voltage acquired at the second moment, or use the working current acquired at the second moment as the second working current; The current slope at the first moment is obtained by determining a ratio of a current difference between the first working current and the second working current to the preset time interval.

10. A motor detection device, characterized in that: The device comprises: A control module, configured to drive a motor in the smart lock device to rotate in response to receiving a drive signal, wherein the motor is configured to control the smart lock device to lock or unlock; an acquisition module, used to acquire the working power of the motor at a first moment during the rotation of the motor; and to acquire the current slope of the motor at the first moment, wherein the current slope is used to indicate the current change speed of the working current of the motor within a preset time interval before the first moment; The control module is further configured to control the motor to stop rotating in response to at least one of the operating power and the current slope meeting the motor stop requirement.

11. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the motor detection method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The storage medium stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the motor detection method according to any one of claims 1 to 9.

13. A computer program product, characterized in that The invention comprises a computer program, which implements the motor detection method according to any one of claims 1 to 9 when being executed by a processor.

Citation Information

Cited By

  • Motor overload fault detection method and system based on locked-rotor current characteristics

    CN121432183A