Encoder detection method, detection apparatus, cooking device and readable storage medium

By combining and comparing the level signals of the first and second ports of the encoder, the error in determining the rotation direction caused by time delay is resolved, enabling accurate determination of the encoder's rotation direction under different conditions and ensuring the accurate execution of the device's functions.

CN116136545BActive Publication Date: 2026-04-21GUANGDONG MIDEA CONSUMER ELECTRICS MFG CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG MIDEA CONSUMER ELECTRICS MFG CO LTD
Filing Date
2021-11-17
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of encoder rotation direction determination is poor when time delay exists, leading to misjudgment or inability to determine the direction.

Method used

By periodically acquiring the level signals from the first and second ports of the encoder, combining them into a combined level signal according to a preset rule, and comparing it with a preset signal sequence, the rotation direction of the encoder is determined. This ensures that a preset number of combined level signals are ordered in time sequence, thus solving the judgment error caused by time delay.

Benefits of technology

It enables accurate determination of the encoder's rotation direction even with time delay, ensuring that the encoder device can accurately perform specific functions, such as adjusting working time, power, and temperature.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116136545B_ABST
    Figure CN116136545B_ABST
Patent Text Reader

Abstract

This invention provides a detection method, detection device, cooking equipment, and readable storage medium for encoders. The detection method includes: periodically acquiring the level signals of a first port and a second port of the encoder, wherein the level signals of the first port and the second port are combined according to a preset rule to obtain a combined level signal; acquiring a preset signal sequence corresponding to the rotation direction of the encoder; comparing a preset number of combined level signals arranged in chronological order with the preset signal sequence to obtain a comparison result; and determining the rotation direction of the encoder based on the comparison result. This invention effectively solves the problem in the prior art where the accuracy of determining the encoder rotation direction by only detecting the initial and final states of the two ports of the encoder is poor when there is a time delay. It enables accurate determination of the encoder rotation direction under different conditions, further enabling accurate control of the device to perform specific functions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of household appliance technology, and more specifically, to a detection method, detection device, cooking equipment, and readable storage medium for encoders. Background Technology

[0002] In existing technologies, the rotation direction of the encoder is usually determined by checking the changes in the initial and final states of the encoder's A and B terminals. However, in the presence of time delay, the accuracy of the determined encoder rotation direction is poor. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.

[0004] Therefore, the first aspect of the present invention is to provide a detection method for an encoder.

[0005] A second aspect of the invention is that a detection device for an encoder is also provided.

[0006] A third aspect of the invention is that a cooking device is also provided.

[0007] A fourth aspect of the invention is that a second cooking device is also provided.

[0008] The fifth aspect of the invention is that a third type of cooking apparatus is also provided.

[0009] A sixth aspect of the invention is that a readable storage medium is also provided.

[0010] In view of this, according to a first aspect of the present invention, the present invention proposes a detection method for an encoder, comprising: periodically acquiring level signals of a first port and a second port of the encoder, wherein the level signals of the first port and the second port are combined according to a preset rule to obtain a combined level signal; acquiring a preset signal sequence corresponding to the rotation direction of the encoder; comparing a preset number of combined level signals arranged in chronological order with the preset signal sequence to obtain a comparison result; and determining the rotation direction of the encoder based on the comparison result.

[0011] In the encoder detection method proposed in this invention, firstly, the level signals of the first port and the second port of the encoder are acquired according to a specific period, and then combined according to a preset rule to obtain a combined level signal, and a preset signal sequence corresponding to the rotation direction of the encoder is acquired.

[0012] Specifically, the preset rule can be that the encoder's first port level signal comes first and the second port level signal comes second. For example, if the first port level signal is 1 and the second port level signal is 0, then the combined signal is 10. Alternatively, the preset rule can be that the encoder's first port level signal comes last and the second port level signal comes last, then the combined signal is 01.

[0013] Understandably, regardless of the preset rules used, it should be ensured that the preset rules are consistent with the combination rules of the level signals in the preset signal sequence, so as to ensure the accuracy of the encoder rotation direction determined based on the comparison results.

[0014] In the encoder detection method proposed in this invention, after obtaining the combined level signal, a preset number of combined level signals are sorted according to time order, and then compared with a preset signal sequence corresponding to the obtained encoder rotation direction to obtain a comparison result, and the encoder rotation direction is determined based on the comparison result.

[0015] Specifically, a preset number of level signals are sorted according to the order in which they are acquired, with a minimum of three preset numbers. The encoder's rotation direction is divided into clockwise and counterclockwise directions. When the encoder is running clockwise, the encoder combination level signals in the preset signal sequence normally cycle through 11, 10, 00, and 01. When the encoder is running counterclockwise, the encoder combination level signals in the preset signal sequence normally cycle through 11, 01, 00, and 10. It can be seen that using traditional techniques to determine the encoder's rotation direction, in the presence of time delays, and relying solely on the initial and final states of the encoder's first and second ports (i.e., only detecting two states), can lead to misjudgments or even failure to determine the direction. For example, if the encoder's rotation direction is counterclockwise, but due to a significant time delay, the detected encoder level signal in the initial state is 11, and the level signal in the final state is 00. Therefore, the encoder's rotation direction cannot be determined based on these two state level signals.

[0016] In the encoder detection method proposed in this invention, a combination of no less than three preset level signals is acquired and compared with a preset signal sequence to obtain a comparison result. The rotation direction of the encoder is determined based on the comparison result. This effectively solves the problem that the accuracy of the encoder rotation direction determined by only detecting the initial and final states of the encoder's two ports is poor when there is a time delay. It enables accurate determination of the encoder rotation direction under different conditions, and further enables the encoder-based cooking equipment to accurately perform a specific function.

[0017] Specifically, the specific function can be any one of adjusting the device's operating time, operating power, operating temperature, or operating humidity, but is not limited to these; it can be determined based on the actual operating conditions of the device. Furthermore, the encoder detection method in the first aspect of this invention may also have the following additional technical features:

[0018] In one possible technical solution, the encoder has at least one setting switch, wherein each setting switch corresponds to a set number of times, and the detection method further includes: determining the cumulative number of times that the combined level signals arranged in chronological order are consistent with the preset signal sequence, and determining the encoder action based on the cumulative number being greater than or equal to the set number of times.

[0019] In this technical solution, when the result of comparing a preset number of combined level signals arranged in chronological order with the preset signal sequence corresponding to the rotation direction of the encoder is consistent, the cumulative count is incremented by 1.

[0020] Specifically, the encoder is equipped with a setting switch, and there is at least one setting switch. Each setting switch corresponds to a set number of times, which is used to compare with the cumulative number of times mentioned above. When the cumulative number of times is greater than or equal to the set number of times, it can be determined that the encoder is in an operating state.

