A dynamic dimming method for a rotary encoder

The control unit recognizes the changing state and time count value of the knob encoder, and dynamically adjusts the dimming value of the knob encoder, solving the problem of high-precision dynamic dimming in lighting adjustment, achieving fast and accurate dimming effects.

CN115103486BActive Publication Date: 2025-07-18GUANGZHOU YAJIANG PHOTOELECTRIC EQUIP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210794715.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2025-07-18
Estimated Expiration
2042-07-07

AI Technical Summary

Technical Problem

Existing knob encoders are difficult to achieve high-precision dynamic dimming in lighting adjustment, especially dimming numerical adjustment in the range of 0-255. The high-resolution encoder is small in intervals per grid, resulting in inconvenient operation.

Method used

The control unit recognizes the changing state of the knob encoder, initializes the timing counter, judges the rotation direction, and dynamically adjusts the dimming value according to the time count value and the preset interval value to realize the dimming value adjustment of each grid of the knob encoder.

Benefits of technology

It realizes dynamic adjustment of dimming values according to the user's rotation speed, which can not only adjust quickly but also accurately adjust, improving dimming accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115103486B_ABST
    Figure CN115103486B_ABST
Patent Text Reader

Abstract

This application relates to the technical field of lighting dimming, and particularly to a dynamic dimming method for a rotary encoder. The method includes: a control unit identifies a first change state of the rotary encoder, initializes a timing counter, and determines the rotation direction of the rotary encoder based on the level change received by the control unit in the first change state; the control unit identifies a second change state of the rotary encoder, obtains the current time count value of the timing counter, and obtains a preset interval value corresponding to the current time count value based on the current time count value; dynamically adjusts the dimming value for each rotation of the rotary encoder according to the rotation direction and the preset interval value until the target dimming value is adjusted. This application achieves the effect of dynamically adjusting the dimming value by dynamically adjusting the interval value for each grid of the rotary encoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of lighting dimming, and particularly to a dynamic dimming method for a rotary encoder. Background Art

[0002] Rotary encoders are increasingly widely used in all walks of life. In the lighting industry, to avoid the trouble of operating consoles and screens, rotary encoders have begun to be commonly used for lighting adjustment of lamps. For the dimming of a lamp, the adjustment is carried out within the numerical range from 0 to 255. To improve the dimming accuracy, a high-resolution encoder needs to be selected. However, due to the small interval of each grid of a high-resolution encoder, the dimming value corresponding to each rotation of the rotary encoder by one grid cannot change. To accurately locate a certain dimming value, only delicate and slow operations can be carried out. To dynamically adjust the dimming value, it is very difficult to achieve only by selecting the encoder type. Summary of the Invention

[0003] For this reason, the embodiments of this application provide a dynamic dimming method for a rotary encoder, which can dynamically adjust the dimming value of the rotary encoder according to the time count value of rotating the rotary encoder by one grid according to a preset interval value, so as to realize the dynamic adjustment of the dimming value. The specific technical solution content is as follows:

[0004] The control unit identifies the first change state of the rotary encoder, initializes the timing counter, and determines the rotation direction of the rotary encoder according to the level change received by the control unit in the first change state;

[0005] The control unit identifies the second change state of the rotary encoder, obtains the current time count value of the timing counter, and obtains the preset interval value corresponding to the current time count value based on the current time count value;

[0006] Dynamically adjust the dimming value of the rotary encoder rotating by one grid according to the rotation direction and the preset interval value until the target dimming value is adjusted.

[0007] In a preferred example of this application, it can be further set that at each time interval, the timing counter determines whether the current time count value is 0. If it is not 0, the current time count value is subtracted by 1 until the current time count value is equal to 0.

[0008] In a preferred example of this application, it can be further set that

[0009] The steps of the control unit identifying the first change state of the rotary encoder and determining the rotation direction of the rotary encoder according to the level change received by the control unit in the first change state include:

[0010] The control unit recognizes the first change state of the rotary encoder, and determines the rotation direction of the rotary encoder according to the sequence of the level changes of the input terminal A and input terminal B of the control unit in the first change state; wherein, the rotary encoder is electrically connected to the input terminal A and input terminal B of the control unit;

[0011] If the level change received by the input terminal B of the control unit precedes the level change received by the output terminal A, it is determined that the rotary encoder rotates clockwise;

