Knob module, knob module state determination method and apparatus, and electronic device
By introducing a knob module into the smart door lock, the combination of cam and mechanical switches is used to solve the problem of electronic sensors being easily disturbed, and stable knob status detection is achieved, improving user safety and operating experience.
Patent Information
- Application Number
- CN202410188568.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-20
- Publication Date
- 2025-08-22
AI Technical Summary
The existing methods of smart door locks to detect the knob status mainly rely on electronic sensors, such as radioactive photoelectric sensors and Hall sensors, which are susceptible to environmental interference and electronic interference, resulting in detection errors and affecting user safety and operating experience.
A knob module is adopted, including a controller, a knob, a cam and a mechanical switch. The cam is divided into two laminated intervals, each interval has multiple raised points. The signal is triggered by the mechanical switch. The controller determines the knob status according to the number of signals, and uses fewer mechanical switches to realize the detection of multiple specific positions.
It improves the anti-interference of knob detection, reduces the cost of using mechanical switches, ensures the stability and user safety of knob status detection, and improves the operating experience.
Smart Images

Figure CN120527178A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart door locks, and in particular to a knob module, a method and device for determining the state of a knob module, and an electronic device. Background Art
[0002] Smart door locks typically control the lock state by detecting the status of a knob. When the knob indicates the door needs to be opened, the smart door lock opens; when the knob indicates the door needs to be closed, the smart door lock closes. Therefore, detecting the knob state is crucial in the smart door lock control process. Failure to detect the knob state will directly affect user safety and the user's experience with the door lock.
[0003] Currently, smart door locks typically detect knob status using electronic sensors, such as through-beam photoelectric sensors and Hall effect sensors. However, these sensors are susceptible to environmental and electrical interference, leading to detection errors or failure to detect, thus compromising user safety and the user experience of the door lock. For example, if a complex environmental magnetic field interferes with the Hall effect sensor or dust obscures the photoelectric sensor, knob status detection will be impossible. Summary of the Invention
[0004] This application provides a knob module, a method and device for determining the status of a knob module, and an electronic device to address the technical problem that existing methods for detecting knob status in smart door locks generally use electronic sensors, such as through-beam photoelectric sensors and Hall sensors. However, these electronic sensors are susceptible to environmental interference and electronic interference, resulting in detection errors or failure to detect, thereby failing to ensure user safety and the user's operational experience of the door lock.
[0005] In a first aspect, the present application provides a knob module, the knob module comprising a controller, a knob, a cam, a first mechanical switch, and a second mechanical switch;
[0006] The controller is connected to the first mechanical switch and the second mechanical switch respectively;
[0007] The knob is connected to the cam, and the cam includes a first section and a second section arranged in a stacked manner. The first section includes a plurality of first protrusions, and the second section includes a plurality of second protrusions. Each of the first protrusions corresponds to a state of the knob, and a different number of second protrusions corresponds between each two adjacent first protrusions.
[0008] The first mechanical switch is triggered by any one of the first protrusion points, and the second mechanical switch is triggered by any one of the second protrusion points.
[0009] As a possible implementation manner, the knob is connected to the cam via a coupling.
[0010] In a second aspect, an embodiment of the present application provides a method for determining the state of a knob module, which is applied to the controller in the knob module described in the first aspect, and the method includes:
[0011] determining, upon receiving a first signal sent by a first mechanical switch, the number of second signals currently received and sent by a second mechanical switch; wherein, when the first mechanical switch is triggered by a first raised point on a cam, the first signal is sent to a controller; and when the second mechanical switch is triggered by a second raised point on the cam, the second signal is sent to the controller;
[0012] Based on the quantity, the current target state of the knob module is determined.
[0013] As a possible implementation, before receiving the first signal sent by the first mechanical switch, the method further includes:
[0014] Upon receiving the last first signal sent by the first mechanical switch, updating a preset counter to a first value;
[0015] each time the second signal sent by the second mechanical switch is received, adding a second value to a preset counter;
[0016] The step of determining, upon receiving the first signal sent by the first mechanical switch, the number of second signals currently received and sent by the second mechanical switch, includes:
[0017] acquiring a current count value of the counter when the first signal sent by the first mechanical switch is currently received;
[0018] determining the count value as the number of second signals sent by the second mechanical switch;
[0019] After determining the count value as the number of second signals sent by the second mechanical switch, the method further includes:
[0020] Update the current count value of the counter to the first value.
[0021] As a possible implementation, determining the current target state of the knob module based on the quantity includes:
[0022] Based on the number, determining a target first protrusion point currently triggering the first mechanical switch;
[0023] Determine a current target raised point state corresponding to the target first raised point;
[0024] The target raised point state currently corresponding to the target first raised point is determined as the current target state of the knob module.
[0025] As a possible implementation, determining the target first raised point for currently triggering the first mechanical switch based on the quantity includes:
[0026] Determine the current rotation direction of the knob;
[0027] Determine two initial first raised points corresponding to the number;
[0028] An initial first protruding point corresponding to the end point of the rotation direction is determined as a target first protruding point currently triggering the first mechanical switch.
[0029] As a possible implementation, the first mechanical switch includes a first trigger point and a second trigger point located on different sides, and the first signal includes a first sub-signal and a second sub-signal; wherein, when the first trigger point of the first mechanical switch is triggered, the first sub-signal is sent to the controller; and when the second trigger point of the first mechanical switch is triggered, the second sub-signal is sent to the controller;
[0030] Determining a target first protrusion point for currently triggering the first mechanical switch based on the quantity includes:
[0031] Determine two initial first raised points corresponding to the number;
[0032] determining whether the first signal is the first sub-signal or the second sub-signal;
[0033] In a case where the first signal is determined to be the first sub-signal, determining an initial first convex point corresponding to the first sub-signal as a target first convex point;
[0034] In a case where the first signal is determined to be the second sub-signal, the initial first convex point corresponding to the second sub-signal is determined as the target first convex point.
[0035] As a possible implementation manner, determining the target raised point state currently corresponding to the target first raised point includes:
[0036] Obtaining an initial state corresponding to the first raised point of the target;
[0037] determining the number of states of the initial state;
[0038] According to the number of states, a target raised point state currently corresponding to the target first raised point is determined.
[0039] As a possible implementation, determining the target raised point state currently corresponding to the target first raised point according to the number of states includes:
[0040] When the number of states is one, the initial state is determined to be the target raised point state currently corresponding to the target first raised point;
[0041] In the case where there are multiple states, determining the current rotation direction of the knob;
[0042] determining a next first protruding point of the knob module according to the rotation direction;
[0043] According to the next first raised point, a target raised point state currently corresponding to the target first raised point is determined from the multiple initial states.
[0044] As a possible implementation, determining the current rotation direction of the knob includes:
[0045] determining whether the knob is rotated by the motor;
[0046] When it is determined that the knob is rotated by the motor, obtaining the rotation direction of the motor; and determining the rotation direction of the motor as the current rotation direction of the knob;
[0047] When it is determined that the knob is rotated by a non-motor method, determining whether the first mechanical switch has sent a historical first signal during the current rotation;
[0048] When it is determined that the first mechanical switch has sent the historical first signal, obtaining a historical number of second signals corresponding to each historical first signal;
[0049] Arrange the historical quantities and the quantities in chronological order to obtain a quantity sequence;
[0050] The number sequence is compared with a preset number sequence to obtain a rotation direction corresponding to the number sequence.
[0051] As a possible implementation, it also includes:
[0052] When it is determined that the first mechanical switch has not sent the historical first signal, it is determined that the current target state of the knob module is rotating.
[0053] In a third aspect, an embodiment of the present application provides a device for determining the state of a knob module, which is applied to the controller in the knob module described in the first aspect, and the device includes:
[0054] a first determining module, configured to, upon receiving a first signal sent by a first mechanical switch, determine a number of second signals currently received from a second mechanical switch; wherein, when the first mechanical switch is triggered by a first protruding point on a cam, the first signal is sent to a controller; and when the second mechanical switch is triggered by a second protruding point on the cam, the second signal is sent to the controller;
[0055] The second determining module is configured to determine a current target state of the knob module based on the quantity.
[0056] In a fourth aspect, an embodiment of the present application provides an electronic device comprising: a processor and a memory, wherein the processor is configured to execute a knob module state determination program stored in the memory to implement the knob module state determination method described in any one of the second aspects.
[0057] In a fifth aspect, an embodiment of the present application provides a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the state determination method of the knob module described in any one of the second aspects.
[0058] The technical solution provided by the embodiment of the present application determines the number of second signals currently received from the second mechanical switch upon receiving a first signal from the first mechanical switch; wherein, when the first mechanical switch is triggered by the first raised point on the cam, the first signal is sent to the controller; when the second mechanical switch is triggered by the second raised point on the cam, the second signal is sent to the controller, and based on the above number, the current target state of the knob module is determined. This technical solution connects the knob to a cam, and the cam is divided into two stacked sections, each corresponding to a mechanical switch and having multiple raised points. The raised points can trigger the mechanical switch to send a signal. The first raised point in the first section can be used to mark the knob state. The number of second raised points between the two first raised points can be used to determine the target first raised point that triggers the mechanical switch, thereby determining the knob state corresponding to the target first raised point. This technology uses fewer mechanical switches to detect multiple specific positions in the knob, thereby determining the knob state, thereby improving the anti-interference performance of the knob detection, reducing the cost of using mechanical switches to detect the knob, and simplifying the structure, thereby achieving stable knob state detection, ensuring user safety and user experience of the door lock. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0061] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0062] Figure 1 A schematic diagram of an application scenario of a knob in a smart door lock provided in an embodiment of the present application;
[0063] Figure 2 A schematic structural diagram of a knob module provided in an embodiment of the present application;
[0064] Figure 3 A side view of a cam provided in an embodiment of the present application;
[0065] Figure 4 A flowchart of an embodiment of a method for determining the state of a knob module provided in an embodiment of the present application;
[0066] Figure 5 A flowchart of an embodiment of determining a target first raised point provided in an embodiment of the present application;
[0067] Figure 6 A flowchart of another embodiment of determining a target first protruding point provided in an embodiment of the present application;
[0068] Figure 7 A flowchart of an embodiment of determining the state of a target raised point provided in an embodiment of the present application;
[0069] Figure 8 This is a block diagram of an embodiment of a device for determining the state of a knob module provided in an embodiment of the present application;
[0070] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. 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.
[0072] The disclosure below provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, these are merely examples and are not intended to limit the present application. In addition, the present application may repeat reference numbers and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.
[0073] To address the existing problem of detecting the status of a knob in a smart door lock, which is generally achieved through electronic sensors, such as through-beam photoelectric sensors and Hall sensors. However, these electronic sensors are susceptible to environmental interference and electronic interference, resulting in detection errors or failure to detect, thereby failing to ensure user safety and the user's operating experience of the door lock. The present application provides a knob module, a knob module status determination method, device, and electronic device. The method can connect a knob to a cam, and divide the cam into two stacked sections, each section corresponding to a mechanical switch. Each section has multiple raised points, each of which can trigger the mechanical switch to send a signal. A first raised point in the first section can be used to mark the knob status. The number of second raised points between the two first raised points can be used to determine the target first raised point that triggers the mechanical switch, thereby determining the knob status corresponding to the target first raised point. The method uses fewer mechanical switches to detect multiple specific positions in the knob, thereby determining the knob status. This improves the anti-interference performance of the knob detection, reduces the cost of using a mechanical switch to detect the knob, and has a simple structure, thereby achieving stable knob status detection, ensuring user safety and the user's operating experience of the door lock.
[0074] To facilitate understanding of the knob module provided in the embodiments of the present application, the following first uses the application of a knob in the prior art in a smart door lock as an example:
[0075] See also Figure 1 , is a schematic diagram of an application scenario of a knob in a smart door lock provided by an embodiment of the present application. Figure 1 As shown, the smart door lock can include three situations: counterclockwise locking, unlocking, and clockwise locking.
[0076] Among them, such as Figure 1 As shown, the knob of a smart door lock is where the user manually opens and closes the lock. In addition to manual opening and closing, the knob also rotates to open or close the lock in electronic lock mode. Generally, when a smart door lock is in use, the knob only has two specific positions: unlock and lock. Taking into account the different ways users install the door lock (clockwise or counterclockwise), there are two lock positions, located on the left and right sides of the knob. The unlock position is generally located in the middle of the knob.
[0077] In actual applications, considering that some businesses need to set two specific positions between unlocking and locking to wake up the device in advance or detect the direction of knob rotation, the number of specific knob positions that need to be detected in smart door lock devices is generally 5 or more.
[0078] In the prior art, a common solution is to use three photoelectric sensors to detect the three switch positions and two Hall sensors to detect the position between the two switches. However, this implementation method is easily affected by the operating environment of the smart door lock. If the complex environmental magnetic field interferes with the Hall sensors or dust obscures the photoelectric sensors, this solution will fail, resulting in detection errors or even failure to detect, thus failing to ensure user safety and the user experience of the door lock.
[0079] In this regard, an embodiment of the present application provides a knob module that can utilize fewer mechanical switches to achieve the function of detecting multiple specific positions in the knob, thereby determining the state of the knob.
[0080] The following describes the knob module provided in the embodiment of the present application with reference to the accompanying drawings:
[0081] See also Figure 2 , is a structural diagram of a knob module provided in an embodiment of the present application. Figure 2 As shown, the knob module 20 may include: a controller 21, a knob 22, a cam 23, a first mechanical switch 24, and a second mechanical switch 25;
[0082] The controller 21 is a command device that changes the wiring of the main circuit or control circuit and the resistance value in the circuit according to a predetermined sequence to control the starting, speed regulation, braking, and reversing of the motor. It can be composed of a program counter, an instruction register, an instruction decoder, a timing generator, and an operation controller. It is the "decision-making body" that issues commands, that is, it coordinates and directs the operations of the entire computer system.
[0083] In an embodiment of the present application, the above-mentioned controller 21 can be used to execute the state determination method of the knob module provided in the embodiment of the present application. As for how to execute the state determination method of the knob module provided in the embodiment of the present application, it can be explained below and will not be described in detail here.
[0084] The knob 22 is a rotatable element, and its rotation angle may include but is not limited to: 90°, 180°, and 360°, etc. The knob 22 may be a knob in a smart door lock or a knob in other devices, and the present embodiment does not limit this.
[0085] The above-mentioned cam 23 refers to a mechanical rotating or sliding part (such as a wheel or a protruding part of a wheel) which transmits motion to a roller moving close to its edge or a needle bar moving freely on a groove surface, or it receives force from such rollers and needle bars.
[0086] The first mechanical switch 24 and the second mechanical switch 25 are switches that use mechanical touch to change the on / off state of a circuit. Optionally, when the first mechanical switch 24 and the second mechanical switch 25 are triggered, they may generate corresponding signals and send the generated signals to the controller 21.
[0087] In the embodiment of the present application, the above-mentioned knob 22 can be connected to the cam 23, and the above-mentioned cam 23 can be divided into a first interval 231 and a second interval 232 that are stacked, and each interval includes multiple protrusion points. The above-mentioned first interval 231 may include multiple first protrusion points, and the above-mentioned second interval 232 may include multiple second protrusion points.
[0088] For example, see Figure 3 , is a side view of a cam provided in an embodiment of the present application. Figure 3 As shown, the first mechanical switch 24 and the second mechanical switch 25 are located at the same position of the cam, which correspond to the first interval and the second interval of the cam respectively. Figure 3 The black raised points (A, B, C, D) in the figure are the first raised points. Figure 3 The blank raised point in may be the second raised point.
[0089] Each first raised point may correspond to a state of the knob, which may include but is not limited to: open, closed, rotating, opening, and closing. For example, when a first raised point of the cam 23 is connected to a mechanical switch, the current state of the knob is the state corresponding to the first raised point.
[0090] Furthermore, in order to facilitate determination of the target first raised point corresponding to the current state of the knob 22, in the embodiment of the present application, a second raised point is provided, and a different number of second raised points may correspond between each two adjacent first raised points.
[0091] Furthermore, in order to avoid error detection, the knob 22 can be connected to the cam 23 via a coupling. According to this connection method, the knob 22 drives the cam 23 to rotate, that is, the cam 23 rotates one circle when the knob 22 rotates one circle.
[0092] Furthermore, the controller 21 may be connected to the first mechanical switch 24 and the second mechanical switch 25 respectively, and may be configured to receive signals sent by the first mechanical switch 24 and the second mechanical switch 25 .
[0093] Furthermore, the first mechanical switch 24 can be triggered by any one of the first raised points, that is, the first mechanical switch 24 can correspond to the first interval 231 of the cam 23; the second mechanical switch 25 can be triggered by any one of the second raised points, that is, the second mechanical switch 25 can correspond to the second interval 232 of the cam 23.
[0094] Optionally, in order to reduce the wear of the cam 23 during operation, the cam 23 may be made of a wear-resistant material and grease may be used between the cam 23 and the first mechanical switch 24 and the second mechanical switch 25 .
[0095] When the first mechanical switch 24 is triggered by any first protrusion point, a first signal is generated and sent to the controller 21 ; when the second mechanical switch 25 is triggered by any second protrusion point, a second signal is generated and sent to the controller 21 .
[0096] Based on this, in the embodiment of the present application, the controller 21 can determine the current position of the knob 22 and the corresponding knob state based on the received first signal and second signal using the state determination method of the knob module provided in the embodiment of the present application.
[0097] The following further explains the method for determining the state of the knob module provided in the present application with reference to specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present application.
[0098] See also Figure 4 , is a flow chart of an embodiment of a method for determining the state of a knob module provided in an embodiment of the present application. As an embodiment, Figure 4 The process shown can be applied to Figure 2 The controller 21 in the knob module is shown. Figure 4 As shown, the process may include the following steps:
[0099] Step 401: upon receiving a first signal sent by a first mechanical switch, determine the number of second signals currently received from a second mechanical switch, wherein when the first mechanical switch is triggered by a first raised point on a cam, the first signal is sent to a controller; and when the second mechanical switch is triggered by a second raised point on the cam, the second signal is sent to the controller.
[0100] Step 402: Based on the above quantity, determine the current target state of the knob module.
[0101] The following is a unified description of step 401 and step 402:
[0102] By Figure 2 From the description of the knob module, it can be seen that the knob can be connected to a cam, and the two can rotate synchronously, wherein the cam may include a first interval and a second interval, the first interval may include a first protrusion point, and the second interval may include a second protrusion point, and each of the above first protrusion points may correspond to a state of the knob.
[0103] Furthermore, when the first protrusion point triggers the first mechanical switch, the first mechanical switch may generate a first signal and send the first signal to the controller; when the second protrusion point triggers the second mechanical switch, the second mechanical switch may generate a second signal and send the second signal to the controller.
[0104] Based on this, when the executive body of the embodiment of the present application receives the first signal sent by the first mechanical switch, it indicates that the position of the knob at this time corresponds to a first raised point of the cam. Therefore, the executive body of the embodiment of the present application can determine the target first raised point that triggers the first mechanical switch at this time, and determine the target state corresponding to the target first raised point, thereby determining the target state as the current state of the knob.
[0105] In the embodiment of the present application, Figure 2 As can be seen from the description, a different number of second raised points can correspond between each pair of adjacent first raised points of the cam. Therefore, upon receiving a first signal from a first mechanical switch, the embodiment of the present application can determine the number of second signals currently received from a second mechanical switch. Subsequently, the current target state of the knob module can be determined based on the number of second signals.
[0106] As an exemplary embodiment, the controller of the knob module may include a counter that is configured to count received second signals. To determine the number of second raised points between each two adjacent first raised points, the controller may update a preset counter to a first value (e.g., 0) upon receiving the last first signal sent by the first mechanical switch. That is, each time the first mechanical switch is triggered, the counter is reset to zero, thereby counting the number of second signals received between two adjacent triggerings of the first mechanical switch.
[0107] Optionally, before receiving the first signal sent by the first mechanical switch, the controller adds a second value (for example, 1) to a preset counter each time it receives the second signal sent by the second mechanical switch.
[0108] Afterwards, when the first signal sent by the first mechanical switch is received, the counter can be controlled to stop counting and the current count value of the counter can be obtained.
[0109] Thereafter, the current count value of the counter may be determined as the number of the second signals sent by the second mechanical switch.
[0110] Finally, after determining the number of second signals sent by the second mechanical switch, the counter completes counting the number of second protrusion points between the previous first protrusion point and the corresponding first protrusion point this time, so the current count value of the counter can be updated to the above-mentioned first value.
[0111] In one embodiment, when determining the current target state of the knob module based on the number of the second signals, the controller may first determine the target first protrusion point that currently triggers the first mechanical switch based on the number.
[0112] As for how to determine the target first protrusion point currently triggering the first mechanical switch based on the above quantity, it can be respectively described below. Figure 5 and Figure 6 The process shown is explained below and will not be described in detail here.
[0113] Afterwards, each first protrusion point in the first interval of the cam can correspond to one or more protrusion point states, and the protrusion point states can correspond one-to-one to the states of the knob. Based on this, the target protrusion point state currently corresponding to the target first protrusion point can be determined, and the above-mentioned target protrusion point state currently corresponding to the target first protrusion point can be determined as the current target state of the knob module.
[0114] As for how to determine the current state of the target convex point corresponding to the target first convex point, it can be determined in the following manner. Figure 7 The process shown is explained below and will not be described in detail here.
[0115] The technical solution provided by the embodiment of the present application determines the number of second signals currently received from a second mechanical switch upon receiving a first signal from a first mechanical switch; wherein, when the first mechanical switch is triggered by a first raised point on a cam, the first signal is sent to a controller; when the second mechanical switch is triggered by a second raised point on the cam, the second signal is sent to the controller, and based on the above number, the current target state of the knob module is determined. This technical solution connects a knob to a cam, and the cam is divided into two stacked sections, each corresponding to a mechanical switch and having multiple raised points. The raised points can trigger the mechanical switch to send a signal. The first raised point in the first section can be used to mark the knob state. The number of second raised points between the two first raised points can be used to determine the target first raised point that triggers the mechanical switch, thereby determining the knob state corresponding to the target first raised point. This technology uses fewer mechanical switches to detect multiple specific positions in the knob, thereby determining the knob state, improving the anti-interference performance of the knob detection, reducing the cost of using mechanical switches to detect the knob, and simplifying the structure, thereby achieving stable knob state detection, ensuring user safety and user experience of the door lock.
[0116] See also Figure 5 , is a flow chart of an embodiment of determining the first protruding point of a target provided in an embodiment of the present application. Figure 5 The process shown in Figure 4 Based on the process shown in FIG, it is described how to determine the target first protrusion point for triggering the first mechanical switch based on the number of received second signals. Figure 5 As shown, the process may include the following steps:
[0117] Step 501: Determine the current rotation direction of the knob.
[0118] The above-mentioned rotation direction refers to the direction in which the knob is rotated relative to the same viewing angle. For example, relative to the user's viewing angle, the direction in which the knob is rotated can be clockwise or counterclockwise, and this embodiment of the present application does not impose any restrictions on this.
[0119] In actual applications, smart door locks can be turned on and off manually or electronically. Based on this, the knob can be rotated by a motor or manually.
[0120] In one embodiment, when determining the current rotation direction of the knob, the execution subject of the embodiment of the present application may first determine whether the knob is rotated by a motor.
[0121] Optionally, when it is determined that the knob is rotated by a motor, since the motor drives the knob to rotate, the motor rotation is in the same direction as the knob rotation direction. Therefore, the motor rotation direction can be obtained and determined as the current rotation direction of the knob.
[0122] Conversely, if the knob is determined to be rotated by a non-motor mechanism, it can be determined whether the first mechanical switch has previously sent a first signal during the current rotation. Optionally, if it is determined that the first mechanical switch has previously sent a first signal, this indicates that the first raised point corresponding to the currently received first signal is not the first raised point of the current rotation. The number of historical second signals corresponding to each historical first signal can be obtained.
[0123] Afterwards, the historical quantities and quantities may be arranged in chronological order to obtain a quantity sequence, and the quantity sequence may be compared with a preset quantity sequence to obtain a rotation direction corresponding to the quantity sequence.
[0124] For example, Figure 3 Taking the side view of the cam shown as an example, it is assumed that the initial position of this rotation is point A, that is, before the knob rotates, the first protrusion point at point A contacts the first mechanical switch. At this time, the knob has not rotated yet, so the state determination method of the knob module provided in the embodiment of the present application may not be triggered.
[0125] On this basis, assuming that the user rotates 90° counterclockwise and rotates point B to the first mechanical switch, the first raised point at point B can trigger the first mechanical switch to generate a first signal. When the controller receives the first signal, it can determine that this first signal is the first first signal received during this rotation process. Figure 3 As we know, during the rotation from point A to point B, there is no second raised point between points A and B, so no second signal is received during this process. Therefore, from the controller's perspective, it is impossible to determine whether the rotation is from point A to point B or from point B to point A.
[0126] Therefore, when it is determined that the first mechanical switch does not send multiple historical first signals, it can be determined that the current target state of the knob module is rotating.
[0127] Continuing to assume that the user's first raised point at point B contacts the first mechanical switch, and the user continues to rotate counterclockwise 90° to point C. Then, when the first raised point at point C triggers the first mechanical switch to generate a first signal, the controller, upon receiving the first signal, can determine that this first signal is the second first signal received during this rotation. Figure 3 As is known, during the process of rotating from point B to point C, there is a second protruding point between point B and point C, so a second signal can be received during this process.
[0128] Based on this, it can be determined that the first mechanical switch has sent a historical first signal (that is, the first signal corresponding to the first protruding point at point A). Further, the historical number of second signals corresponding to the historical first signal is 0. Then, by arranging the historical number and the number of second signals corresponding to point C in chronological order, the number sequence obtained is 01.
[0129] by Figure 3 For the arrangement of the first and second raised points shown, the preset number sequence corresponding to the counterclockwise direction is 01, 012, and 0123; and the preset number sequence corresponding to the clockwise direction is 32, 321, and 3210. Based on this, by comparing the number sequence 01 with the preset number sequence, it can be determined that the rotation direction corresponding to the number sequence is counterclockwise.
[0130] It should be noted that in order to prevent the situation where the rotation direction of the knob cannot be determined at a special position, when designing the first raised point in the embodiment of the present application, first raised points for identification can be set on both sides of the first raised point located at the special position of the knob. This type of first raised point can be used to determine the rotation direction, which does not correspond to a specific knob state, or the corresponding knob state is rotating, rather than a special switch lock state.
[0131] In another embodiment, the first mechanical switch may include a first trigger point and a second trigger point located on different sides, and the first signal generated by the first mechanical switch may include a first sub-signal and a second sub-signal. When the first trigger point of the first mechanical switch is triggered, a first sub-signal is generated and sent to a controller; when the second trigger point of the first mechanical switch is triggered, a second sub-signal is generated and sent to the controller.
[0132] In actual application, when the knob rotates, the first protrusion point on the cam can trigger the trigger point on one side of the first mechanical switch. For example, when rotating counterclockwise, the first protrusion point triggers the first trigger point and generates a first sub-signal; when rotating clockwise, the first protrusion point triggers the second trigger point and generates a second sub-signal.
[0133] Based on this, when the controller receives the first signal, it can determine whether the first signal is the first sub-signal.
[0134] Optionally, when it is determined that the first signal is the first sub-signal, it means that the first trigger point of the first mechanical switch is triggered at this time, and then it can be determined that the rotation direction of the knob is counterclockwise.
[0135] On the contrary, when it is determined that the first signal is the second sub-signal, it means that the second trigger point of the first mechanical switch is triggered, and then it can be determined that the rotation direction of the knob is clockwise.
[0136] Step 502: Determine two initial first raised points corresponding to the number according to the number.
[0137] Step 503: Determine the initial first raised point corresponding to the end point of the rotation direction as the target first raised point for currently triggering the first mechanical switch.
[0138] The following is a unified description of step 502 and step 503:
[0139] The initial first protruding point may be a first protruding point that is preliminarily determined to be likely to trigger the first mechanical switch to generate the first signal.
[0140] Depend on Figure 2 From the description of the knob module provided in the embodiment of the present application, it can be seen that the number of second protrusions can correspond to each two adjacent first protrusions in the cam. Figure 4 As can be seen from the process shown, the above number is the number of second signals received between the last time the first signal was received and the current time the first signal was received, and the second signal is the signal generated by the second mechanical switch triggered by the second protrusion point. Therefore, the above number of second signals is the number of second protrusion points between the first protrusion point that generates the first signal this time and the previous first protrusion point.
[0141] Based on this, the number may correspond to two first raised points (for ease of description, may be referred to as initial first raised points), for example Figure 3 The number of second raised points corresponding to the first raised points corresponding to points A and B shown is 0. If the above number is determined to be 0, then the two initial first raised points corresponding to this number can be the initial first raised point corresponding to point A and the initial first raised point corresponding to point B. That is, this rotation can be a counterclockwise rotation from point A to point B, or a counterclockwise rotation from point B to point A.
[0142] Furthermore, after determining the corresponding number of two initial first raised points and the current rotation direction of the knob, the initial first raised point corresponding to the end point of the rotation direction can be determined as the target first raised point for currently triggering the first mechanical switch. For example, if the two initial first raised points determined above are points A and B, if the rotation direction of the knob is determined to be counterclockwise, the counterclockwise end point, point B, is determined to be the target first raised point; if the rotation direction of the knob is determined to be clockwise, the clockwise end point, point A, is determined to be the target first raised point.
[0143] The technical solution provided by the embodiment of the present application determines the current rotation direction of the knob, and based on the number, determines two initial first raised points corresponding to the number, and determines the initial first raised point corresponding to the end point of the rotation direction as the target first raised point for triggering the first mechanical switch. This technical solution determines the target first raised point for triggering the first mechanical switch based on the rotation direction of the knob and the number of received second signals. It uses a simple mechanical switch and the number of raised points to determine the rotation direction of the knob, thereby determining the current position of the knob. This achieves simple and accurate determination of the special position corresponding to the knob, thereby improving the anti-interference ability of the knob detection and reducing the cost of using a mechanical switch to detect the knob. The simple structure ensures the stability of the knob state detection, ensuring the safety of the user and the user's operating experience of the door lock.
[0144] See also Figure 6 , which is a flow chart of another embodiment of determining the target first protruding point provided in an embodiment of the present application. Figure 6 The process shown in Figure 4 Based on the process shown, it is described how to determine the target first protruding point for triggering the first mechanical switch based on the number of received second signals when the first mechanical switch includes a first trigger point and a second trigger point located on different sides. Figure 6 As shown, the process may include the following steps:
[0145] Step 601: Determine two initial first raised points of corresponding quantity.
[0146] The initial first protruding point may be a first protruding point that is preliminarily determined to be likely to trigger the first mechanical switch to generate the first signal.
[0147] Depend on Figure 2 From the description of the knob module provided in the embodiment of the present application, it can be seen that the number of second protrusions can correspond to each two adjacent first protrusions in the cam. Figure 4 As can be seen from the process shown, the above number is the number of second signals received between the last time the first signal was received and the current time the first signal was received, and the second signal is the signal generated by the second mechanical switch triggered by the second protrusion point. Therefore, the above number of second signals is the number of second protrusion points between the first protrusion point that generates the first signal this time and the previous first protrusion point.
[0148] Based on this, the number may correspond to two first raised points (for ease of description, may be referred to as initial first raised points), for example Figure 3The number of second raised points corresponding to the first raised points corresponding to points A and B shown is 0. If the above number is determined to be 0, then the two initial first raised points corresponding to this number can be the initial first raised point corresponding to point A and the initial first raised point corresponding to point B. That is, this rotation can be a counterclockwise rotation from point A to point B, or a counterclockwise rotation from point B to point A.
[0149] Step 602 : Determine whether the first signal is the first sub-signal or the second sub-signal. If the first signal is determined to be the first sub-signal, execute step 603 ; if the first signal is determined to be the second sub-signal, execute step 604 .
[0150] Step 603: Determine the initial first salient point corresponding to the first sub-signal as the target first salient point.
[0151] Step 604: Determine the initial first salient point corresponding to the second sub-signal as the target first salient point.
[0152] The following is a unified description of steps 602 to 604:
[0153] In an embodiment of the present application, the first mechanical switch may include a first trigger point and a second trigger point located on different sides, and the first signal generated by the first mechanical switch may include a first sub-signal and a second sub-signal. When the first trigger point of the first mechanical switch is triggered, a first sub-signal is generated and sent to a controller; when the second trigger point of the first mechanical switch is triggered, a second sub-signal is generated and sent to the controller.
[0154] As can be seen from the above description, once the two initial first raised points corresponding to the aforementioned number are determined, the target first raised point for triggering the first mechanical switch can be determined from the two initial first raised points. In actual applications, the two initial first raised points are located on either side of the first mechanical switch, and the first mechanical switch has a first trigger point and a second trigger point located on different sides. Therefore, the two initial first raised points can each correspond to a trigger point of the first mechanical switch.
[0155] Based on this, when receiving the first signal, the controller can determine whether the first signal is the first sub-signal or the second sub-signal.
[0156] Optionally, when it is determined that the first signal is the first sub-signal, it means that the first trigger point of the first mechanical switch is triggered at this time, then the initial first raised point corresponding to the first sub-signal can be determined as the target first raised point, that is, the initial first raised point corresponding to the first trigger point that generates the first sub-signal is determined as the target first raised point.
[0157] Optionally, when it is determined that the first signal is the second sub-signal, it means that the second trigger point of the first mechanical switch is triggered at this time, then the initial first raised point corresponding to the second sub-signal can be determined as the target first raised point, that is, the initial first raised point corresponding to the second trigger point that generates the second sub-signal is determined as the target first raised point.
[0158] The technical solution provided by the embodiment of the present application is that, by including a first trigger point and a second trigger point located on different sides of the first mechanical switch, the first signal includes a first sub-signal and a second sub-signal, wherein when the first trigger point of the first mechanical switch is triggered, the first sub-signal is sent to the controller; when the second trigger point of the first mechanical switch is triggered, the second sub-signal is sent to the controller, two initial first raised points of corresponding quantity can be determined, and it can be determined whether the first signal is the first sub-signal. When it is determined that the first signal is the first sub-signal, the initial first raised point corresponding to the first sub-signal can be determined as the target first raised point; when it is determined that the first signal is the second sub-signal, the initial first raised point corresponding to the second sub-signal can be determined as the target first raised point. This technical solution sets a first trigger point and a second trigger point on both sides of the first mechanical switch, and different trigger points generate different sub-signals when triggered. On this basis, the target first raised point for triggering the first mechanical switch can be determined by the number of second raised points between two adjacent first raised points, so that the current special position of the knob can be determined by using the raised points of the mechanical switch and the cam, thereby improving the anti-interference ability of the knob detection and reducing the cost of using a mechanical switch to detect the knob. The structure is simple, which ensures the stability of the knob state detection and ensures the safety of the user and the user's operating experience of the door lock.
[0159] See also Figure 7 , is a flow chart of an embodiment of determining the state of a target protrusion point provided in an embodiment of the present application. Figure 7 The process shown in Figure 4 Based on the process shown in FIG, it is described how to determine the target convex point state corresponding to the target first convex point. Figure 7 As shown, the process may include the following steps:
[0160] Step 701: Obtain the initial state corresponding to the first raised point of the target.
[0161] The above initial state refers to the state of the knob corresponding to the first raised point of the target.
[0162] In the embodiment of the present application, each first raised point included in the cam may correspond to one state of the knob, or may correspond to multiple states of the knob, and the embodiment of the present application does not limit this. For example, if the first raised point corresponds to the unlocked position or locked position of the knob, or is used to mark the rotation direction, then the state corresponding to the first raised point may be one: unlocked state, locked state, or rotating state; if the first raised point is located between the unlocked position and locked position of the knob, then the first raised point may correspond to two states: unlocked state and locked state.
[0163] It should be noted that the mapping relationship between the first protrusion point and the knob state may be preset.
[0164] Based on this, the execution subject of the embodiment of the present application can obtain the initial state corresponding to the target first raised point from the preset mapping relationship.
[0165] Step 702: Determine the number of states of the initial state.
[0166] Step 703: Determine the target raised point state currently corresponding to the target first raised point according to the number of states.
[0167] The following is a unified description of step 702 and step 703:
[0168] As can be seen from the description of step 701, each first raised point can correspond to one or more knob states. Based on this, after obtaining the initial state corresponding to the target first raised point, the controller can determine the number of states of the initial state and, based on the number of states, determine the target raised point state currently corresponding to the target first raised point.
[0169] Optionally, when the number of the above states is one, the initial state may be directly determined as the target raised point state currently corresponding to the target first raised point.
[0170] Optionally, when there are multiple states mentioned above, the current rotation direction of the knob can be determined, and based on the rotation direction, the next first protrusion point of the rotating module can be determined, and based on the next first protrusion point, the target protrusion point state currently corresponding to the target first protrusion point can be determined from multiple initial states.
[0171] As for how to determine the current rotation direction of the knob, please refer to the description in step 501, which will not be repeated here.
[0172] As an exemplary embodiment, when determining the target raised point state currently corresponding to the target first raised point from multiple initial states, the knob state corresponding to the next first raised point can be determined, and based on the knob state corresponding to the next first raised point, the target raised point state currently corresponding to the target first raised point can be determined.
[0173] For example, if the knob state corresponding to the next first raised point is unlocked, then the target raised point state currently corresponding to the target first raised point can be determined as unlocked; if the knob state corresponding to the next first raised point is locked, then the target raised point state currently corresponding to the target first raised point can be determined as locked.
[0174] The technical solution provided by the embodiments of the present application obtains the initial state corresponding to the target first raised point, determines the number of states of the initial state, and then determines the target raised point state currently corresponding to the target first raised point based on the number of states. This technical solution can determine the target raised point state based on the number of states corresponding to the target first raised point. It can simply and accurately determine the target raised point state currently corresponding to the target first raised point, thereby improving the anti-interference ability of the knob detection, reducing the cost of using a mechanical switch to detect the knob, and has a simple structure, ensuring the stability of the knob state detection, ensuring user safety and the user's operating experience of the door lock.
[0175] See also Figure 8 , which is a block diagram of an embodiment of a device for determining the state of a knob module provided in an embodiment of the present application. Figure 8 The device shown is used for Figure 2 The controller in the knob module shown.
[0176] like Figure 8 As shown, the device may include:
[0177] A first determining module 81 is configured to, upon receiving a first signal sent by a first mechanical switch, determine the number of second signals currently received from a second mechanical switch; wherein, when the first mechanical switch is triggered by a first raised point on a cam, the first signal is sent to a controller; and when the second mechanical switch is triggered by a second raised point on the cam, the second signal is sent to the controller;
[0178] The second determining module 82 is configured to determine the current target state of the knob module based on the quantity.
[0179] like Figure 9 FIG. 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, including a processor 91, a communication interface 92, a memory 93, and a communication bus 94. The processor 91, the communication interface 92, and the memory 93 communicate with each other through the communication bus 94.
[0180] Memory 93, for storing computer programs;
[0181] In one embodiment of the present application, the processor 91 is configured to execute a program stored in the memory 93 to implement the method for determining the state of the knob module provided by any of the aforementioned method embodiments, including:
[0182] determining, upon receiving a first signal sent by a first mechanical switch, the number of second signals currently received and sent by a second mechanical switch; wherein, when the first mechanical switch is triggered by a first raised point on a cam, the first signal is sent to a controller; and when the second mechanical switch is triggered by a second raised point on the cam, the second signal is sent to the controller;
[0183] Based on the quantity, the current target state of the knob module is determined.
[0184] An embodiment of the present application further provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for determining the state of the knob module provided in any of the aforementioned method embodiments are implemented.
[0185] The device embodiments described above are merely illustrative. The units described 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 the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0186] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiment.
[0187] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "comprise", "include", "contain" and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the specific order described or illustrated, unless the order of execution is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0188] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.
Claims
1. A knob module, characterized in that: The knob module includes a controller, a knob, a cam, a first mechanical switch, and a second mechanical switch; The controller is connected to the first mechanical switch and the second mechanical switch respectively; The knob is connected to the cam, and the cam includes a first section and a second section arranged in a stacked manner. The first section includes a plurality of first protrusions, and the second section includes a plurality of second protrusions. Each of the first protrusions corresponds to a state of the knob, and a different number of second protrusions corresponds between each two adjacent first protrusions. The first mechanical switch is triggered by any one of the first protrusion points, and the second mechanical switch is triggered by any one of the second protrusion points.
2. The knob module according to claim 1, characterized in that: The knob is connected to the cam via a coupling.
3. A method for determining the state of a knob module, characterized in that: The controller used in the knob module according to claim 1 or 2, the method comprising: determining, upon receiving a first signal sent by a first mechanical switch, the number of second signals currently received and sent by a second mechanical switch; wherein, when the first mechanical switch is triggered by a first raised point on a cam, the first signal is sent to a controller; and when the second mechanical switch is triggered by a second raised point on the cam, the second signal is sent to the controller; Based on the quantity, the current target state of the knob module is determined.
4. The method according to claim 3, characterized in that Before receiving the first signal sent by the first mechanical switch, the method further includes: Upon receiving the last first signal sent by the first mechanical switch, updating a preset counter to a first value; each time the second signal sent by the second mechanical switch is received, adding a second value to a preset counter; The step of determining, upon receiving the first signal sent by the first mechanical switch, the number of second signals currently received and sent by the second mechanical switch, includes: acquiring a current count value of the counter when the first signal sent by the first mechanical switch is currently received; determining the count value as the number of second signals sent by the second mechanical switch; After determining the count value as the number of second signals sent by the second mechanical switch, the method further includes: Update the current count value of the counter to the first value.
5. The method according to claim 3, characterized in that Determining the current target state of the knob module based on the quantity includes: Based on the number, determining a target first protrusion point currently triggering the first mechanical switch; Determine a current target raised point state corresponding to the target first raised point; The target raised point state currently corresponding to the target first raised point is determined as the current target state of the knob module.
6. The method according to claim 5, characterized in that Determining a target first protrusion point for currently triggering the first mechanical switch based on the quantity includes: Determine the current rotation direction of the knob; Determine two initial first raised points corresponding to the number; An initial first protruding point corresponding to the end point of the rotation direction is determined as a target first protruding point currently triggering the first mechanical switch.
7. The method according to claim 5, characterized in that The first mechanical switch includes a first trigger point and a second trigger point located on different sides, and the first signal includes a first sub-signal and a second sub-signal; wherein when the first trigger point of the first mechanical switch is triggered, the first sub-signal is sent to the controller; when the second trigger point of the first mechanical switch is triggered, the second sub-signal is sent to the controller; Determining a target first protrusion point for currently triggering the first mechanical switch based on the quantity includes: Determine two initial first raised points corresponding to the number; determining whether the first signal is the first sub-signal or the second sub-signal; In a case where the first signal is determined to be the first sub-signal, determining an initial first convex point corresponding to the first sub-signal as a target first convex point; In a case where the first signal is determined to be the second sub-signal, the initial first convex point corresponding to the second sub-signal is determined as the target first convex point.
8. The method according to claim 5, characterized in that The determining the target raised point state currently corresponding to the target first raised point includes: Obtaining an initial state corresponding to the first raised point of the target; determining the number of states of the initial state; According to the number of states, a target raised point state currently corresponding to the target first raised point is determined.
9. The method according to claim 8, characterized in that The determining, based on the number of states, the target raised point state currently corresponding to the target first raised point includes: When the number of states is one, the initial state is determined to be the target raised point state currently corresponding to the target first raised point; In the case where there are multiple states, determining the current rotation direction of the knob; determining a next first protruding point of the knob module according to the rotation direction; According to the next first raised point, a target raised point state currently corresponding to the target first raised point is determined from the multiple initial states.
10. The method according to claim 6 or 9, characterized in that Determining the current rotation direction of the knob includes: determining whether the knob is rotated by the motor; When it is determined that the knob is rotated by the motor, obtaining the rotation direction of the motor; and determining the rotation direction of the motor as the current rotation direction of the knob; When it is determined that the knob is rotated by a non-motor method, determining whether the first mechanical switch has sent a historical first signal during the current rotation; When it is determined that the first mechanical switch has sent the historical first signal, obtaining a historical number of second signals corresponding to each historical first signal; Arrange the historical quantities and the quantities in chronological order to obtain a quantity sequence; The number sequence is compared with a preset number sequence to obtain a rotation direction corresponding to the number sequence.
11. The method according to claim 10, characterized in that Also includes: When it is determined that the first mechanical switch has not sent the historical first signal, it is determined that the current target state of the knob module is rotating.
12. A device for determining the state of a knob module, characterized in that: A controller used in the knob module according to claim 1 or 2, the device comprising: a first determining module, configured to, upon receiving a first signal sent by a first mechanical switch, determine a number of second signals currently received from a second mechanical switch; wherein, when the first mechanical switch is triggered by a first protruding point on a cam, the first signal is sent to a controller; and when the second mechanical switch is triggered by a second protruding point on the cam, the second signal is sent to the controller; The second determining module is configured to determine a current target state of the knob module based on the quantity.
13. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is configured to execute a knob module state determination program stored in the memory to implement the knob module state determination method according to any one of claims 3 to 11.