[0021] For example, an encoder has two setting switches, namely a first switch and a second switch. The first switch corresponds to 2 setting times, and the second switch corresponds to 3 setting times. When the cumulative number of setting times is 2, and the first switch is determined to be the setting switch, the encoder can be determined to operate.

[0022] In one possible technical solution, the step of determining the encoder action based on the cumulative number of times being greater than or equal to a set number of times further includes: obtaining historical action data of the encoder, wherein the historical action data includes historical action times, obtaining the current action time of the encoder, determining the action time difference based on the historical action time and the current action time, and determining the encoder action based on the time difference being greater than or equal to a first preset duration.

[0023] In this technical solution, after determining the encoder action based on the cumulative number of times being greater than or equal to a set number of times, the encoder's historical action data is obtained. The historical action data includes the historical action time. It is determined whether the time difference between the current action time and the historical action time is greater than or equal to a preset duration. When the time difference is greater than or equal to the preset duration, it can be determined that the encoder is in action state.

[0024] Specifically, if the time difference between the current action moment and the historical action moment is greater than or equal to the second preset duration, it indicates that the two actions do not belong to the same cycle. This avoids misjudging one encoder action as two encoder actions due to a short judgment time cycle, and improves the reliability of achieving specific functions by judging the number of encoder actions.

[0025] In one possible technical solution, the first preset duration is set to 200 milliseconds.

[0026] In this technical solution, using 200 milliseconds as the first preset duration can effectively solve the problem of misjudging the number of encoder actions. At the same time, it will not affect the efficiency of detecting the number of encoder actions, and further improves the reliability of realizing specific functions by judging the number of encoder actions.

[0027] In one possible technical solution, the detection method for the encoder further includes: within a second preset time period, adjusting the adjustment step size of the encoder to the target parameter based on the number of consecutive encoder actions being greater than or equal to the target number.

[0028] In this technical solution, when it is detected that the number of consecutive actions of the encoder within a certain period of time is greater than or equal to the target number, it indicates that the user needs to adjust the target parameters. At this time, the step length of the target parameters is adjusted by adjusting the encoder.

[0029] Specifically, by adjusting the step length of the encoder to adjust the target parameter, the quantity unit of the target parameter can be adjusted, as well as the quantity value of the target parameter. For example, if the target parameter is a time parameter, the adjustment can be changed from seconds to minutes, or from minutes to hours; the increment or decrement of the target parameter can be changed from 1 minute to 10 minutes, or from 10 minutes to 30 minutes. This enables rapid adjustment or fine-tuning of the target parameter, allowing the step length of the encoder to meet the needs of different situations.

[0030] Furthermore, based on different target parameters, a second preset duration and a target number of times are determined. That is, any target parameter has a corresponding second preset duration and a target number of times. Accordingly, the target parameter that needs to be adjusted can be determined based on the number of consecutive actions of the encoder within the corresponding preset time being greater than or equal to the target number of times, so that the present invention can achieve multiple functions based on the number of consecutive actions of the encoder within the preset duration.

[0031] In one possible technical solution, the value of the second preset duration is greater than or equal to 200 milliseconds.

[0032] In this technical solution, the second preset duration is greater than or equal to 200 milliseconds, which can ensure that the first preset duration is sufficient to avoid misjudging the number of encoder actions. At the same time, it ensures that the effective number of encoder actions can be detected, thereby improving the reliability of realizing multiple functions based on the number of consecutive encoder actions within the preset duration.

[0033] In one possible technical solution, the adjustment step size is increased based on the encoder rotating in a first rotation direction; and the adjustment step size is decreased based on the encoder rotating in a second rotation direction, wherein the first rotation direction is opposite to the second rotation direction.

[0034] In this technical solution, the encoder's rotation direction is divided into a first rotation direction and a second rotation direction. The first rotation direction corresponds to clockwise rotation, and the second rotation direction corresponds to counterclockwise rotation; that is, the first and second rotation directions are opposite. When the encoder rotates in the first rotation direction (clockwise), the adjustment step size is increased, for example, changing the target parameter adjustment from seconds to minutes, or changing the increment or decrement of the target parameter from 1 minute to 10 minutes. When the encoder rotates in the second rotation direction (counterclockwise), the adjustment step size is decreased, for example, changing the target parameter adjustment from minutes to seconds, or changing the increment or decrement of the target parameter from 10 minutes to 1 minute. By determining the encoder's rotation direction and increasing or decreasing the adjustment step size accordingly, rapid adjustment or fine-tuning of the target parameter is achieved, allowing the step size for adjusting the target parameter by adjusting the encoder to meet the needs of different situations.

[0035] In one possible technical solution, the target parameters include any one of the following: time parameter, temperature parameter, humidity parameter, display brightness parameter, and power parameter.

[0036] In this technical solution, the target parameter is generally any one of time parameter, power parameter, display brightness parameter, temperature parameter, humidity parameter, etc., but is not limited to this, and is determined according to the actual function of the device to which the encoder belongs.

[0037] In one possible technical solution, a preset number of combined level signals are sorted in chronological order, wherein the preset number is a positive integer greater than or equal to 3.

[0038] In this technical solution, the preset number is a positive integer greater than or equal to 3, which effectively solves the problem that the accuracy of the encoder rotation direction is poor when only detecting the initial and final states of the encoder's two ports is performed in the presence of time delay. This enables accurate determination of the encoder's rotation direction under different conditions, and further accurate control of the device to complete specific functions.

[0039] Specifically, the value of the preset quantity is determined based on the actual time delay. When the time delay is large, the value of the preset quantity can be changed, such as by setting it to 5. It can be understood that the larger the preset quantity value, the more accurate the rotation direction of the encoder is determined. However, no matter how the preset quantity value is changed, it should be ensured that the preset quantity is greater than or equal to 3, so as to ensure that the rotation direction of the encoder can be accurately determined based on the acquired preset quantity level signal, thereby reducing the occurrence of misjudgment or inability to determine.

[0040] According to a second aspect of the present invention, a detection device for an encoder is provided, comprising: a first acquisition unit for periodically acquiring level signals from a first port and a second port of the encoder, wherein the level signals from the first port and the second port are combined according to a preset rule to obtain a combined level signal; a second acquisition unit for acquiring a preset signal sequence corresponding to the rotation direction of the encoder; a comparison unit for comparing a preset number of combined level signals arranged in chronological order with the preset signal sequence to obtain a comparison result; and a determination unit for determining the rotation direction of the encoder based on the comparison result.