[0012] If the level change received by the input terminal A of the control unit precedes the level change received by the output terminal B, it is determined that the rotary encoder rotates counterclockwise.

[0013] In a preferred example of the present application, it can be further set as

[0014] The step of adjusting the dimming value for each rotation of the current rotary encoder according to the rotation direction and the preset interval value further includes:

[0015] If the rotary encoder rotates clockwise, increase the dimming value of the rotary encoder according to the preset interval value;

[0016] If the rotary encoder rotates counterclockwise, decrease the dimming value of the rotary encoder according to the preset interval value.

[0017] In a preferred example of the present application, it can be further set as

[0018] The steps of increasing the dimming value of the rotary encoder according to the preset interval value and decreasing the dimming value of the rotary encoder according to the preset interval value both include:

[0019] A time count value interval table is preset inside the control unit, at least two count value intervals are divided in the time count value interval table, and each count value interval is correspondingly set with a preset interval value;

[0020] Judge the count value interval to which the current time count value belongs, obtain the preset interval value corresponding to the count value interval, and adjust the dimming value of the rotary encoder according to the preset interval value corresponding to the count value interval.

[0021] In a preferred example of the present application, it can be further set as

[0022] In the time count value interval table, it is divided into five count value intervals, which respectively correspond to five preset interval values, and the adjacent preset interval values gradually increase;

[0023] If it is judged that the current time count value belongs to the first count value interval, obtain the first preset interval value corresponding to the first count value interval, and adjust the dimming value of the rotary encoder according to the first preset interval value;

[0024] If it is determined that the current time count value belongs to the second count value interval, obtain the second preset interval value corresponding to the second count value interval, and adjust the dimming value of the rotary encoder according to the second preset interval value;

[0025] If it is determined that the current time count value belongs to the third count value interval, obtain the third preset interval value corresponding to the third count value interval, and adjust the dimming value of the rotary encoder according to the third preset interval value;

[0026] If it is determined that the current time count value belongs to the fourth count value interval, obtain the fourth preset interval value corresponding to the fourth count value interval, and adjust the dimming value of the rotary encoder according to the fourth preset interval value;

[0027] If it is determined that the current time count value belongs to the fifth count value interval, obtain the fifth preset interval value corresponding to the fifth count value interval, and adjust the dimming value of the rotary encoder according to the fifth preset interval value. In a preferred example of the present application, it can be further set that

[0028] The first count value interval is (250, 300], and the corresponding first preset interval value is 5;

[0029] The second count value interval is (200, 250], and the corresponding second preset interval value is 4;

[0030] The third count value interval is (150, 200], and the corresponding third preset interval value is 3;

[0031] The fourth count value interval is (100, 150], and the corresponding fourth preset interval value is 2;

[0032] The fifth count value interval is [0, 100], and the corresponding fifth preset interval value is 1.

[0033] In a preferred example of the present application, it can be further set that

[0034] When the dimming value of the rotary encoder is adjusted to be less than the first threshold, set the dimming value to the first threshold;

[0035] When the dimming value of the rotary encoder is adjusted to be greater than the second threshold, set the dimming value to the second threshold.

[0036] In a preferred example of the present application, it can be further set that

[0037] The first threshold is set to 0, and the second threshold is set to 255.

[0038] In a preferred example of the present application, it can be further set that after the step of dynamically adjusting the dimming value for one grid rotation of the rotary encoder according to the rotation direction and the preset interval value, the following steps are further included:

[0039] After completing the dimming value for one grid rotation of the current rotary encoder, the time count value is reassigned to 300.

[0040] In summary, compared with the prior art, the beneficial effects brought by the technical solution provided by the embodiments of the present application at least include:

[0041] 1. The control unit identifies the first change state of the rotary encoder, initializes the timing counter, and determines the rotation direction of the rotary encoder; after identifying the second change state of the rotary encoder, the current time count value of the timing counter is obtained, and further according to the count value interval to which the current time count value belongs, the dimming value for each grid of the rotary encoder is dynamically adjusted according to the corresponding preset interval value, so as to achieve the purpose of fast adjustment with a large numerical span or precise adjustment with a small numerical span according to the speed at which the user rotates the rotary encoder. Description of the Drawings

[0042] Figure 1 is a schematic flowchart of a method for dynamically adjusting the dimming of a rotary encoder provided by an embodiment of the present application;

