Input device and method of controlling the same

By combining the signal processing of relative and absolute encoders, the encoder output error problem is solved, enabling self-calibration and long-term reliability of the input device, and extending its service life.

CN116263625BActive Publication Date: 2026-08-04CHICONY ELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHICONY ELECTRONICS CO LTD
Filing Date
2021-12-13
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Relative encoders in existing mice are susceptible to mechanical damage and dust accumulation, leading to abnormal output. Absolute encoders, on the other hand, are prone to output errors due to mismatch between the magnetic field and the Hall element. They are also difficult to calibrate after leaving the factory, affecting their service life and reliability.

Method used

By combining relative and absolute encoders, the processor corrects the output error of the absolute encoder based on the signal from the relative encoder, and corrects the error by calculating the interpolation angle through a lookup table when the relative encoder is not operating normally.

Benefits of technology

It extends the lifespan of the input device and can self-calibrate after leaving the factory, improving the reliability and lifespan of the mouse.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116263625B_ABST
    Figure CN116263625B_ABST
Patent Text Reader

Abstract

The present disclosure provides an input device and a control method thereof. The control method includes the steps of obtaining current angle data outputted by an absolute encoder according to a target phase of at least one signal outputted by a relative encoder; obtaining a current position number corresponding to the current angle data according to the current angle data; calculating a number difference value according to the current position number and a previous position number; and outputting the number difference value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to an input device and its control method, and more particularly to an input device and its control method that includes a relative encoder and an absolute encoder. Background Technology

[0002] The rotary encoders in existing mice are of two types: relative encoders (e.g., mechanical rotary encoders or optical rotary encoders) and absolute encoders (e.g., magnetic rotary encoders).

[0003] Relative encoders are prone to malfunctions due to mechanical damage or dust accumulation. Therefore, mice using relative encoders typically have a shorter lifespan.

[0004] Absolute encoders often cause output errors due to a mismatch between the magnetic field and the Hall element. Therefore, absolute encoders generally need to be calibrated by scrolling the mouse wheel before leaving the factory. However, if problems occur after leaving the factory (e.g., temperature changes causing incorrect magnetic induction, or mechanical damage due to the mouse being dropped), the absolute encoder cannot be recalibrated, resulting in the mouse malfunctioning. Summary of the Invention

[0005] One embodiment of this disclosure is a control method for an input device. The control method includes the following steps: acquiring current angle data output by an absolute encoder based on the target phase of at least one signal output by a relative encoder; acquiring a current position number corresponding to the current angle data based on the current angle data; calculating a number difference between the current position number and a previous position number; and outputting the number difference.

[0006] Another embodiment of this disclosure is a control method for an input device. This control method includes the following steps: acquiring first angle data and second angle data output by an absolute encoder based on two adjacent target phases in at least one signal output by a relative encoder; if the difference between the first angle data and the second angle data is less than or equal to a preset angle value, using the first angle data or the second angle data as current angle data; acquiring a current position number corresponding to the current angle data based on the current angle data; calculating a number difference based on the current position number and a previous position number; and outputting the number difference.

[0007] Another embodiment of this disclosure is an input device. The input device is coupled to a computer device for displaying a screen, and includes a roller module, a relative encoder, an absolute encoder, and a processor. The roller module generates an action in response to user operation. The relative encoder generates at least one signal based on the action of the roller module. The absolute encoder outputs the rotation angle of the roller module relative to a reference position based on the action of the roller module. The processor performs the following steps: when the at least one signal is in a target phase, acquiring current angle data output by the absolute encoder; acquiring a current position number corresponding to the current angle data; calculating a number difference between the current position number and a previous position number; and outputting the number difference.

[0008] In summary, the input device of this disclosure can correct the output error of an absolute encoder based on the output of the relative encoder during normal operation, and can also generate an output signal based on the output of the absolute encoder when the relative encoder is not operating normally. Furthermore, when the relative encoder is not operating normally, the input device of this disclosure can also correct the output error of the absolute encoder by calculating the interpolation angle using a lookup table. Therefore, the input device of this disclosure has the advantages of a longer service life and the ability to self-calibrate after leaving the factory. Attached Figure Description