[0041] The detection device for encoder proposed in this invention firstly acquires the level signals of the first port and the second port of the encoder according to a specific period, and combines them according to a preset rule to obtain a combined level signal. The second acquisition unit acquires a preset signal sequence corresponding to the rotation direction of the encoder.

[0042] Specifically, the preset rule can be that the encoder's first port level signal comes first and the second port level signal comes second. For example, if the first port level signal is 1 and the second port level signal is 0, then the combined signal is 10. Alternatively, the preset rule can be that the encoder's first port level signal comes last and the second port level signal comes last, then the combined signal is 01.

[0043] Understandably, regardless of the preset rules used, it should be ensured that the preset rules are consistent with the combination rules of the level signals in the preset signal sequence, so as to ensure the accuracy of the encoder rotation direction determined based on the comparison results.

[0044] The detection device for encoder proposed in this invention, after acquiring a combined level signal through a first acquisition unit, a comparison unit sorts a preset number of combined level signals according to time order, and then compares them with a preset signal sequence corresponding to the encoder rotation direction acquired by a second acquisition unit to obtain a comparison result. The determination unit determines the encoder rotation direction based on the comparison result.

[0045] Specifically, firstly, the comparison unit sorts a preset number of level signals according to the order in which the first acquisition unit acquires the level signals. The preset number is no less than three. The encoder's rotation direction is divided into clockwise and counterclockwise directions. When the encoder is running clockwise, the encoder combination level signals in the preset signal sequence normally cycle through 11, 10, 00, and 01. When the encoder is running counterclockwise, the encoder combination level signals in the preset signal sequence normally cycle through 11, 01, 00, and 10. It can be seen that using traditional techniques to determine the encoder's rotation direction, in the presence of time delays, if only the initial and final states of the detected encoder's first and second port level signals (i.e., only detecting two states) are used to determine the encoder's rotation direction, misjudgments or inability to determine the direction may occur. For example, if the encoder's rotation direction is counterclockwise, but due to a significant time delay, the detected encoder's initial state level signal is 11, and the final state level signal is 00. Therefore, the encoder's rotation direction cannot be determined based on these two state level signals.

[0046] The encoder detection device proposed in this invention acquires at least three preset combination level signals through a first acquisition unit. A comparison unit first sorts the preset number of combination level signals acquired by the first acquisition unit, and then compares the sorted combination level signals with a preset signal sequence acquired by a second acquisition unit to obtain a comparison result. A determination unit determines the encoder rotation direction based on the comparison result. This effectively solves the problem that the accuracy of the encoder rotation direction determined by only detecting the initial and final states of the encoder's two ports is poor when there is a time delay. It enables accurate determination of the encoder rotation direction under different conditions, and further enables devices using encoders to accurately perform certain specific functions.

[0047] Specifically, the specific function can be any one of adjusting the device's operating time, operating power, operating temperature, or operating humidity, but is not limited to these; it can be determined based on the actual operating conditions of the device. Furthermore, the detection device for the encoder in the above-mentioned technical solution disclosed in the second aspect of this invention may also have the following additional technical features:

[0048] In one possible technical solution, the encoder has at least one setting switch, wherein each setting switch corresponds to a set number of times, and the determining unit is further used to determine the cumulative number of times that the combined level signals arranged in chronological order are consistent with the preset signal sequence, and to determine the encoder action based on the cumulative number being greater than or equal to the set number of times.

[0049] In this technical solution, when the determining unit determines that the result of comparing a preset number of combined level signals arranged in time sequence with the preset signal sequence corresponding to the rotation direction of the encoder is consistent, the cumulative count is incremented by 1.

[0050] Specifically, the encoder is equipped with a setting switch, and there is at least one setting switch. Each setting switch corresponds to a set number of times, which is used to compare with the cumulative number determined by the determination unit. When the determination unit determines that the cumulative number of times is greater than or equal to the set number of times, it is determined that the encoder is in an operating state.

[0051] For example, an encoder has two setting switches, namely a first switch and a second switch. The first switch corresponds to 2 setting times, and the second switch corresponds to 3 setting times. When the determining unit determines that the cumulative number of times is 2 and determines that the setting switch is the first switch, the encoder is determined to operate.

[0052] In one possible technical solution, the first acquisition unit is further used to acquire the current action time of the encoder, the second acquisition unit is further used to acquire the historical action data of the encoder, wherein the historical action data includes the historical action time, the comparison unit is further used to calculate the action time difference between the current action time and the historical action time, and the determination unit is further used to determine the encoder action based on the time difference being greater than or equal to a first preset duration.

[0053] In this technical solution, specifically, when the determining unit determines that the time difference between the current action time and the historical action time is greater than or equal to the second preset duration, it indicates that the two actions do not belong to one cycle. This avoids misjudging the encoder action as two actions due to the short discrimination time cycle, and improves the reliability of achieving specific functions by judging the number of encoder actions.

[0054] In one possible technical solution, the first preset duration is set to 200 milliseconds.

[0055] In this technical solution, using 200 milliseconds as the first preset duration can effectively solve the problem of misjudging the number of encoder actions. At the same time, it will not affect the efficiency of detecting the number of encoder actions, and further improves the reliability of realizing specific functions by judging the number of encoder actions.

[0056] In one possible technical solution, the determining unit is further configured to determine whether the number of consecutive encoder actions within a second preset time period is greater than or equal to the target number, and when the number of consecutive encoder actions is greater than or equal to the target number, adjust the encoder's adjustment step size for the target parameter.

[0057] In this technical solution, when the determining unit determines that the number of consecutive actions of the encoder within a certain period of time is greater than or equal to the target number, it indicates that the user needs to adjust the target parameters. At this time, the step length of the target parameters is adjusted by adjusting the encoder.

[0058] Specifically, by adjusting the step length of the encoder to adjust the target parameter, the quantity unit of the target parameter can be adjusted, as well as the quantity value of the target parameter. For example, if the target parameter is a time parameter, the adjustment can be changed from seconds to minutes, or from minutes to hours; the increment or decrement of the target parameter can be changed from 1 minute to 10 minutes, or from 10 minutes to 30 minutes. This enables rapid adjustment or fine-tuning of the target parameter, allowing the step length of the encoder to meet the needs of different situations.

[0059] Furthermore, based on different target parameters, a second preset duration and a target number of times are determined. That is, any target parameter has a corresponding second preset duration and a target number of times. Accordingly, the target parameter that needs to be adjusted can be determined based on the number of consecutive actions of the encoder within the corresponding preset time being greater than or equal to the target number of times, so that the present invention can achieve multiple functions based on the number of consecutive actions of the encoder within the preset duration.

[0060] In one possible technical solution, the value of the second preset duration is greater than or equal to 200 milliseconds.