[0043] Figure 2 is a schematic diagram of the connection relationship between a control unit and a rotary encoder provided by an embodiment of the present application;

[0044] Figure 3 is a schematic diagram of the control unit judging the clockwise rotation of the rotary encoder provided by an embodiment of the present application;

[0045] Figure 4 is a schematic diagram of the control unit judging the counterclockwise rotation of the rotary encoder provided by an embodiment of the present application. Detailed Embodiments

[0046] This specific embodiment is only an interpretation of the present application, and it is not a limitation of the present application. Those skilled in the art can make modifications without creative contributions to this embodiment according to needs after reading this specification, but as long as they are within the scope of the claims of the present application, they are protected by the Patent Law.

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art without making creative efforts based on the embodiments in the present application belong to the scope of protection of the present application.

[0048] In addition, the term "and / or" in this application is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this application generally represents an "or" relationship between the associated objects before and after, unless otherwise specified.

[0049] The terms "first", "second", etc. in this application are used to distinguish identical or similar items with basically the same functions. It should be understood that there is no logical or chronological dependency between "first", "second", and "nth", nor are the quantity and execution order limited.

[0050] The embodiments of the present application will be further described in detail below with reference to the accompanying drawings of the specification.

[0051] Refer to Figure 1 , in an embodiment of the present application, a method for dynamically adjusting the light of a rotary encoder is provided. The main steps of the method are described as follows:

[0052] S10: The control unit identifies the first change state of the rotary encoder, initializes the timing counter, and determines the rotation direction of the rotary encoder according to the level change received by the control unit in the first change state;

[0053] S20: The control unit identifies the second change state of the rotary encoder, obtains the current time count value of the timing counter, and obtains the preset interval value corresponding to the current time count value based on the current time count value;

[0054] S30: Dynamically adjust the light adjustment value for one grid of rotation of the rotary encoder according to the rotation direction and the preset interval value until the target light adjustment value is adjusted.

[0055] Among them, as Figure 2 shown, the rotary encoder is electrically connected to the input A terminal and the input B terminal of the control unit. Specifically, the first output port of the rotary encoder is electrically connected to the input A terminal of the control unit, and the second output port of the rotary encoder is electrically connected to the input B terminal of the control unit. The control unit can receive the digital signal output by the rotary encoder. Among them, the control unit is an MCU micro-control unit, and a timing counter is integrated in the MCU system.

[0056] Preferably, at each time interval, the timing counter determines whether the current time count value is 0. If it is not 0, the current time count value is decremented by 1 until the current time count value equals 0. In this embodiment, the time interval T is set to 3.3 milliseconds. Throughout the process, the timing counter is not affected by any interference. Every 3.3 milliseconds, it checks the current time count value to determine whether it is 0. If it is not 0, the time count value is decremented by 1 every 3.3 milliseconds until the time count value equals 0. During the process of turning a grid of the rotary encoder, the change in the time count value can be used to estimate the time it takes for the user to rotate a grid of the rotary encoder. The change amount of the time count value multiplied by 3.3 milliseconds is the time used. On the premise that the rotational displacement of each grid of the knob is the same, the speed at which the user rotates a grid of the rotary encoder can be estimated. When the change amount of the time count value is very small when the user rotates a grid of the rotary encoder, that is, the time used is short, it means that the user wants to quickly adjust the rotary encoder and expects a large change in the dimming value. When the change amount of the time count value is very large when the user rotates a grid of the rotary encoder, that is, the time used is long, it means that the user wants to slowly adjust the rotary encoder and expects a fine change in the dimming value. Based on this, different interval values can be set according to the time and speed at which the user rotates a grid of the rotary encoder to adjust the dimming value.

[0057] Preferably, the control unit receives the signal of the rotary encoder and recognizes the first change state of the rotary encoder. The first change state is the moment when the rotary encoder starts to rotate. According to the sequence of the level changes at the input A terminal and the input B terminal of the control unit in the first change state, the rotation direction of the rotary encoder is determined;

[0058] Among them, if the level change at the input B terminal of the control unit is received earlier than the level change at the input A terminal, it is determined that the rotary encoder rotates clockwise;

[0059] If the level change at the input A terminal of the control unit is received earlier than the level change at the input B terminal, it is determined that the rotary encoder rotates counterclockwise.