[0009] Figure 1 This is a block diagram of an input device shown according to some embodiments of the present disclosure.

[0010] Figure 2 This is a flowchart illustrating a control method for an input device according to some embodiments of the present disclosure.

[0011] Figure 3 This is a schematic diagram of the normal signal output by a relative encoder according to some embodiments of the present disclosure.

[0012] Figure 4 This is a flowchart illustrating a control method for an input device according to some embodiments of the present disclosure.

[0013] Figure 5 This is a schematic diagram of an abnormal signal output by a relative encoder, as shown in some embodiments of the present disclosure.

[0014] Explanation of reference numerals in the attached figures:

[0015] 10 Input Devices

[0016] 20 Computer devices

[0017] 101 Roller Module

[0018] 102 Relative Encoder

[0019] 103 Absolute Encoder

[0020] 104 processor

[0021] 105 storage devices

[0022] 200, 400 control methods

[0023] 201 Display Screen

[0024] Sp, Sp1, Sp2, Sp3, Sp4 signals

[0025] Sa rotation angle

[0026] Sout output signal

[0027] Ptg target phase

[0028] Ptge phase

[0029] Te Time Point Detailed Implementation

[0030] The following detailed description of embodiments, in conjunction with the accompanying drawings, is provided. However, the specific embodiments described are only for explaining this case and are not intended to limit this case. The description of the structural operations is not intended to limit the order of their execution. Any structure resulting from the recombination of elements and producing an apparatus with equivalent functionality is within the scope of this disclosure.

[0031] Unless otherwise specified, the terms used throughout the specification and claims generally have their ordinary meaning in the context of the art, the disclosure, and the specific content.

[0032] The terms "coupled" or "connected" as used in this article can refer to two or more components making direct physical or electrical contact with each other, or making indirect physical or electrical contact with each other, or to two or more components operating or acting on each other.

[0033] Please see Figure 1 , Figure 1This is a block diagram illustrating an input device 10 according to some embodiments of the present disclosure. In some practical applications, the input device 10 is coupled to a computer device 20 and is used to generate an output signal Sout to the computer device 20 in response to user operations (e.g., moving the input device 10, clicking or pressing a key on the input device 10, scrolling the wheel on the input device 10, etc.), thereby causing the computer device 20 to control the display screen 201 displayed on the computer device 20 according to the output signal Sout. It should be understood that the input device 10 may be implemented by means of a human-machine interface device with a scroll wheel (e.g., a mouse, game controller, etc.), and the computer device 20 may be, for example, but not limited to, a desktop computer, a laptop computer, or a tablet computer.

[0034] like Figure 1 As shown, the input device 10 includes a roller module 101, a relative encoder 102, an absolute encoder 103, a processor 104, and a memory 105. Structurally, the relative encoder 102 and the absolute encoder 103 are mounted on the roller module 101. The processor 104 is coupled to the relative encoder 102, the absolute encoder 103, and the memory 105, and can be coupled to the computer device 20.

[0035] In some embodiments, the relative encoder 102 may be implemented by means of a mechanical rotary encoder or an optical rotary encoder. The absolute encoder 103 may be implemented by means of a magnetic rotary encoder. The processor 104 may be implemented by means of one or more central processing units (CPUs), application-specific integrated circuits (ASICs), microprocessors, system-on-a-chip (SoCs), or other suitable processing units. The memory 105 may be implemented by means of a memory.

[0036] It should be understood that the roller module 101 can move (e.g., rotate) in response to user operation. When the movement occurs, the roller module 101 will drive the relative encoder 102 and the absolute encoder 103 to move synchronously. In this way, the relative encoder 102 can generate at least one signal Sp based on the movement of the roller module 101, and the absolute encoder 103 can also output a rotation angle Sa based on the movement of the roller module 101. In some embodiments, the rotation angle Sa is the angle by which the roller module 101 rotates about its axis relative to a reference position (e.g., the position of the roller module 101 that has never rotated). In other words, the rotation angle Sa is absolute information.