[0061] In this technical solution, the second preset duration is greater than or equal to 200 milliseconds, which can ensure that the determining unit has enough time to judge the number of encoder actions, avoid misjudging the number of encoder actions, and at the same time ensure that the effective number of encoder actions can be detected, thereby improving the reliability of realizing multiple functions based on the number of consecutive encoder actions within the preset duration.

[0062] In one possible technical solution, the adjustment step size of the encoder for the target parameter is adjusted according to the rotation direction of the encoder determined by the determining unit, wherein the adjustment step size is increased based on the encoder rotating along a first rotation direction, and the adjustment step size is decreased based on the encoder rotating along a second rotation direction, wherein the first rotation direction and the second rotation direction are opposite.

[0063] In this technical solution, the encoder's rotation direction is divided into a first rotation direction and a second rotation direction. The first rotation direction corresponds to clockwise rotation, and the second rotation direction corresponds to counterclockwise rotation; that is, the first and second rotation directions are opposite. When the encoder rotates in the first rotation direction (clockwise), the adjustment step size is increased, such as changing the target parameter adjustment from seconds to minutes, or changing the target parameter increment / decrement from 1 minute to 10 minutes. When the encoder rotates in the second rotation direction (counterclockwise), the adjustment step size is decreased, such as changing the target parameter adjustment from minutes to seconds, or changing the target parameter increment / decrement from 10 minutes to 1 minute. By determining the encoder's rotation direction through a determining unit and increasing or decreasing the adjustment step size accordingly, rapid adjustment or fine-tuning of the target parameter is achieved, allowing the step size for adjusting the target parameter by adjusting the encoder to meet the needs of different situations.

[0064] In one possible technical solution, the target parameters include any one of the following: time parameter, temperature parameter, humidity parameter, display brightness parameter, and power parameter.

[0065] In this technical solution, the target parameter is generally any one of time parameter, power parameter, display brightness parameter, temperature parameter, humidity parameter, etc., but is not limited to this, and is determined according to the actual function of the device to which the encoder belongs.

[0066] In one possible technical solution, a preset number of combined level signals are acquired by the first acquisition unit, wherein the preset number is a positive integer greater than or equal to 3.

[0067] In this technical solution, the preset number is a positive integer greater than or equal to 3, which effectively solves the problem that the accuracy of the encoder rotation direction is poor when only detecting the initial and final states of the encoder's two ports is performed in the presence of time delay. This enables accurate determination of the encoder's rotation direction under different conditions, and further accurate control of the device to complete specific functions.

[0068] Specifically, the value of the preset quantity is determined based on the actual time delay. When the time delay is large, the value of the preset quantity can be changed, such as by setting it to 5. It can be understood that the larger the preset quantity value, the more accurate the rotation direction of the encoder is determined. However, no matter how the preset quantity value is changed, it should be ensured that the preset quantity is greater than or equal to 3, so as to ensure that the rotation direction of the encoder can be accurately determined based on the acquired preset quantity level signal, thereby reducing the occurrence of misjudgment or inability to determine.

[0069] According to a third aspect of the present invention, a cooking apparatus is provided, comprising: an encoder, wherein the encoder performs the detection method for an encoder as proposed in the first aspect of the present invention, and thus possesses all the beneficial effects of the detection method, which will not be elaborated further here.

[0070] According to a fourth aspect of the present invention, a cooking apparatus is provided, comprising: a memory having a program or instructions stored thereon; and a controller that executes the program or instructions stored in the memory to implement the detection method for an encoder as proposed in the first aspect of the present invention, thus possessing all the beneficial effects of the detection method for an encoder proposed in the first aspect of the present invention, which will not be elaborated further here.

[0071] According to a fifth aspect of the present invention, a cooking apparatus is provided comprising: a detection device for an encoder as provided in the second aspect of the present invention, which is a detection device for an encoder and thus possesses all the beneficial effects of the detection device for an encoder as provided in the second aspect of the present invention, which will not be repeated here.

[0072] In the above technical solution, the cooking equipment can be any one of a rice cooker, an electric pressure cooker, or an electric fryer.

[0073] According to a sixth aspect of the present invention, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the encoder detection method as proposed in the first aspect of the present invention. Therefore, the readable storage medium proposed by the present invention possesses all the beneficial effects of the encoder detection method in any of the technical solutions of the first aspect of the present invention, and will not be elaborated further here.

[0074] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0075] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0076] Figure 1 One of the schematic flowcharts of a detection method for an encoder according to an embodiment of the present invention is shown;

[0077] Figure 2 A second schematic flowchart of a detection method for an encoder according to an embodiment of the present invention is shown;

[0078] Figure 3 A third schematic flowchart of a detection method for an encoder according to an embodiment of the present invention is shown;

[0079] Figure 4A fourth schematic flowchart of a detection method for an encoder according to an embodiment of the present invention is shown;

[0080] Figure 5 Fifth of a flowchart illustrating a detection method for an encoder according to an embodiment of the present invention;

[0081] Figure 6 A schematic block diagram of a detection device for an encoder according to an embodiment of the present invention is shown;

[0082] Figure 7 One of the schematic block diagrams of a cooking apparatus according to an embodiment of the present invention is shown;

[0083] Figure 8 A second schematic block diagram of a cooking apparatus according to an embodiment of the present invention is shown;

[0084] Figure 9 A third schematic block diagram of a cooking apparatus according to an embodiment of the present invention is shown;

[0085] Figure 10 A circuit diagram of an encoder according to an embodiment of the present invention is shown;

[0086] Figure 11 The output waveform of the encoder during operation is shown according to an embodiment of the present invention.

[0087] in, Figures 6 to 10 The correspondence between the reference numerals and component names in the attached drawings is as follows:

[0088] 600 Detection device, 602 First acquisition unit, 604 Second acquisition unit, 606 Comparison unit, 608 Determination unit, 700 Cooking equipment, 702 Encoder, 704 Memory, 706 Controller, A Encoder first port, B Encoder second port. Detailed Implementation

[0089] To better understand the above aspects, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0090] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0091] The following reference Figures 1 to 11 A detection method for an encoder is described according to some embodiments of the present invention.

[0092] Example 1

[0093] like Figure 1 As shown in the figure, an embodiment of the present invention provides a detection method for an encoder, the detection method comprising:

[0094] S102: Periodically acquire the level signals of the first and second ports of the encoder according to a preset rule;

[0095] S104: Obtain a preset signal sequence corresponding to the rotation direction of the encoder;

[0096] S106: Compare a preset number of combined level signals arranged in chronological order with a preset signal sequence to obtain a comparison result;