[0060] Specifically, the control unit receives the digital signal output by the rotary encoder. When the rotary encoder is in a stationary state without rotation, the input A terminal and the input B terminal of the control unit receive high level and / or low level simultaneously. When the rotary encoder is rotated instantaneously, the levels received at the input A terminal and the input B terminal of the control unit change, changing from high level to low level or from low level to high level. As Figure 3 shown, the control unit recognizes the first change state, and the first change state is Figure 3At the instant of State 1 in [reference], the levels received at input terminal A and input terminal B of the control unit change from high level to low level. And if the change in the level received at input terminal B of the control unit takes precedence over the change in the level received at input terminal A, it can be determined that the rotary encoder rotates clockwise; as Figure 4 shown, the control unit recognizes the first change state, and the first change state is Figure 4 At the instant of State 1 in [reference], the levels received at input terminal A and input terminal B of the control unit change, from high level to low level. And if the change in the level received at input terminal A of the control unit takes precedence over the change in the level received at input terminal B, it can be determined that the rotary encoder rotates counterclockwise.

[0061] Preferably, when the rotary encoder rotates clockwise, the dimming value of the rotary encoder is increased according to a preset interval value; when the rotary encoder rotates counterclockwise, the dimming value of the rotary encoder is decreased according to a preset interval value. Specifically, when the control unit determines that the user rotates the rotary encoder clockwise, each time the user rotates the rotary encoder by one grid, the dimming value of the rotary encoder is added with a preset interval value; when the control unit determines that the user rotates the rotary encoder counterclockwise, each time the user rotates the rotary encoder by one grid, the dimming value of the rotary encoder is subtracted by a preset interval value. By judging the rotation direction of the rotary encoder, the dimming value can be increased or decreased at any time, making the adjustment of the dimming value more convenient and efficient.

[0062] Preferably, a time count value interval table is preset inside the control unit. At least two count value intervals are divided in the time count value interval table, and a preset interval value is correspondingly set for each count value interval, where the number of count value intervals can be freely set;

[0063] Judge the count value interval to which the current time count value belongs, obtain the preset interval value corresponding to the count value interval, and adjust the dimming value of the rotary encoder according to the preset interval value corresponding to the count value interval.

[0064] Specifically, as Figure 3 and 4 shown, at the instant when the control unit receives the second change state of the rotary encoder, obtain the current time count value of the timing counter, compare it with the time count value interval table preset inside the control unit, judge the count value interval to which the current time count value belongs, and obtain the preset interval value corresponding to the count value interval, and adjust the dimming value of the rotary encoder according to the preset interval value. Estimate the time taken to rotate the rotary encoder by one grid according to the count value interval to which the current count value belongs, and then quickly adjust the dimming value with a large numerical span or finely adjust the dimming value with a small numerical span according to different preset interval values.

[0065] Preferably, in the time count value interval table, the time count values are divided into five count value intervals from largest to smallest, corresponding to five preset interval values respectively. Among them, the first count value interval corresponds to the first preset interval value, the second count value interval corresponds to the second preset interval value, the third count value interval corresponds to the third preset interval value, the fourth count value interval corresponds to the fourth preset interval value, and the fifth count value interval corresponds to the fifth preset interval value. From the first preset interval value to the fifth preset interval value, the adjacent preset interval values gradually decrease.

[0066] If it is determined that the current time count value belongs to the first count value interval, obtain the first preset interval value corresponding to the first count value interval, and adjust the dimming value of the rotary encoder according to the first preset interval value;

[0067] If it is determined that the current time count value belongs to the second count value interval, obtain the second preset interval value corresponding to the second count value interval, and adjust the dimming value of the rotary encoder according to the second preset interval value;

[0068] If it is determined that the current time count value belongs to the third count value interval, obtain the third preset interval value corresponding to the third count value interval, and adjust the dimming value of the rotary encoder according to the third preset interval value;

[0069] If it is determined that the current time count value belongs to the fourth count value interval, obtain the fourth preset interval value corresponding to the fourth count value interval, and adjust the dimming value of the rotary encoder according to the fourth preset interval value;

[0070] If it is determined that the current time count value belongs to the fifth count value interval, obtain the fifth preset interval value corresponding to the fifth count value interval, and adjust the dimming value of the rotary encoder according to the fifth preset interval value;

[0071] Preferably, the first count value interval is (250, 300], and the corresponding first preset interval value is 5;

