Smart lock control method, smart lock and related devices
By using the potentiometer linked by the knob shaft gear in the smart lock, the potentiometer resistance value is obtained to calculate the knob position, which solves the problem of low knob detection accuracy and improves the motor life and battery life.
Patent Information
- Application Number
- CN202310573565.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2043-05-19
AI Technical Summary
The knob position detection accuracy of existing smart locks is low, which causes the switch lock to be in place to rely on the motor to be blocked, affecting the motor life and battery life.
A potentiometer linked by knob shaft gear is used to determine the actual angle value of the knob by obtaining the resistance value of the potentiometer, thereby accurately calculating the knob position and avoiding motor blockage detection.
Improves knob position detection accuracy, extends motor life, reduces switch lock noise and increases battery life.
Smart Images

Figure CN116517396B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart locks, and in particular to a smart lock control method, a smart lock and related devices. Background Art
[0002] Currently, the lock knob position detection of smart locks on the market generally adopts a transmissive photoelectric circuit breaker plus a switch HALL solution. This solution is costly, complex in structure, and cannot detect the specific position of the knob at any time, resulting in a poor user experience.
[0003] Furthermore, due to the low accuracy of the detection angle, the unlocking and locking positions are both judged by detecting the motor stall current. Stalling can easily cause the motor to heat up and reduce the motor's service life, while also reducing the battery life. Therefore, how to improve the detection accuracy of the smart lock's knob position needs to be solved urgently. Summary of the Invention
[0004] The embodiments of the present application provide a smart lock control method, a smart lock, and related devices, which can improve the detection accuracy of the knob position of the smart lock.
[0005] In a first aspect, an embodiment of the present application provides a smart lock control method, which is applied to a smart lock. The smart lock includes a knob and a potentiometer gear-linked to a knob shaft of the knob, wherein the knob shaft rotates synchronously with the potentiometer. The method includes:
[0006] Obtaining a target resistance value of the potentiometer;
[0007] determining a target actual angle value corresponding to the target resistance value;
[0008] The target position of the knob is determined according to the target actual angle value.
[0009] In a second aspect, the present application provides a smart lock control device, which is applied to a smart lock. The smart lock includes a knob and a potentiometer gear-linked to a knob shaft of the knob, wherein the knob shaft rotates synchronously with the potentiometer. The device includes: an acquisition unit, a first determination unit, and a second determination unit, wherein:
[0010] The acquiring unit is configured to acquire a target resistance value of the potentiometer;
[0011] The first determining unit is configured to determine a target actual angle value corresponding to the target resistance value;
[0012] The second determining unit is configured to determine a target position of the knob according to the target actual angle value.
[0013] In a third aspect, an embodiment of the present application provides a smart lock, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the second aspect of the embodiment of the present application.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program enables a computer to execute instructions of some or all of the steps described in the first aspect of the embodiment of the present application.
[0015] In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
[0016] The implementation of the embodiments of the present application has the following beneficial effects:
[0017] It can be seen that the smart lock control method, smart lock and related devices described in the embodiments of the present application are applied to smart locks. The smart lock includes a knob and a potentiometer gear-linked to the knob shaft of the knob. The knob shaft rotates synchronously with the potentiometer to obtain the target resistance of the potentiometer, determine the target actual angle value corresponding to the target resistance value, and determine the target position of the knob based on the target actual angle value. Furthermore, since the real-time angle value of the knob position can be calculated by reading the resistance value of the potentiometer, the detection accuracy of the knob position of the smart lock is improved. In addition, due to the improvement in the angle detection accuracy, the switch lock does not need to be detected by motor stalling, which improves the life of the motor while reducing the switch lock noise and increasing battery life. Since the resistance of the potentiometer does not change after power failure, even if the battery is replaced, the factory settings are restored, and other restart operations will not affect the angle detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1A This is a flow chart of a smart lock control method provided by an embodiment of the present application;
[0020] Figure 1BThis is a schematic structural diagram of a potentiometer provided in an embodiment of the present application;
[0021] Figure 2 This is a flow chart of another smart lock control method provided by an embodiment of the present application;
[0022] Figure 3 This is a flow chart of another smart lock control method provided by an embodiment of the present application;
[0023] Figure 4 This is a schematic diagram of the structure of a smart lock provided by an embodiment of the present application;
[0024] Figure 5 This is a block diagram of the functional units of a smart lock control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0026] The terms "first," "second," "third," and "fourth," etc., in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, rather than to describe a specific order. In addition, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0027] Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0028] In the embodiment of the present application, the smart lock may include at least one of the following: a smart door lock, a smart window lock, a smart floor lock, etc., which are not limited here.
[0029] Please participate Figure 1A ,like Figure 1A As shown, Figure 1AThis is a flow chart of a smart lock control method provided in an embodiment of the present application. The smart lock control method described in this embodiment is applied to a smart lock, which includes a knob and a potentiometer gear-linked to the knob shaft of the knob, wherein the knob shaft rotates synchronously with the potentiometer. The smart lock control method may include the following steps:
[0030] 101. Obtain a target resistance value of the potentiometer.
[0031] In an embodiment of the present application, the smart lock includes a knob and a potentiometer gear-linked to the knob shaft of the knob. The knob shaft rotates synchronously with the potentiometer, so that the corresponding resistance value can be read through the potentiometer during the rotation of the knob shaft.
[0032] Optional, such as Figure 1B As shown, the smart lock also includes a microprocessor, which is connected to the potentiometer; the microprocessor includes an analog-to-digital conversion interface; the potentiometer includes a reference voltage power supply and a variable resistor, and the two fixed ends of the variable resistor are respectively connected to the reference voltage power supply and ground; the sliding end of the variable resistor is connected to the analog-to-digital conversion interface;
[0033] The above step 101, obtaining the target resistance value of the potentiometer, may include the following steps:
[0034] 11. Obtaining a preset calibration value of the potentiometer;
[0035] 12. Obtaining the current resistance value of the potentiometer through the analog-to-digital conversion interface;
[0036] 13. Determine the target resistance value based on the current resistance value and the preset calibration value.
[0037] The preset calibration value may be pre-set or set by system default. Typically, the preset calibration value may be set before shipment.
[0038] In an embodiment of the present application, the smart lock may also include a microprocessor (microcontroller unit, MCU), the microprocessor is connected to the potentiometer, the microprocessor includes an analog-to-digital converter (ADC), the potentiometer may include a reference voltage power supply and a variable resistor, the two fixed ends of the variable resistor are respectively connected to the reference voltage power supply and the ground; the sliding end of the variable resistor is connected to the analog-to-digital conversion interface.
[0039] In the specific implementation, a voltage reference power supply can be used to generate a 2.5V reference voltage. The two ends of the variable resistor of the potentiometer are connected to the reference power supply and ground respectively. The output end of the potentiometer is connected to the ADC port of the MCU for voltage detection. Therefore, the actual angle value of the current knob can be calculated through the calibration value and the ADC value. That is, when the knob is rotated, it will drive the potentiometer to rotate, and the output voltage value of the potentiometer will change. Therefore, the number collected by the ADC will change accordingly, and the calculated angle will change accordingly.
[0040] 102. Determine a target actual angle value corresponding to the target resistance value.
[0041] In the embodiment of the present application, different resistance values may correspond to different actual angle values.
[0042] Optionally, the above step 102, determining the target actual angle value corresponding to the target resistance value, can be implemented as follows:
[0043] According to the mapping relationship between the preset resistance value and the actual angle value, the target actual angle value corresponding to the target resistance value is determined.
[0044] In an embodiment of the present application, a mapping relationship between a preset resistance value and an actual angle value can be pre-stored, and then, based on the mapping relationship, the target actual angle value corresponding to the target resistance value can be determined, that is, the detection of the angle value is converted to resistance detection, which helps to improve the detection accuracy.
[0045] Optionally, the above step of determining the target actual angle value corresponding to the target resistance value according to the mapping relationship between the preset resistance value and the actual angle value may include the following steps:
[0046] 21. Determine a reference actual angle value corresponding to the target resistance value according to a mapping relationship between a preset resistance value and an actual angle value;
[0047] 22. Obtain target environment parameters;
[0048] 23. Determine target fine-tuning parameters corresponding to the target environmental parameters;
[0049] 24. Adjust the reference actual angle value according to the target fine-tuning parameter to obtain the target actual angle value.
[0050] In the embodiment of the present application, the environmental parameters may include at least one of the following: temperature, humidity, weather pressure, magnetic field interference intensity, friction of the knob shaft, number of times the smart lock is unlocked, etc., which are not limited here.
[0051] In a specific implementation, the environmental parameters may include external environmental parameters and / or internal environmental parameters. External environmental parameters may include at least one of the following: temperature, humidity, weather pressure, magnetic field interference intensity, etc., which are not limited here. Internal environmental parameters may include at least one of the following: friction of the knob shaft, number of unlocking times of the smart lock, etc., which are not limited here.
[0052] In an embodiment of the present application, a mapping relationship between a preset resistance value and an actual angle value can be pre-stored, and a mapping relationship between a preset environmental parameter and a fine-tuning parameter can be pre-stored. Then, a reference actual angle value corresponding to the target resistance value can be determined based on the mapping relationship between the preset resistance value and the actual angle value. Then, the target environmental parameter can be obtained, and then the target fine-tuning parameter corresponding to the target environmental parameter can be determined according to the mapping relationship between the preset environmental parameter and the fine-tuning parameter. Finally, the reference actual angle value can be adjusted according to the target fine-tuning parameter to obtain the target actual angle value. In this way, the actual angle value can be adjusted in combination with the actual environment of the smart lock, so that the final actual angle value is more in line with the actual environment, which helps to improve the position detection accuracy of the lock knob of the smart lock.
[0053] Optionally, the target environmental parameters include external environmental parameters and internal environmental parameters; the above step 23, determining the target fine-tuning parameters corresponding to the target environmental parameters, may include the following steps:
[0054] 231. Determine a reference fine-tuning parameter corresponding to the internal environment parameter;
[0055] 232. Determine a target optimization factor corresponding to the external environment parameter;
[0056] 233. Adjust the reference fine-tuning parameter according to the target optimization factor to obtain the target fine-tuning parameter.
[0057] In the embodiments of the present application, the target environmental parameters may include external environmental parameters and internal environmental parameters. The external environmental parameters may include at least one of the following: temperature, humidity, weather pressure, magnetic field interference intensity, etc., which are not limited here. The internal environmental parameters may include at least one of the following: friction of the knob shaft, number of unlocking times of the smart lock, etc., which are not limited here.
[0058] In a specific implementation, the mapping relationship between the preset internal environmental parameters and the fine-tuning parameters can be pre-stored, and then, the reference fine-tuning parameters corresponding to the internal environmental parameters in the target environmental parameters can be determined based on the mapping relationship. In addition, the mapping relationship between the preset external environmental parameters and the optimization factors can be pre-stored, and then, the target optimization factors corresponding to the external environmental parameters in the target environmental parameters can be determined based on the mapping relationship, and then the reference fine-tuning parameters are adjusted according to the target optimization factors to obtain the target fine-tuning parameters. In actual applications, the influence of the internal environmental parameters on the actual angle value is the main influence, while the influence of the external environmental parameters on the actual angle value is the secondary influence. Therefore, the internal environmental parameters are used to determine the main fine-tuning parameters, and then the external environmental parameters are used to optimize them. Then, the influence of the environment on the actual angle value can be accurately analyzed, which helps to improve the detection accuracy of the actual angle value.
[0059] 103. Determine a target position of the knob according to the target actual angle value.
[0060] In an embodiment of the present application, a mapping relationship between a preset actual angle value and the position of the knob may be pre-stored. Based on the mapping relationship, the target position of the knob determined by the target actual angle value may be determined.
[0061] Optionally, the smart lock further includes a display device. After determining the target position of the knob according to the target actual angle value in step 103, the following steps may be further included:
[0062] A1. Determine first prompt information corresponding to the target location;
[0063] A2. Display the first prompt information on the display device.
[0064] In the embodiment of the present application, different positions may correspond to different prompt information, and the first prompt information may be used to prompt the user the degree or direction of unlocking, for example, fully unlocked, 50% unlocked, etc. The display device may include a display screen.
[0065] In a specific implementation, the mapping relationship between the preset position and the prompt information can be pre-stored, and then, the first prompt information corresponding to the target position can be determined based on the mapping relationship, and then, the first prompt information can be displayed on the display device, thereby further prompting the user to the position of the lock knob or the unlocking and locking conditions.
[0066] Optionally, the smart lock further includes a display device. After determining the target position of the knob according to the target actual angle value in step 103, the following steps may be further included:
[0067] B1. When the target position is within a preset position range, detecting the duration of the target position;
[0068] B2. When the duration is longer than a preset duration, generating a second prompt message;
[0069] B3. Play the second prompt information through the voice prompt device.
[0070] In the embodiment of the present application, the preset position range and the preset time duration can be pre-set or set by the system. The second prompt information is used to prompt the user that the door is not locked properly or is not locked. The voice prompt device may include a speaker.
[0071] In a specific implementation, when the target position is within a preset position range, it indicates that the door may not be locked properly, or if it is not unlocked, the duration of the target position can be detected. When the duration is greater than the preset duration, a second prompt message is generated, and the second prompt message is played through a voice prompt device, thereby prompting the user to close the lock properly, which helps to improve safety.
[0072] For example, in a specific implementation, a gear can be added to the knob shaft of the smart lock to link a 360-degree potentiometer for synchronous rotation, and the relative position of the potentiometer and knob can be calibrated during production. When using it, the user can calculate the real-time angle value of the knob position by reading the resistance value of the potentiometer. Due to the improved angle detection accuracy, the switch lock is in place without relying on the motor stalling method, which improves the motor life while also reducing the switch lock noise and increasing battery life. Since the potentiometer resistance value does not change after power failure, even if the battery is replaced, the factory settings are restored, and other restart operations will not affect the angle detection.
[0073] The position detection solution of the lock knob in the related art has the following defects:
[0074] 1. Complex structure: multiple sensors are required to achieve initial functions;
[0075] 2. Low efficiency: When the transmissive photoelectric circuit breaker is working, the current is large and the motor is blocked, which causes serious energy loss. This reduces the battery life and increases the switch lock noise.
[0076] 3. Low detection accuracy: It can only detect two specific points in the vertical or horizontal direction, and the detection error is greater than 15%;
[0077] 4. Frequent motor stalling seriously affects the motor service life and battery life.
[0078] The use of the above-mentioned embodiments of the present application can avoid motor stalling every time the door is opened or closed, thereby increasing the service life of the motor and improving battery life. It can also improve the accuracy of knob angle detection, increase battery life, and reduce the noise of the switch lock, thereby improving the user experience.
[0079] It can be seen that the smart lock control method described in the embodiment of the present application is applied to a smart lock. The smart lock includes a knob and a potentiometer gear-linked to the knob shaft of the knob. The knob shaft rotates synchronously with the potentiometer to obtain the target resistance of the potentiometer, determine the target actual angle value corresponding to the target resistance value, and determine the target position of the knob based on the target actual angle value. Furthermore, since the real-time angle value of the knob position can be calculated by reading the resistance value of the potentiometer, the detection accuracy of the knob position of the smart lock is improved. In addition, due to the improvement in the angle detection accuracy, the switch lock does not need to be detected by stalling the motor, which improves the life of the motor while reducing the switch lock noise and increasing the battery life. Since the resistance of the potentiometer does not change after power failure, even if the battery is replaced, the factory settings are restored, and other restart operations will not affect the angle detection.
[0080] Please participate Figure 2 , Figure 2 This is a flow chart of another smart lock control method provided in an embodiment of the present application. The smart lock control method described in this embodiment is applied to a smart lock, which includes a display device, a knob, and a potentiometer geared to a knob shaft of the knob, wherein the knob shaft rotates synchronously with the potentiometer. The smart lock control method may include the following steps:
[0081] 201. Obtain a target resistance value of the potentiometer.
[0082] 202. Determine a target actual angle value corresponding to the target resistance value.
[0083] 203. Determine a target position of the knob according to the target actual angle value.
[0084] 204. Determine first prompt information corresponding to the target location.
[0085] 205. Display the first prompt information on the display device.
[0086] The detailed description of steps 201 to 205 can refer to the above Figure 1A The relevant steps of the described smart lock control method will not be repeated here.
[0087] It can be seen that the smart lock control method described in the embodiment of the present application is applied to a smart lock, which includes a knob and a potentiometer gear-linked to the knob shaft of the knob. The knob shaft rotates synchronously with the potentiometer, obtains the target resistance of the potentiometer, determines the target actual angle value corresponding to the target resistance value, determines the target position of the knob based on the target actual angle value, determines the first prompt information corresponding to the target position, and displays the first prompt information on the display device. Furthermore, since the real-time angle value of the knob position can be calculated by reading the resistance value of the potentiometer, the detection accuracy of the knob position of the smart lock is improved. In addition, due to the improved angle detection accuracy, the switch lock is in place without relying on the motor stalling method, which improves the motor life while reducing the switch lock noise and increasing battery life. Since the potentiometer resistance does not change after power failure, even if the battery is replaced, the factory settings are restored, and other restart operations will not affect the angle detection. In addition, the user is more informed of the position of the lock knob or the unlocking and locking conditions.
[0088] Please participate Figure 3 , Figure 3 This is a flow chart of another smart lock control method provided in an embodiment of the present application. The smart lock control method described in this embodiment is applied to a smart lock, which includes a voice prompt device, a knob, and a potentiometer geared to the knob shaft of the knob, wherein the knob shaft rotates synchronously with the potentiometer. The smart lock control method may include the following steps:
[0089] 301. Obtain a target resistance value of the potentiometer.
[0090] 302. Determine a target actual angle value corresponding to the target resistance value.
[0091] 303. Determine a target position of the knob according to the target actual angle value.
[0092] 304. When the target position is within a preset position range, detect a duration of the target position.
[0093] 305. When the duration is greater than a preset duration, generate a second prompt message.
[0094] 306. Play the second prompt information through the voice prompt device.
[0095] The detailed description of steps 301 to 306 can refer to the above Figure 1A The relevant steps of the described smart lock control method will not be repeated here.
[0096] As can be seen, the smart lock control method described in the embodiment of the present application is applied to a smart lock. The smart lock includes a knob and a potentiometer gear-linked to the knob shaft of the knob. The knob shaft rotates synchronously with the potentiometer to obtain a target resistance value of the potentiometer, determine a target actual angle value corresponding to the target resistance value, and determine the target position of the knob based on the target actual angle value. When the target position is within a preset position range, the duration of the target position is detected. When the duration is greater than the preset duration, a second prompt message is generated and played through a voice prompt device. Furthermore, since the real-time angle value of the knob position can be calculated by reading the resistance value of the potentiometer, the detection accuracy of the knob position of the smart lock is improved. In addition, due to the improved angle detection accuracy, the lock is in place without relying on the motor stalling method, which improves the motor life, reduces the lock lock noise, and increases the battery life. Since the potentiometer resistance does not change after power failure, even if the battery is replaced, the restart operation such as restoring the factory settings will not affect the angle detection. In addition, prompting the user to close the lock helps to improve security.
[0097] In accordance with the above embodiment, please refer to Figure 4 , Figure 4 : is a schematic diagram of the structure of a smart lock provided in an embodiment of the present application. As shown in the figure, the smart lock includes a processor, a memory, a communication interface, and one or more programs. The one or more programs are stored in the memory and are configured to be executed by the processor. The smart lock also includes a knob and a potentiometer gear-linked to the knob shaft of the knob, and the knob shaft rotates synchronously with the potentiometer. In the embodiment of the present application, the program includes instructions for executing the following steps:
[0098] Obtaining a target resistance value of the potentiometer;
[0099] determining a target actual angle value corresponding to the target resistance value;
[0100] The target position of the knob is determined according to the target actual angle value.
[0101] Optionally, the smart lock further includes a microprocessor, which is connected to the potentiometer; the microprocessor includes an analog-to-digital conversion interface;
[0102] The potentiometer includes a reference voltage power supply and a variable resistor, wherein two fixed ends of the variable resistor are respectively connected to the reference voltage power supply and ground; and a sliding end of the variable resistor is connected to the analog-to-digital conversion interface;
[0103] In terms of obtaining the target resistance value of the potentiometer, the program includes instructions for executing the following steps:
[0104] Obtaining a preset calibration value of the potentiometer;
[0105] Acquire the current resistance value of the potentiometer through the analog-to-digital conversion interface;
[0106] The target resistance value is determined according to the current resistance value and the preset calibration value.
[0107] Optionally, in determining the target actual angle value corresponding to the target resistance value, the program includes instructions for performing the following steps:
[0108] According to the mapping relationship between the preset resistance value and the actual angle value, the target actual angle value corresponding to the target resistance value is determined.
[0109] Optionally, in determining the target actual angle value corresponding to the target resistance value according to the mapping relationship between the preset resistance value and the actual angle value, the program includes instructions for executing the following steps:
[0110] Determine the reference actual angle value corresponding to the target resistance value according to the mapping relationship between the preset resistance value and the actual angle value;
[0111] Get target environment parameters;
[0112] determining a target fine-tuning parameter corresponding to the target environmental parameter;
[0113] The reference actual angle value is adjusted according to the target fine-tuning parameter to obtain the target actual angle value.
[0114] Optionally, the target environmental parameters include external environmental parameters and internal environmental parameters; in determining the target fine-tuning parameters corresponding to the target environmental parameters, the program includes instructions for executing the following steps:
[0115] determining a reference fine-tuning parameter corresponding to the internal environment parameter;
[0116] Determining a target optimization factor corresponding to the external environment parameter;
[0117] The reference fine-tuning parameter is adjusted according to the target optimization factor to obtain the target fine-tuning parameter.
[0118] Optionally, the smart lock further includes a display device. After determining the target position of the knob according to the target actual angle value, the program further includes instructions for executing the following steps:
[0119] Determining first prompt information corresponding to the target location;
[0120] The first prompt information is displayed on the display device.
[0121] Optionally, the smart lock further includes a voice prompt device. After determining the target position of the knob according to the target actual angle value, the program further includes instructions for executing the following steps:
[0122] When the target position is within a preset position range, detecting a duration of the target position;
[0123] When the duration is longer than a preset duration, generating a second prompt message;
[0124] The second prompt information is played through the voice prompt device.
[0125] It can be seen that the smart lock described in the embodiment of the present application includes a knob and a potentiometer that is gear-linked to the knob shaft of the knob. The knob shaft rotates synchronously with the potentiometer to obtain the target resistance value of the potentiometer, determine the target actual angle value corresponding to the target resistance value, and determine the target position of the knob based on the target actual angle value. Furthermore, since the real-time angle value of the knob position can be calculated by reading the resistance value of the potentiometer, the detection accuracy of the knob position of the smart lock is improved. In addition, due to the improvement in the angle detection accuracy, the switch lock does not need to be detected by motor stalling, which improves the life of the motor while reducing the switch lock noise and increasing battery life. Since the resistance value of the potentiometer does not change after power failure, even if the battery is replaced, the factory settings are restored, and other restart operations will not affect the angle detection.
[0126] Figure 5 This is a functional unit block diagram of a smart lock control device 500 involved in an embodiment of the present application. The smart lock control device 500 is applied to a smart lock, and the smart lock includes a knob and a potentiometer gear-linked with the knob shaft of the knob, and the knob shaft rotates synchronously with the potentiometer; the device 500 includes: an acquisition unit 501, a first determination unit 502, and a second determination unit 503, wherein,
[0127] The acquisition unit 501 is used to acquire the target resistance value of the potentiometer;
[0128] The first determining unit 502 is configured to determine a target actual angle value corresponding to the target resistance value;
[0129] The second determining unit 503 is configured to determine a target position of the knob according to the target actual angle value.
[0130] Optionally, the smart lock further includes a microprocessor, which is connected to the potentiometer; the microprocessor includes an analog-to-digital conversion interface;
[0131] The potentiometer includes a reference voltage power supply and a variable resistor, wherein two fixed ends of the variable resistor are respectively connected to the reference voltage power supply and ground; and a sliding end of the variable resistor is connected to the analog-to-digital conversion interface;
[0132] In terms of obtaining the target resistance value of the potentiometer, the obtaining unit 501 is specifically configured to:
[0133] Obtaining a preset calibration value of the potentiometer;
[0134] Acquire the current resistance value of the potentiometer through the analog-to-digital conversion interface;
[0135] The target resistance value is determined according to the current resistance value and the preset calibration value.
[0136] Optionally, in determining the target actual angle value corresponding to the target resistance value, the first determining unit 502 is specifically configured to:
[0137] According to the mapping relationship between the preset resistance value and the actual angle value, the target actual angle value corresponding to the target resistance value is determined.
[0138] Optionally, in determining the target actual angle value corresponding to the target resistance value according to the preset mapping relationship between the resistance value and the actual angle value, the first determining unit 502 is specifically configured to:
[0139] Determine the reference actual angle value corresponding to the target resistance value according to the mapping relationship between the preset resistance value and the actual angle value;
[0140] Get target environment parameters;
[0141] determining a target fine-tuning parameter corresponding to the target environmental parameter;
[0142] The reference actual angle value is adjusted according to the target fine-tuning parameter to obtain the target actual angle value.
[0143] Optionally, the target environment parameters include external environment parameters and internal environment parameters; in determining the target fine-tuning parameters corresponding to the target environment parameters, the first determining unit 502 is specifically configured to:
[0144] determining a reference fine-tuning parameter corresponding to the internal environment parameter;
[0145] Determining a target optimization factor corresponding to the external environment parameter;
[0146] The reference fine-tuning parameter is adjusted according to the target optimization factor to obtain the target fine-tuning parameter.
[0147] Optionally, the smart lock further includes a display device. After determining the target position of the knob according to the target actual angle value, the device 500 is further specifically configured to:
[0148] Determining first prompt information corresponding to the target location;
[0149] The first prompt information is displayed on the display device.
[0150] Optionally, the smart lock further includes a voice prompt device. After determining the target position of the knob according to the target actual angle value, the device 500 is further specifically configured to:
[0151] When the target position is within a preset position range, detecting a duration of the target position;
[0152] When the duration is longer than a preset duration, generating a second prompt message;
[0153] The second prompt information is played through the voice prompt device.
[0154] It can be seen that the smart lock control device described in the embodiment of the present application is applied to a smart lock. The smart lock includes a knob and a potentiometer gear-linked to the knob shaft of the knob. The knob shaft rotates synchronously with the potentiometer to obtain the target resistance of the potentiometer, determine the target actual angle value corresponding to the target resistance value, and determine the target position of the knob based on the target actual angle value. Furthermore, since the real-time angle value of the knob position can be calculated by reading the resistance value of the potentiometer, the detection accuracy of the knob position of the smart lock is improved. In addition, due to the improvement in the angle detection accuracy, the switch lock does not need to be detected by stalling the motor, which improves the life of the motor while reducing the switch lock noise and increasing the battery life. Since the resistance of the potentiometer does not change after power failure, even if the battery is replaced, the factory settings are restored, and other restart operations will not affect the angle detection.
[0155] It can be understood that the functions of each program module of the smart lock control device of this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment and will not be repeated here.
[0156] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiment, and the above computer includes a smart lock.
[0157] The present application also provides a computer program product comprising a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include a smart lock.
[0158] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0159] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0160] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0161] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0162] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0163] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0164] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0165] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A smart lock control method, characterized in that: Applied to a smart lock, the smart lock includes a knob and a potentiometer gear-linked to a knob shaft of the knob, the knob shaft and the potentiometer rotating synchronously; the method includes: Obtaining a target resistance value of the potentiometer; determining a target actual angle value corresponding to the target resistance value; Determining a target position of the knob according to the target actual angle value; Wherein, determining the target actual angle value corresponding to the target resistance value includes: Determining the target actual angle value corresponding to the target resistance value according to a preset mapping relationship between the resistance value and the actual angle value; The step of determining the target actual angle value corresponding to the target resistance value according to a mapping relationship between a preset resistance value and an actual angle value includes: Determine the reference actual angle value corresponding to the target resistance value according to the mapping relationship between the preset resistance value and the actual angle value; Get target environment parameters; determining a target fine-tuning parameter corresponding to the target environmental parameter; Adjusting the reference actual angle value according to the target fine-tuning parameter to obtain the target actual angle value; The target environment parameters include external environment parameters and internal environment parameters; the external environment parameters include: magnetic field interference intensity; the internal environment parameters include at least one of the following: friction of the knob shaft, number of unlocking times of the smart lock; the target fine-tuning parameters corresponding to the target environment parameters are determined, including: determining a reference fine-tuning parameter corresponding to the internal environment parameter; Determining a target optimization factor corresponding to the external environment parameter; The reference fine-tuning parameter is adjusted according to the target optimization factor to obtain the target fine-tuning parameter.
2. The method according to claim 1, characterized in that The smart lock further includes a microprocessor connected to the potentiometer; the microprocessor includes an analog-to-digital conversion interface; The potentiometer includes a reference voltage power supply and a variable resistor, wherein two fixed ends of the variable resistor are connected to the reference voltage power supply and ground respectively; The sliding end of the variable resistor is connected to the analog-to-digital conversion interface; The obtaining of the target resistance value of the potentiometer includes: Obtaining a preset calibration value of the potentiometer; Acquire the current resistance value of the potentiometer through the analog-to-digital conversion interface; The target resistance value is determined according to the current resistance value and the preset calibration value.
3. The method according to claim 1 or 2, characterized in that The smart lock further includes a display device. After determining the target position of the knob according to the target actual angle value, the method further includes: Determining first prompt information corresponding to the target location; The first prompt information is displayed on the display device.
4. The method according to claim 1 or 2, characterized in that The smart lock further includes a voice prompt device. After determining the target position of the knob according to the target actual angle value, the method further includes: When the target position is within a preset position range, detecting a duration of the target position; When the duration is longer than a preset duration, generating a second prompt message; The second prompt information is played through the voice prompt device.
5. A smart lock control device, characterized in that: Applied to a smart lock, the smart lock includes a knob and a potentiometer gear-linked with the knob shaft of the knob, the knob shaft and the potentiometer rotate synchronously; the device includes: an acquisition unit, a first determination unit and a second determination unit, wherein, The acquiring unit is configured to acquire a target resistance value of the potentiometer; The first determining unit is configured to determine a target actual angle value corresponding to the target resistance value; The second determining unit is configured to determine a target position of the knob according to the target actual angle value; Wherein, determining the target actual angle value corresponding to the target resistance value includes: Determining the target actual angle value corresponding to the target resistance value according to a preset mapping relationship between the resistance value and the actual angle value; The step of determining the target actual angle value corresponding to the target resistance value according to a mapping relationship between a preset resistance value and an actual angle value includes: Determine the reference actual angle value corresponding to the target resistance value according to the mapping relationship between the preset resistance value and the actual angle value; Get target environment parameters; determining a target fine-tuning parameter corresponding to the target environmental parameter; Adjusting the reference actual angle value according to the target fine-tuning parameter to obtain the target actual angle value; The target environment parameters include external environment parameters and internal environment parameters; the external environment parameters include: magnetic field interference intensity; the internal environment parameters include at least one of the following: friction of the knob shaft, number of unlocking times of the smart lock; the target fine-tuning parameters corresponding to the target environment parameters are determined, including: determining a reference fine-tuning parameter corresponding to the internal environment parameter; Determining a target optimization factor corresponding to the external environment parameter; The reference fine-tuning parameter is adjusted according to the target optimization factor to obtain the target fine-tuning parameter.
6. A smart lock, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the programs include instructions for executing the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Latch state detecting system and method thereof
CN104675199A
Lock state monitoring device, method, lock driving device and lock assembly
CN110036169A
Door lock warning method and device, intelligent door lock and readable storage medium
CN110306878A
Driving seat intelligent control method, domain controller and related device
CN115649094A