[0037] In some embodiments, the memory 105 may store a lookup table. Please refer to Table 1, which is a lookup table shown in some embodiments according to this disclosure. Specifically, the lookup table includes multiple angle values ​​Va and multiple position numbers Np corresponding to the multiple angle values ​​Va. Each position number Np corresponds to a specific position of the roller module 101. For example, number (1) indicates that the roller module 101 is located at the aforementioned reference position, so the angle corresponding to number (1) is 0°. It should be understood that the values ​​in Table 1 are for illustrative purposes only and are not intended to limit the scope of this disclosure.

[0038] Table 1

[0039]

[0040]

[0041] In some embodiments, the signal Sp output by the relative encoder 102 has multiple phases (described in detail later). The multiple phases of signal Sp include at least one target phase (described in detail later), and the target phase is used to trigger the processor 104 to perform related operations. Specifically, the processor 104 can obtain the rotation angle Sa currently output by the absolute encoder 103 when signal Sp is in the target phase. Then, the processor 104 can find the position number Np corresponding to the currently output rotation angle Sa (described in detail later) using a lookup table (e.g., Table 1) stored in the memory 105, and can generate a number difference between the currently found position number Np and the previously found position number Np as an output signal Sout, thereby outputting the output signal Sout to the computer device 20. It should be understood that the number difference can be a positive or negative integer. In some practical applications, the computer device 20 controls the scrolling of the page (not shown) of the window in the display screen 201 up or down based on the positive or negative integer.

[0042] In some embodiments, when the relative encoder 102 is operating normally, the absolute encoder 103 may output an incorrect rotation angle Sa due to the influence of the magnetic field and the Hall element. In other words, the rotation angle Sa may have an error. In view of this, the processor 104 can calculate the angle difference based on the currently output rotation angle Sa and the angle value Va corresponding to the currently found position number Np in the lookup table, and determine whether the angle difference is less than or equal to the error range (e.g., ±3°). In addition, the processor 104 can selectively update the angle value Va corresponding to the currently found position number Np in the lookup table according to the determination result, thereby solving the error problem of the rotation angle Sa.

[0043] In some embodiments, the relative encoder 102 may output an abnormal signal Sp due to mechanical damage or dust (i.e., the relative encoder 102 is malfunctioning), causing the processor 104 to read the output of the absolute encoder 103 at an incorrect time. Specifically, the time difference between two adjacent target phases in the abnormal signal Sp may be too small, so the two rotation angles Sa obtained by the processor 104 based on the aforementioned two adjacent target phases may be similar. In other words, the difference between the two rotation angles Sa may be smaller than the normal value. In view of this, the processor 104 may determine whether the difference between the two rotation angles Sa obtained based on the two adjacent target phases is less than or equal to a preset angle value (i.e., the aforementioned normal value, for example: 10°). If the determination result shows that the difference between the aforementioned two rotation angles Sa is less than or equal to the preset angle value, the processor 104 may perform related operations (which will be described in detail in the following paragraphs) to avoid calculations based on erroneous information.

[0044] The following will be paired Figure 2 This describes the operation of the input device 10 during normal operation of the relative encoder 102. Please refer to [link / reference]. Figure 2 , Figure 2 This is a flowchart illustrating a control method 200 according to some embodiments of the present disclosure. The control method 200 may be derived from, for example... Figure 1 The input device 10 shown is used to execute the control method, but the present disclosure is not limited thereto. In some embodiments, the control method 200 includes steps S201 to S208.