[0097] S108: Determine the rotation direction of the encoder based on the comparison results.

[0098] In the encoder detection method proposed in this embodiment, firstly, the level signals of the first port and the second port of the encoder are acquired according to a specific period, and then combined according to a preset rule to obtain a combined level signal, and a preset signal sequence corresponding to the rotation direction of the encoder is acquired.

[0099] Specifically, the preset rule can be that the encoder's first port level signal comes first and the second port level signal comes second. For example, if the first port level signal is 1 and the second port level signal is 0, then the combined signal is 10. Alternatively, the preset rule can be that the encoder's first port level signal comes last and the second port level signal comes last, then the combined signal is 01.

[0100] Understandably, regardless of the preset rules used, it should be ensured that the preset rules are consistent with the combination rules of the level signals in the preset signal sequence, so as to ensure the accuracy of the encoder rotation direction determined based on the comparison results.

[0101] In the encoder detection method proposed in this embodiment, after obtaining the combined level signal, a preset number of combined level signals are sorted according to time order, and then compared with the preset signal sequence corresponding to the obtained encoder rotation direction to obtain the comparison result, and the encoder rotation direction is determined according to the comparison result.

[0102] Specifically, a preset number of level signals are sorted according to the order in which they are acquired, with a minimum of three preset numbers. The encoder's rotation direction is divided into clockwise and counterclockwise directions. When the encoder is running clockwise, the encoder combination level signals in the preset signal sequence normally cycle through 11, 10, 00, and 01. When the encoder is running counterclockwise, the encoder combination level signals in the preset signal sequence normally cycle through 11, 01, 00, and 10. It can be seen that using traditional techniques to determine the encoder's rotation direction, in the presence of time delays, and relying solely on the initial and final states of the encoder's first and second ports (i.e., only detecting two states), can lead to misjudgments or even failure to determine the direction. For example, if the encoder's rotation direction is counterclockwise, but due to a significant time delay, the detected encoder level signal in the initial state is 11, and the level signal in the final state is 00. Therefore, the encoder's rotation direction cannot be determined based on these two state level signals.

[0103] In the encoder detection method proposed in the embodiment, a preset number of no less than three combined level signals are acquired and compared with a preset signal sequence to obtain a comparison result. The rotation direction of the encoder is determined based on the comparison result. This effectively solves the problem that the accuracy of the encoder rotation direction determined by only detecting the initial and final states of the encoder's two ports is poor when there is a time delay. It enables accurate determination of the encoder rotation direction under different conditions, and further enables the encoder-based cooking equipment to accurately perform a specific function.

[0104] Specifically, a specific function can be any one of the following: adjusting the working time, working power, working temperature, working humidity, etc., but is not limited to this. It can be determined according to the actual working conditions of the equipment.

[0105] In addition, the detection method for encoders in the above-described technical solution disclosed in this embodiment may also have the following additional technical features:

[0106] like Figure 2 The diagram shown is a flowchart illustrating a detection method for an encoder according to a possible embodiment of the present invention. Specifically:

[0107] S202: Determine the cumulative number of times that the combined level signals, arranged in chronological order, match the preset number of times;

[0108] S204: Determine the encoder action based on the cumulative count being greater than or equal to the set count.

[0109] In this embodiment, when the comparison result of a preset number of combined level signals arranged in chronological order is consistent with the preset signal sequence corresponding to the rotation direction of the encoder, the cumulative count is incremented by 1.

[0110] Specifically, the encoder is equipped with a setting switch, and there is at least one setting switch. Each setting switch corresponds to a set number of times, which is used to compare with the cumulative number of times mentioned above. When the cumulative number of times is greater than or equal to the set number of times, it can be determined that the encoder is in an operating state.

[0111] For example, an encoder has two setting switches, namely a first switch and a second switch. The first switch corresponds to 2 setting times, and the second switch corresponds to 3 setting times. When the cumulative number of setting times is 2, and the first switch is determined to be the setting switch, the encoder can be determined to operate.

[0112] like Figure 3 The diagram shown is a flowchart illustrating a detection method for an encoder according to a possible embodiment of the present invention. Specifically:

[0113] S302: Obtain the encoder's historical motion data, where the historical motion data includes the historical motion times;

[0114] S304: Get the current action time of the encoder;

[0115] S306: Determine the time difference of the action based on the historical action time and the current action time;

[0116] S308: Determine the encoder action based on the action time difference being greater than or equal to the first preset duration.

[0117] In this embodiment, after determining the encoder action based on the cumulative number of times being greater than or equal to a set number of times, the encoder's historical action data is obtained. The historical action data includes the historical action time. It is determined whether the time difference between the current action time and the historical action time is greater than or equal to a preset duration. When the time difference is greater than or equal to the preset duration, it can be determined that the encoder is in an action state.

[0118] Specifically, if the time difference between the current action moment and the historical action moment is greater than or equal to the second preset duration, it indicates that the two actions do not belong to the same cycle. This avoids misjudging one encoder action as two encoder actions due to a short judgment time cycle, and improves the reliability of achieving specific functions by judging the number of encoder actions.

[0119] like Figure 4 The diagram shown is a flowchart illustrating a detection method for an encoder according to a possible embodiment of the present invention. Specifically:

[0120] S402: Within the second preset time period, the number of consecutive encoder actions is greater than or equal to the target number;

[0121] S404: Adjust the encoder's step size for adjusting the target parameters.

[0122] In this embodiment, when it is detected that the number of consecutive actions of the encoder within a certain period of time is greater than or equal to the target number, it indicates that the user needs to adjust the target parameter. At this time, the step length of the target parameter is adjusted by adjusting the encoder.

[0123] Specifically, by adjusting the step length of the encoder to adjust the target parameter, the quantity unit of the target parameter can be adjusted, as well as the quantity value of the target parameter. For example, if the target parameter is a time parameter, the adjustment can be changed from seconds to minutes, or from minutes to hours; the increment or decrement of the target parameter can be changed from 1 minute to 10 minutes, or from 10 minutes to 30 minutes. This enables rapid adjustment or fine-tuning of the target parameter, allowing the step length of the encoder to meet the needs of different situations.

[0124] Furthermore, based on different target parameters, a second preset duration and a target number of times are determined. That is, any target parameter has a corresponding second preset duration and a target number of times. Accordingly, the target parameter that needs to be adjusted can be determined based on the number of consecutive actions of the encoder within the corresponding preset time being greater than or equal to the target number of times, so that the present invention can achieve multiple functions based on the number of consecutive actions of the encoder within the preset duration.