[0072] The second count value interval is (200, 250], and the corresponding second preset interval value is 4;

[0073] The third count value interval is (150, 200], and the corresponding third preset interval value is 3;

[0074] The fourth count value interval is (100, 150], and the corresponding fourth preset interval value is 2;

[0075] The fifth count value interval is [0, 100], and the corresponding fifth preset interval value is 1.

[0076] Specifically, for example, when the control unit recognizes the first change state of the rotary encoder, it initializes the timing counter. In the first change state, the change in the level received at the input terminal B of the control unit precedes the change in the level received at the output terminal A, and it is determined that the rotation direction of the rotary encoder is clockwise. When the control unit recognizes the second change state and the rotary encoder rotates one grid, the current time count value of the timing counter is obtained, and the current time count value is compared with the preset time count value interval table in the control unit. If the judgment result is that the current time count value belongs to the first count value interval, the first preset interval value corresponding to the first count value interval is obtained, and the dimming value of the rotary encoder is increased by a first preset interval value.

[0077] The numerical range of the time count value is 0 - 300, which is divided into 5 different numerical intervals. Different numerical intervals represent the time range used by the user to rotate the rotary encoder one grid. Dividing the numerical range of the time count value into 5 different numerical intervals is more in line with the user's adjustment rate habit and can improve the dimming efficiency of adjusting the dimming value of the rotary encoder. The first count value interval is between greater than 250 and less than or equal to 300, representing that the time range used by the user to rotate the rotary encoder one grid is between 0 and 0.165 seconds. At this time, the first preset interval value is set to 5; the second count value interval is between greater than 200 and less than or equal to 250, representing that the time range used by the user to rotate the rotary encoder one grid is between 0.165 and 0.33 seconds. At this time, the second preset interval value is set to 4; the third count value interval is between greater than 150 and less than or equal to 200, representing that the time range used by the user to rotate the rotary encoder one grid is between 0.33 and 0.495 seconds. At this time, the third preset interval value is set to 3; the fourth count value interval is between greater than 100 and less than or equal to 150, representing that the time range used by the user to rotate the rotary encoder one grid is between 0.495 and 0.66 seconds. At this time, the second preset interval value is set to 2; the fourth count value interval is between greater than 0 and less than or equal to 100, representing that the time range used by the user to rotate the rotary encoder one grid is between 0.66 and 0.99 seconds. At this time, the first preset interval value is set to 1. According to the different time ranges used by the user to rotate the rotary encoder one grid, different preset interval values are set correspondingly to dynamically adjust the dimming value. When the user rotates the rotary encoder one grid and the time used is short, the corresponding preset interval value is large, so that the dimming value quickly jumps to be close to the dimming value desired by the user. When the user rotates the rotary encoder one grid and the time used is long, the corresponding preset interval value is small, and at this time, the change in the dimming value is more accurate, realizing a fast and accurate adjustment to the desired dimming value.

[0078] Preferably, when the dimming value of the knob encoder is adjusted to be less than the first threshold, the dimming value of the knob encoder is set to the first threshold; when the dimming value of the knob encoder is adjusted to be greater than the second threshold, the dimming value is set to the second threshold; wherein the first threshold is set to 0 and the second threshold is set to 255.

[0079] Today's LED lamps all use digital signals to control brightness dimming, and the digital signal dimming system has only 0-255 changes per channel, which determines that the LED dimming level is only 256 levels and corresponds to the value of the dimming system 0-255. When the dimming value of the knob encoder is increased or decreased according to the preset interval value, a value greater than 255 or less than 0 may appear, and the lamp does not have the corresponding brightness at this time. When the dimming value of the knob encoder is adjusted to less than 0, the dimming value is set to 0; when the dimming value of the knob encoder is adjusted to greater than 255, the dimming value is set to 255 to ensure that the dimming value changes between valid values.

[0080] Preferably, after the step of adjusting the dimming value of the knob encoder according to the preset interval value based on the time count value, the method further includes: after completing the dimming count value of the current knob encoder rotating one grid, reassigning the time count value to 300. This is used to determine the numerical range of the time count value when the knob encoder is rotated next time.

[0081] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system described in the present application is divided into different functional units or modules to complete all or part of the functions described above.

Claims