[0045] In step S201, based on the target phase of at least one signal output by the relative encoder, the current angle data output by the absolute encoder is obtained. Please refer to [link / reference needed]. Figure 3 , Figure 3 This is a schematic diagram illustrating at least one signal output by a relative encoder 102 during normal operation, according to some embodiments of the present disclosure. In some embodiments, the at least one signal includes a first signal Sp1 and a second signal Sp2 that are distinct from each other. Based on a combination of the voltage levels of the first signal Sp1 and the second signal Sp2, the at least one signal includes four different phases (i.e., multiple phases of the aforementioned signal Sp), for example... Figure 3 The phases “00”, “01”, “11”, and “10” in the text. It should be understood that... Figure 3 The "0" in the value indicates a low voltage level, while Figure 3 The "1" in the figure represents a high voltage level. A combination where the voltage level of the first signal Sp1 is the same as the voltage level of the second signal Sp2 is considered the target phase Ptg, for example... Figure 3The phases “00” and “11” in the code. When at least one signal (i.e., the first signal Sp1 and the second signal Sp2) is in the target phase Ptg, the processor 104 reads the rotation angle Sa output by the absolute encoder 103 as the current angle data.

[0046] In step S202, the current position number corresponding to the current angle data is obtained based on the current angle data. In some embodiments, the processor 104 may obtain the current position number corresponding to the current angle data using the aforementioned lookup table. For example, the current angle data is 37°. The processor 104 compares the current angle data with multiple angle values ​​Va in the lookup table to find the angle value Va that is closest to the current angle data (e.g., 30°). Then, the processor 104 obtains the number (3) corresponding to the angle value Va of 30° as the current position number. For another example, the current angle data is 67.5°. The angle value Va closest to 67.5° in Table 1 may be 60° or 75°. In this case, the processor 104 also uses the judgment trend when obtaining the position numbers corresponding to the previous few angle data to determine whether the angle value Va closest to 67.5° is 60° or 75°. Assuming the previous angle data is 37°, and the processor 104 determines that the angle value Va closest to the previous angle data in Table 1 is 30°. Since the processor 104 previously selected an angle value Va that is less than the angle data output by the absolute encoder 103, the processor 104 also selects an angle value Va that is less than the current angle data (i.e., 60°) this time, and uses the number (5) corresponding to the angle value Va of 60° in Table 1 as the current position number.

[0047] In step S203, the difference between the current position number and the previous position number is calculated. It should be understood that the previous position number is the current position number previously acquired by the processor 104, and can be stored in the memory 105. For example, the current position number previously acquired by the processor 104 is number (5). The processor 104 subtracts "5" (i.e., the previous position number) from "3" (i.e., the current position number) to calculate the difference between the two positions as "-2".

[0048] In step S204, the number difference is output. In some embodiments, such as... Figure 1 As shown, the processor 104 outputs the number difference as an output signal Sout to the computer device 20 so that the computer device 20 can control the display screen 201.

[0049] like Figure 2As shown, after step S202, processor 104 further executes step S205 to correct the output error of absolute encoder 103. In step S205, an angle difference is calculated based on the current angle data and the previous angle data corresponding to the current position number. In some embodiments, the previous angle data is the angle value Va corresponding to the current position number in the lookup table. In the aforementioned example, the previous angle data is 30°. Processor 104 subtracts the previous angle data of 30° from the current angle data of 37° to calculate an angle difference of 7°.

[0050] In step S206, it is determined whether the angle difference is within the error range. In some embodiments, the error range is ±3°. Taking the aforementioned example, since a 7° angle difference is greater than 3°, the processor 104 determines that the angle difference exceeds the error range. Because the angle difference exceeds the error range, the processor 104 executes step S207.

[0051] In step S207, the previous angle data is replaced with the current angle data. In the example above, the processor 104 updates the angle value Va corresponding to the current position number (e.g., number (3)) in the lookup table from 30° (i.e., the previous angle data) to 37° (i.e., the current angle data).