[0125] Furthermore, in this embodiment, the second preset duration is greater than or equal to 200 milliseconds, which can ensure that the first preset duration is sufficient to avoid misjudging the number of encoder actions. At the same time, it ensures that the effective number of encoder actions can be detected, thereby improving the reliability of realizing multiple functions based on the number of consecutive encoder actions within the preset duration.

[0126] like Figure 5 The diagram shown is a flowchart illustrating a detection method for an encoder according to a possible embodiment of the present invention. Specifically:

[0127] S502: Within the second preset time period, the number of consecutive actions of the encoder is greater than or equal to the target number;

[0128] S504: Adjust the step size based on the encoder rotating in the first rotation direction;

[0129] S506: Based on the encoder rotating in the second rotation direction, the adjustment step size is reduced.

[0130] In this embodiment, the encoder's rotation direction is divided into a first rotation direction and a second rotation direction. The first rotation direction corresponds to clockwise rotation, and the second rotation direction corresponds to counterclockwise rotation; that is, the first and second rotation directions are opposite. When the encoder rotates in the first rotation direction (clockwise), the adjustment step size is increased, such as changing the target parameter adjustment from seconds to minutes, or changing the target parameter increment / decrement from 1 minute to 10 minutes. When the encoder rotates in the second rotation direction (counterclockwise), the adjustment step size is decreased, such as changing the target parameter adjustment from minutes to seconds, or changing the target parameter increment / decrement from 10 minutes to 1 minute. By determining the encoder's rotation direction and increasing or decreasing the adjustment step size accordingly, rapid adjustment or fine-tuning of the target parameter is achieved, allowing the step size for adjusting the target parameter by adjusting the encoder to meet the needs of different situations.

[0131] It should be noted that the target parameter is generally any one of the following: time parameter, power parameter, display brightness parameter, temperature parameter, humidity parameter, etc., but is not limited to this. The specific parameter is determined according to the actual function of the device to which the encoder belongs.

[0132] In one possible embodiment, a preset number of combined level signals are sorted in chronological order, wherein the preset number is a positive integer greater than or equal to 3.

[0133] In this embodiment, the preset number is a positive integer greater than or equal to 3, which effectively solves the problem that the accuracy of the encoder rotation direction is poor when only detecting the initial and final states of the encoder's two ports is performed in the presence of time delay. This enables accurate determination of the encoder's rotation direction under different conditions, and further accurate control of the device to complete specific functions.

[0134] Specifically, the value of the preset quantity is determined based on the actual time delay. When the time delay is large, the value of the preset quantity can be changed, such as by setting it to 5. It can be understood that the larger the preset quantity value, the more accurate the rotation direction of the encoder is determined. However, no matter how the preset quantity value is changed, it should be ensured that the preset quantity is greater than or equal to 3, so as to ensure that the rotation direction of the encoder can be accurately determined based on the acquired preset quantity level signal, thereby reducing the occurrence of misjudgment or inability to determine.

[0135] Example 2

[0136] like Figure 6As shown in the figure, an embodiment of the present invention provides a detection device for an encoder, the detection device comprising:

[0137] The first acquisition unit 602 is used to periodically acquire the level signals of the first port and the second port of the encoder, wherein the level signals of the first port and the second port are combined according to a preset rule to obtain a combined level signal;

[0138] The second acquisition unit 604 is used to acquire a preset signal sequence corresponding to the rotation direction of the encoder;

[0139] The comparison unit 606 is used to compare a preset number of combined level signals arranged in chronological order with a preset signal sequence to obtain a comparison result;

[0140] The determining unit 608 is used to determine the rotation direction of the encoder based on the comparison result.

[0141] In this embodiment, firstly, the first acquisition unit 602 acquires the level signals of the first port and the second port of the encoder according to a specific period, and combines them according to a preset rule to obtain a combined level signal. The second acquisition unit 604 acquires a preset signal sequence corresponding to the rotation direction of the encoder.

[0142] Specifically, the preset rule can be that the encoder's first port level signal comes first and the second port level signal comes second. For example, if the first port level signal is 1 and the second port level signal is 0, then the combined signal is 10. Alternatively, the preset rule can be that the encoder's first port level signal comes last and the second port level signal comes last, then the combined signal is 01.

[0143] Understandably, regardless of the preset rules used, it should be ensured that the preset rules are consistent with the combination rules of the level signals in the preset signal sequence, so as to ensure the accuracy of the encoder rotation direction determined based on the comparison results.

[0144] The encoder detection device proposed in this embodiment, after acquiring the combined level signal through the first acquisition unit 602, the comparison unit 606 sorts the preset number of combined level signals according to the time order, and then compares them with the preset signal sequence corresponding to the encoder rotation direction acquired by the second acquisition unit 604 to obtain the comparison result. The determination unit 608 determines the encoder rotation direction based on the comparison result.

[0145] Specifically, firstly, the comparison unit 606 sorts a preset number of level signals according to the order in which the first acquisition unit 602 acquires the level signals. The preset number is no less than three. The encoder's rotation direction is divided into clockwise and counter-clockwise directions. When the encoder is running clockwise, the encoder combination level signals in the preset signal sequence normally cycle through 11, 10, 00, and 01. When the encoder is running counter-clockwise, the encoder combination level signals in the preset signal sequence normally cycle through 11, 01, 00, and 10. It can be seen that using traditional techniques to determine the encoder's rotation direction, in the presence of time delays, if only the initial and final states of the detected encoder's first and second port level signals (i.e., only detecting two states) are used to determine the encoder's rotation direction, misjudgments or inability to determine the direction may occur. For example, if the encoder's rotation direction is counter-clockwise, but due to a significant time delay, the detected encoder's initial state level signal is 11, and the final state level signal is 00. Therefore, the encoder's rotation direction cannot be determined based on these two state level signals.

[0146] The encoder detection device proposed in this embodiment acquires at least three preset combination level signals through a first acquisition unit 602. A comparison unit 606 first sorts the preset number of combination level signals acquired by the first acquisition unit 602, and then compares the sorted combination level signals with a preset signal sequence acquired by a second acquisition unit 604 to obtain a comparison result. A determination unit 608 determines the encoder rotation direction based on the comparison result. This effectively solves the problem that the accuracy of the encoder rotation direction determined by only detecting the initial and final states of the encoder's two ports is poor when there is a time delay. It enables accurate determination of the encoder rotation direction under different conditions, and further enables devices using encoders to accurately perform certain specific functions.

[0147] Specifically, the aforementioned specific function can be any one of adjusting the device's operating time, operating power, operating temperature, or operating humidity, but is not limited to this; it can be determined based on the actual operating conditions of the device. Furthermore, the detection device for the encoder in the above-mentioned technical solution disclosed in the second aspect of this invention may also have the following additional technical features:

[0148] In one possible embodiment, the encoder has at least one setting switch, wherein each setting switch corresponds to a set number of times, and the determining unit 608 is further configured to determine the cumulative number of times that the combined level signals arranged in chronological order are consistent with the preset signal sequence, and to determine the encoder operation based on the cumulative number being greater than or equal to the set number of times.

[0149] In this embodiment, when the determining unit 608 determines that the result of comparing a preset number of combined level signals arranged in time sequence with the preset signal sequence corresponding to the rotation direction of the encoder is consistent, the cumulative count is incremented by 1.

[0150] Specifically, the encoder is equipped with a setting switch, and the number of setting switches is at least one. Each setting switch corresponds to a set number of times, which is used to compare with the cumulative number determined by the determining unit 608. When the determining unit 608 determines that the cumulative number of times is greater than or equal to the set number of times, it concludes that the encoder is in an operating state.

[0151] For example, an encoder has two setting switches, namely a first switch and a second switch. The first switch corresponds to 2 setting times, and the second switch corresponds to 3 setting times. When the determining unit 608 determines that the cumulative number of times is 2 and determines that the setting switch is the first switch, it determines that the encoder is activated.

[0152] In one possible embodiment, the first acquisition unit 602 is further configured to acquire the current action time of the encoder, the second acquisition unit 604 is further configured to acquire the historical action data of the encoder, wherein the historical action data includes the historical action time, the comparison unit 606 is further configured to calculate the action time difference between the current action time and the historical action time, and the determination unit 608 is further configured to determine the encoder action based on the time difference being greater than or equal to a first preset duration.

[0153] In this embodiment, specifically, when the determining unit 608 determines that the time difference between the current action time and the historical action time is greater than or equal to the second preset duration, it indicates that the two actions do not belong to the same cycle. This avoids misjudging one encoder action as two encoder actions due to a short discrimination time cycle, and improves the reliability of achieving specific functions by judging the number of encoder actions.

[0154] In this embodiment, using 200 milliseconds as the first preset duration can effectively solve the problem of misjudging the number of encoder actions. At the same time, it will not affect the efficiency of detecting the number of encoder actions, and further improves the reliability of realizing specific functions by judging the number of encoder actions.

[0155] In one possible embodiment, the determining unit 608 is further configured to determine whether the number of consecutive encoder actions within a second preset time period is greater than or equal to the target number, and when the number of consecutive encoder actions is greater than or equal to the target number, adjust the adjustment step size of the encoder for the target parameter.

[0156] In this embodiment, when the determining unit 608 determines that the number of consecutive actions of the encoder within a certain period of time is greater than or equal to the target number, it indicates that the user needs to adjust the target parameter. At this time, the step length of the target parameter is adjusted by adjusting the encoder.

[0157] Specifically, by adjusting the step length of the encoder to adjust the target parameter, the quantity unit of the target parameter can be adjusted, as well as the quantity value of the target parameter. For example, if the target parameter is a time parameter, the adjustment can be changed from seconds to minutes, or from minutes to hours; the increment or decrement of the target parameter can be changed from 1 minute to 10 minutes, or from 10 minutes to 30 minutes. This enables rapid adjustment or fine-tuning of the target parameter, allowing the step length of the encoder to meet the needs of different situations.

[0158] Furthermore, based on different target parameters, a second preset duration and a target number of times are determined. That is, any target parameter has a corresponding second preset duration and a target number of times. Accordingly, the target parameter that needs to be adjusted can be determined based on the number of consecutive actions of the encoder within the corresponding preset time being greater than or equal to the target number of times, so that the present invention can achieve multiple functions based on the number of consecutive actions of the encoder within the preset duration.

[0159] In one possible embodiment, the value of the second preset duration is greater than or equal to 200 milliseconds.

[0160] In this technical solution, the second preset duration is greater than or equal to 200 milliseconds, which can ensure that the determining unit 608 has enough time to determine the number of encoder actions, avoid misjudging the number of encoder actions, and at the same time ensure that the effective number of encoder actions can be detected, thereby improving the reliability of realizing multiple functions based on the number of consecutive encoder actions within the preset duration.

[0161] In one possible embodiment, the adjustment step size of the encoder for the target parameter is adjusted according to the rotation direction of the encoder determined by the determining unit 608, wherein the adjustment step size is increased based on the encoder rotating along a first rotation direction, and the adjustment step size is decreased based on the encoder rotating along a second rotation direction, wherein the first rotation direction is opposite to the second rotation direction.

[0162] In this embodiment, the encoder's rotation direction is divided into a first rotation direction and a second rotation direction. The first rotation direction corresponds to clockwise rotation, and the second rotation direction corresponds to counterclockwise rotation; that is, the first and second rotation directions are opposite. When the encoder rotates in the first rotation direction (clockwise), the adjustment step size is increased, such as changing the target parameter adjustment from seconds to minutes, or changing the target parameter increment / decrement from 1 minute to 10 minutes. When the encoder rotates in the second rotation direction (counterclockwise), the adjustment step size is decreased, such as changing the target parameter adjustment from minutes to seconds, or changing the target parameter increment / decrement from 10 minutes to 1 minute. By determining the encoder's rotation direction through the determining unit 608 and increasing or decreasing the adjustment step size accordingly, rapid adjustment or fine-tuning of the target parameter is achieved, allowing the step size for adjusting the target parameter by adjusting the encoder to meet the needs of different situations.

[0163] In this embodiment, the target parameter is generally any one of time parameter, power parameter, display brightness parameter, temperature parameter, humidity parameter, etc., but is not limited to this, and is specifically determined according to the actual function of the device to which the encoder belongs.

[0164] In one possible embodiment, a preset number of combined level signals are acquired by the first acquisition unit 602, wherein the preset number is a positive integer greater than or equal to 3.

[0165] In this embodiment, the preset number is a positive integer greater than or equal to 3, which effectively solves the problem that the accuracy of the encoder rotation direction is poor when only detecting the initial and final states of the encoder's two ports is performed in the presence of time delay. This enables accurate determination of the encoder's rotation direction under different conditions, and further accurate control of the device to complete specific functions.

[0166] Specifically, the value of the preset quantity is determined based on the actual time delay. When the time delay is large, the value of the preset quantity can be changed, such as by setting it to 5. It can be understood that the larger the preset quantity value, the more accurate the rotation direction of the encoder is determined. However, no matter how the preset quantity value is changed, it should be ensured that the preset quantity is greater than or equal to 3, so as to ensure that the rotation direction of the encoder can be accurately determined based on the acquired preset quantity level signal, thereby reducing the occurrence of misjudgment or inability to determine.

[0167] Example 3