1. A dynamic dimming method for a rotary encoder, characterized in that, The method includes: The control unit identifies the first change state of the rotary encoder, initializes the timing counter, and determines the rotation direction of the rotary encoder according to the level change received by the control unit in the first change state; Among them, according to the sequence of the level changes of the input A terminal and the input B terminal of the control unit in the first change state, the rotation direction of the rotary encoder is determined; among them, the rotary encoder is electrically connected to the input A terminal and the input B terminal of the control unit; If the level change received by the input B terminal of the control unit precedes the level change received by the output A terminal, it is determined that the rotary encoder rotates clockwise; If the level change received by the input A terminal of the control unit precedes the level change received by the output B terminal, it is determined that the rotary encoder rotates counterclockwise; At each time interval, the timing counter determines whether the current time count value is 0. If it is not 0, the current time count value is subtracted by 1 until the current time count value is equal to 0; The control unit identifies the second change state of the rotary encoder, obtains the current time count value of the timing counter, and obtains the preset interval value corresponding to the current time count value based on the current time count value. The second change state is used to indicate that the rotary encoder rotates one grid; Dynamically adjust the dimming value of the rotary encoder rotating one grid according to the rotation direction and the preset interval value until the target dimming value is adjusted; Among them, if the rotary encoder rotates clockwise, the dimming value of the rotary encoder is increased according to the preset interval value; If the rotary encoder rotates counterclockwise, the dimming value of the rotary encoder is decreased according to the preset interval value.

2. The dynamic dimming method of the rotary encoder according to claim 1, characterized in that The steps of increasing the dimming value of the rotary encoder according to the preset interval value and decreasing the dimming value of the rotary encoder according to the preset interval value both include: There is a preset time count value interval table inside the control unit. At least two count value intervals are divided in the time count value interval table, and each count value interval is correspondingly set with a preset interval value; Judge the count value interval to which the current time count value belongs, obtain the preset interval value corresponding to the count value interval, and adjust the dimming value of the rotary encoder according to the preset interval value corresponding to the count value interval.

3. The dynamic dimming method of the rotary encoder according to claim 2, characterized in that, It also includes: It is divided into five count value intervals in the time count value interval table, corresponding to five preset interval values respectively; If it is judged that the current time count value belongs to the first count value interval, obtain the first preset interval value corresponding to the first count value interval, and adjust the dimming value of the rotary encoder according to the first preset interval value; If it is judged that the current time count value belongs to the second count value interval, obtain the second preset interval value corresponding to the second count value interval, and adjust the dimming value of the rotary encoder according to the second preset interval value; If it is judged that the current time count value belongs to the third count value interval, obtain the third preset interval value corresponding to the third count value interval, and adjust the dimming value of the rotary encoder according to the third preset interval value; If it is determined that the current time count value belongs to the fourth count value interval, obtain the fourth preset interval value corresponding to the fourth count value interval, and adjust the dimming value of the rotary encoder according to the fourth preset interval value; If it is determined that the current time count value belongs to the fifth count value interval, obtain the fifth preset interval value corresponding to the fifth count value interval, and adjust the dimming value of the rotary encoder according to the fifth preset interval value.

4. The method for dynamically dimming a rotary encoder according to claim 3, wherein: The first count value interval is (250, 300], and the corresponding first preset interval value is 5; The second count value interval is (200, 250], and the corresponding second preset interval value is 4; The third count value interval is (150, 200], and the corresponding third preset interval value is 3; The fourth count value interval is (100, 150], and the corresponding fourth preset interval value is 2; The fifth count value interval is [0, 100], and the corresponding fifth preset interval value is 1.

5. The dynamic dimming method of a rotary encoder according to claim 4, characterized in that, It further includes: When the dimming value of the rotary encoder is adjusted to be less than the first threshold, set the dimming value to the first threshold; When the dimming value of the rotary encoder is adjusted to be greater than the second threshold, set the dimming value to the second threshold.

6. The dynamic dimming method of the rotary encoder according to claim 5, characterized in that The first threshold is set to 0, and the second threshold is set to 255.

7. The dynamic dimming method of the rotary encoder according to claim 6, characterized in that, After the step of dynamically adjusting the dimming value of one grid rotation of the rotary encoder according to the rotation direction and the preset interval value, it further includes: After completing the dimming value of one grid rotation of the current rotary encoder, reassign the time count value to 300.

Citation Information

Patent Citations

  • Input adjustment assembly and solenoid magnetic field measurement experiment device including the same

    CN108710091A