[0052] In other examples, processor 104 determines that the angle difference does not exceed the error range, therefore processor 104 executes step S208. In step S208, the previous angle data is retained. For example, processor 104 does not update the angle value Va in the lookup table, so the angle value Va corresponding to the current position number (e.g., number (3)) in the lookup table remains 30° (i.e., the previous angle data). In other embodiments, step S208 is omitted. In other words, after determining that the angle difference does not exceed the error range, processor 104 may not perform any action.

[0053] As can be seen from the description of control method 200, when the relative encoder 102 is operating normally, the input device 10 can not only accurately generate the output signal Sout based on the outputs of the relative encoder 102 and the absolute encoder 103, but also correct the output error of the absolute encoder 103 based on the output of the relative encoder 102.

[0054] The following will be paired Figure 4 and Figure 5 This describes the operation of the input device 10 when the relative encoder 102 may malfunction. Please refer to [link / reference]. Figure 4 , Figure 4 This is a flowchart illustrating a control method 400 according to some embodiments of the present disclosure. The control method 400 may be derived from, for example... Figure 1The input device 10 shown is used to execute the control method, but the present disclosure is not limited thereto. In some embodiments, the control method 400 includes steps S401 to S411.

[0055] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating at least one signal output by a relative encoder 102 during abnormal operation, according to some embodiments of the present disclosure. In some embodiments, the at least one signal includes a third signal Sp3 and a fourth signal Sp4. Due to mechanical damage or dust affecting the relative encoder 102, the third signal Sp3 and the fourth signal Sp4 cannot maintain normal waveforms (e.g., ...). Figure 3 (Square wave in the middle). For example Figure 5 As shown, the fourth signal Sp4 should remain at a low voltage level near time point te, but some glitch occurs. Therefore, when performing the aforementioned step S201, the processor 104 may mistake the phase Ptge of time point te for the target phase, thereby reading the output of the absolute encoder 103 at the wrong time.

[0056] To avoid reading the output of the absolute encoder 103 at the wrong time, the processor 104 executes step S401. In step S401, based on two adjacent target phases in at least one signal output by the relative encoder, the first angle data and the second angle data output by the absolute encoder are obtained. In some embodiments, such as Figure 5 As shown, processor 104 distinguishes a correct target phase Ptg and another phase Ptge, which was mistakenly identified as the target phase due to a surge, from the third signal Sp3 and the fourth signal Sp4. Based on this, processor 104, in conjunction with... Figure 5 The target phase Ptg and phase Ptge are used to read the two rotation angles Sa output by the absolute encoder 103 as the first angle data and the second angle data.

[0057] Since the time difference between two adjacent target phases in the abnormal signals (i.e., the third signal Sp3 and the fourth signal Sp4) may be too small (which may cause the first angle data and the second angle data to be similar), the processor 104 then executes step S402. In step S402, it is determined whether the difference between the first angle data and the second angle data is less than or equal to a preset angle value. For example, the preset angle value is 10°. In some embodiments, the second angle data minus the first angle data is 8.6°, so the processor 104 determines that the difference between the first angle data and the second angle data is less than the preset angle value, and thus executes step S403. It should be understood that if the second angle data minus the first angle data is a negative value, the processor 104 may first perform an absolute value operation on the difference between the first angle data and the second angle data, and then compare the absolute value of the difference with the preset angle value.

[0058] In step S403, either the first angle data or the second angle data is used as the current angle data. In some embodiments, the processor 104 uses the second angle data as the current angle data. In other embodiments, the processor 104 uses the first angle data as the current angle data. It should be understood that the determination result in step S402 shows that the first angle data and the second angle data are similar, such that the first angle data and the second angle data may correspond to the same position number Np in the lookup table. Therefore, the processor 104 may use either the first angle data or the second angle data as the current angle data.

[0059] In step S404, the current position number corresponding to the current angle data is obtained. In step S405, the difference between the current position number and the previous position number is calculated. In step S406, the difference between the positions is output. It should be understood that the descriptions of steps S404 to S406 are the same as or similar to those of steps S202 to S204 above, and therefore will not be repeated here.