[0168] like Figure 7 The diagram shown is one of the schematic block diagrams of a cooking apparatus according to an embodiment of the present invention. Specifically:

[0169] A cooking device 700 is proposed, including an encoder 702, wherein the encoder 702 performs the detection method for encoders as proposed in Embodiment 1 of the present invention, and thus possesses all the beneficial effects of the detection method, which will not be elaborated here.

[0170] Example 4

[0171] like Figure 8 The diagram shown is a second schematic block diagram of a cooking apparatus according to an embodiment of the present invention. Specifically:

[0172] A cooking device 700 is proposed, comprising: a memory 704 storing a program or instructions thereon; and a controller 706 that executes the program or instructions stored in the memory 704 to implement the encoder detection method proposed in Embodiment 1 of the present invention, thus possessing all the beneficial effects of the encoder detection method proposed in Embodiment 1 of the present invention, which will not be elaborated further here.

[0173] Example 5

[0174] like Figure 9 The diagram shown is a schematic block diagram of a cooking apparatus according to an embodiment of the present invention, specifically:

[0175] A cooking device 700 is proposed, including: a detection device 600 for an encoder as proposed in Embodiment 2 of the present invention, and thus possesses all the beneficial effects of the detection device 600 for an encoder proposed in Embodiment 2 of the present invention, which will not be repeated here.

[0176] It should be noted that, in this embodiment, the cooking device can be any one of an electric fryer, an electric pressure cooker, a rice cooker, etc.

[0177] Example 6

[0178] In one possible embodiment of the present invention, a readable storage medium is provided, on which a program or instructions are stored. When executed by a processor, the program or instructions implement the encoder detection method as proposed in Embodiment 1 of the present invention. Therefore, the readable storage medium proposed in this embodiment possesses all the beneficial effects of the encoder detection method proposed in Embodiment 1 of the present invention, and will not be elaborated further here.

[0179] Example 7

[0180] like Figure 10 The diagram shown is a circuit diagram of the encoder according to an embodiment of the present invention. Specifically, A in the diagram corresponds to the first port of the encoder, and B in the diagram corresponds to the second port of the encoder.

[0181] like Figure 11The figure shown is an output waveform diagram of an encoder operating within a certain time period according to an embodiment of the present invention. Specifically, it can be concluded that the encoder rotation direction is divided into clockwise and counterclockwise directions. When the encoder is running in the clockwise direction (i.e., the first rotation direction), the encoder combination level signal in the preset signal sequence appears in a cycle of 11, 10, 00, 01 under normal circumstances. When the encoder is running in the counterclockwise direction (i.e., the second rotation direction), the encoder combination level signal in the preset signal sequence appears in a cycle of 11, 01, 00, 10 under normal circumstances.

[0182] In the description of this invention, the term "a plurality of" refers to two or more. Unless otherwise explicitly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances.

[0183] In the description of this invention, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the invention. In this invention, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0184] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A detection method for an encoder, characterized in that, The encoder has at least one setting switch, wherein each setting switch corresponds to a set number of times, and the detection method of the encoder includes: The level signals of the first port and the second port of the encoder are periodically acquired, wherein the level signals of the first port and the second port are combined according to a preset rule to obtain a combined level signal; Obtain a preset signal sequence corresponding to the rotation direction of the encoder; The preset number of combined level signals, arranged in chronological order, are compared with the preset signal sequence to obtain a comparison result. The rotation direction of the encoder is determined based on the comparison results; The cumulative number of times that the combined level signals, arranged in chronological order, match the preset number are determined; The encoder action is determined based on the cumulative number being greater than or equal to the set number; Determining the encoder action based on the cumulative number being greater than or equal to the set number further includes: Obtain the historical motion data of the encoder, wherein the historical motion data includes the historical motion times; Obtain the current action time of the encoder; Determine the action time difference based on the historical action time and the current action time; The encoder action is determined based on the time difference being greater than or equal to a first preset duration.

2. The detection method according to claim 1, characterized in that, The first preset duration is 200 milliseconds.

3. The detection method according to claim 1 or 2, characterized in that, Also includes: Within a second preset time period, based on the fact that the number of consecutive actions of the encoder is greater than or equal to the target number, the adjustment step size of the encoder for the target parameter is adjusted.

4. The detection method according to claim 3, characterized in that, The second preset duration is greater than or equal to 200 milliseconds.

5. The detection method according to claim 3, characterized in that, Based on the encoder rotating along the first rotation direction, the adjustment step size is increased; Based on the encoder rotating along the second rotation direction, the adjustment step size is reduced. Wherein, the first rotation direction is opposite to the second rotation direction.

6. The detection method according to claim 3, characterized in that, The target parameters include: Any one of the following parameters: time, temperature, humidity, display brightness, and power.

7. The detection method according to claim 1 or 2, characterized in that, The preset quantity is a positive integer greater than or equal to 3.

8. A detection device for an encoder, characterized in that, The encoder has at least one setting switch, wherein each setting switch corresponds to a set number of times, and the encoder's detection device includes: The first acquisition unit is used to periodically acquire the level signals of the first port and the second port of the encoder, wherein the level signals of the first port and the second port are combined according to a preset rule to obtain a combined level signal; The second acquisition unit is used to acquire a preset signal sequence corresponding to the rotation direction of the encoder; The comparison unit is used to compare the preset number of combined level signals arranged in chronological order with the preset signal sequence to obtain a comparison result; A determining unit is configured to determine the rotation direction of the encoder based on the comparison result; The determining unit is further configured to determine the cumulative number of times that the combined level signals, arranged in chronological order, are consistent with the preset signal sequence, and to determine the encoder action based on the cumulative number being greater than or equal to the set number; The first acquisition unit is further configured to acquire the current action time of the encoder; The second acquisition unit is further configured to acquire the encoder's historical motion data, wherein the historical motion data includes historical motion times; The comparison unit is also used to calculate the action time difference between the current action time and the historical action time; The determining unit is further configured to determine the encoder action based on the time difference being greater than or equal to a first preset duration.

9. A cooking device, characterized in that, include: An encoder, wherein the encoder performs the detection method as described in any one of claims 1 to 7.

10. A cooking device, characterized in that, include: A memory, on which programs or instructions are stored. A controller that executes a program or instructions stored in the memory to implement the steps of the detection method as described in any one of claims 1 to 7.

11. A cooking appliance, characterized in that, include: The detection device for an encoder as described in claim 8.

12. The cooking apparatus according to claim 11, characterized in that, The cooking equipment includes: Any one of the following: rice cooker, electric pressure cooker, or electric fryer.

13. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Working mode adjustment method, device and apparatus

    CN108873763A