[0060] For example Figure 4 As shown, after step S404, processor 104 further executes step S407 to correct the output error of absolute encoder 103 when relative encoder 102 is not operating properly. In step S407, interpolation angle data is calculated based on the angle data corresponding to the previous and next positions of the current position number. For example, the current position number is number (4) in the lookup table. Processor 104 can find the angle corresponding to number (3) and another angle corresponding to number (5) using the lookup table shown in Table 1. Then, processor 104 can perform interpolation operations on the two angle values ​​Va corresponding to number (3) and number (5) (e.g., interpolation points are made according to equal division or curve fitting) to calculate the interpolation angle data.

[0061] In step S408, the angle difference is calculated based on the interpolated angle data and the previous angle data corresponding to the current position number. In step S409, it is determined whether the angle difference is within the error range. In step S410, the previous angle data is replaced with the interpolated angle data. In step S411, the previous angle data is retained. It should be understood that the descriptions of steps S408 to S411 are the same as or similar to those of steps S205 to S208 described above, and therefore will not be repeated here. In some embodiments, step S411 is omitted. In other words, after determining that the angle difference does not exceed the error range, the processor 104 may not perform any action.

[0062] In other embodiments, if the determination result in step S402 shows that the first angle data and the second angle data are not less than or equal to a preset angle value, then the processor may continue to execute... Figure 2 This refers to step S202 in control method 200. It should be understood that at this time, processor 104 will use the second angle data as the current angle data to perform related operations.

[0063] As can be seen from the description of control method 400, even when the relative encoder 102 is not operating normally, the input device 10 can still accurately generate the output signal Sout based on the output of the absolute encoder 103. Furthermore, compared to the operation of correcting the lookup table in control method 200 (i.e., steps S205 to S208), control method 400 determines whether to correct the lookup table based on the interpolation angle data generated in step S407 (i.e., steps S408 to S411), thereby solving the output error problem of the absolute encoder 103.

[0064] In the foregoing embodiments, as Figure 3 or Figure 5 As shown, the at least one signal output by the relative encoder 102 includes two different signals, but this disclosure is not limited thereto. In some embodiments, the at least one signal output by the relative encoder 102 includes only a square wave (e.g., a first signal Sp1 or a second signal Sp2). In other words, the at least one signal output by the relative encoder 102 may include two phases, such as phases "0" and "1". It should be understood that one of phases "0" and "1" is considered the target phase. The remaining settings and operations are the same as or similar to those in the foregoing embodiments, and therefore will not be repeated here. It is worth noting that if the relative encoder 102, which can output two signals, is damaged and one of the signals is abnormal (e.g., the first signal Sp1 is a normal square wave, while the second signal Sp2 is an abnormal signal with no voltage level change), the input device 10 of this disclosure can also operate normally based on the normal one of the two signals.

[0065] As can be seen from the above embodiments of the present disclosure, the input device 10 of the present disclosure can correct the output error of the absolute encoder 103 based on the output of the relative encoder 102 when the relative encoder 102 is operating normally, and can also generate an output signal Sout based on the output of the absolute encoder 103 when the relative encoder 102 is not operating normally. Furthermore, when the relative encoder 102 is not operating normally, the input device 10 of the present disclosure can also correct the output error of the absolute encoder 103 by calculating the interpolation angle using a lookup table. In this way, the input device 10 of the present disclosure has the advantages of a longer service life and the ability to self-calibrate after leaving the factory.

[0066] Although the present disclosure has been described above with reference to embodiments, it is not intended to limit the present disclosure. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the present disclosure. Therefore, the scope of protection of the present disclosure shall be determined by the scope defined in the appended claims.

Claims

1. A control method of an input device, characterized by, include: Based on the target phase of at least one signal output by the relative encoder, obtain the current angle data output by the absolute encoder; Based on the current angle data, obtain the current position number corresponding to the current angle data; Calculate the difference in number between the current location number and the previous location number; as well as Output the difference for this number; Obtaining the current position number corresponding to the current angle data includes: The current angle data is compared with multiple angle values ​​to find the angle value that is closest to the current angle data. as well as The current position number is one of the multiple position numbers corresponding to one of the angle values ​​that is closest to the current angle data.

2. The control method according to claim 1, characterized by, Also includes: Calculate the angle difference based on the current angle data and the previous angle data corresponding to the current position number; as well as Determine whether the angle difference is within the error range.

3. The control method according to claim 2, characterized by, Also includes: If the angle difference is within the error range, the previous angle data is retained; as well as If the angle difference is not within the error range, the previous angle data will be replaced with the current angle data.

4. The control method according to claim 1, characterized by, The at least one signal includes a first signal and a second signal different from the first signal, and the target phase is the same as the voltage level of the first signal and the voltage level of the second signal.

5. The control method according to claim 1, characterized by, The target phase is when at least one signal is at a high voltage level or a low voltage level.

6. A control method of an input device, characterized by, include: Based on two adjacent target phases in at least one signal output by the relative encoder, obtain the first angle data and the second angle data output by the absolute encoder; If the difference between the first angle data and the second angle data is less than or equal to a preset angle value, then the first angle data or the second angle data is used as the current angle data. Based on the current angle data, obtain the current position number corresponding to the current angle data; Calculate the difference in number between the current location number and the previous location number; as well as Output the difference for this number; The step of obtaining the current position number corresponding to the current angle data includes: The current angle data is compared with multiple angle values ​​to find the angle value that is closest to the current angle data. as well as The current position number is one of the multiple position numbers corresponding to one of the angle values ​​that is closest to the current angle data.

7. The control method according to claim 6, characterized by Also includes: The interpolation angle data is calculated based on the angle data corresponding to the previous and next positions of the current position. Calculate the angle difference based on the interpolated angle data and the previous angle data corresponding to the current position number; as well as Determine whether the angle difference is within the error range.

8. The control method according to claim 7, characterized by, Also includes: If the angle difference is not within the error range, the previous angle data will be replaced with interpolated angle data.

9. An input device coupled to a computer device, characterized in that, The computer device is used to display a screen, and the input device includes: The scroll wheel module is used to generate actions in response to user input; A relative encoder is used to generate at least one signal based on the movement of the roller module; An absolute encoder is used to output the rotation angle of the roller module relative to a reference position based on the movement of the roller module; and A processor, used to perform the following steps: When at least one signal is in the target phase, acquire the current angle data output by the absolute encoder; Based on the current angle data, obtain the current position number corresponding to the current angle data; Calculate the difference in number between the current location number and the previous location number; and Output the difference for this number; Obtaining the current position number corresponding to the current angle data includes: The current angle data is compared with multiple angle values ​​to find the angle value that is closest to the current angle data; and The current position number is one of the multiple position numbers corresponding to one of the angle values ​​that is closest to the current angle data.

10. The input device according to claim 9, characterized in that, The processor is also used to perform the following steps: Calculate the angle difference based on the current angle data and the previous angle data corresponding to the current position number; and If the angle difference is outside the error range, replace the previous angle data with the current angle data.

11. The input device according to claim 9, characterized in that, The at least one signal includes a first signal and a second signal different from the first signal, and the target phase is the same as the voltage level of the first signal and the voltage level of the second signal.

12. The input device according to claim 9, characterized in that, The target phase is when at least one signal is at a high voltage level or a low voltage level.

13. The input device according to claim 9, characterized in that, The input device also includes a storage unit for storing a lookup table, which includes multiple angle values ​​and multiple position numbers corresponding to those angle values. The step of obtaining the current position number corresponding to the current angle data includes: The current angle data is compared with these angle values ​​to find the angle value that is closest to the current angle data; and The current position number is one of the position numbers corresponding to the angle value that is closest to the current angle data.