Method for identifying a rotary encoder output signal, detection circuit and identification system
By constructing a resistor network connected to the rotary encoder, and using the analog input channel to acquire the voltage signal and perform sampling, quantization, and decoding, multiple rotary encoders can output a single analog signal. This solves the problem of insufficient microcontroller input pins when there are many rotary encoders, simplifies circuit design, and reduces system cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2026-03-17
AI Technical Summary
In the field of test and measurement, when there are many rotary encoders, the microcontroller input pins are insufficient, which leads to an increase in system cost.
By constructing a resistor network and connecting it to a rotary encoder, the voltage signal is obtained through the analog input channel, and then sampled, quantized, and decoded to realize that multiple rotary encoders output as one analog signal.
This solves the problem of insufficient input pins for microcontrollers, simplifies circuit complexity, and reduces system cost.
Smart Images

Figure CN115727877B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of test and measurement, specifically to a method, detection circuit, and identification system for identifying the output signal of a rotary encoder. Background Technology
[0002] A rotary encoder is a human-machine interface input device, generally used in the field of test and measurement. On professional monitors, it is often used as a knob for menu adjustments, such as brightness and contrast. A rotary encoder requires at least two input pins for the controller; models with buttons require a third input pin.
[0003] When there are two rotary encoders, six input pins are required, and so on. When there are more encoders in the system, there may be a shortage of I / O ports on the controller. In this case, it is generally necessary to replace the controller with a model that has more I / O resources, and the system cost will increase accordingly. Summary of the Invention
[0004] To address one of the aforementioned technical deficiencies, this application provides a method, detection circuit, and identification system for recognizing the output signal of a rotary encoder.
[0005] According to a first aspect of the embodiments of this application, a method for identifying the output signal of a rotary encoder is provided, comprising:
[0006] The voltage signal of the resistor network is obtained based on one analog input channel, wherein the resistor network is connected to at least one rotary encoder and is used to encode the output signal of the rotary encoder to output a corresponding voltage signal.
[0007] The voltage signal is sampled, quantized, and decoded to determine the output signal of the rotary encoder.
[0008] As one embodiment, the sampling, quantization, and decoding of the voltage signal to determine the output signal of the rotary encoder includes:
[0009] Preprocess the voltage signal;
[0010] Based on the preset correspondence between the output signal of the rotary encoder and the output voltage signal of the resistor network, the preprocessed voltage signal is sampled, quantized, and decoded to determine the output signal of the rotary encoder.
[0011] According to a second aspect of the embodiments of this application, a detection circuit for the output signal of a rotary encoder is provided, comprising:
[0012] A resistor network, connected to the output pin of at least one rotary encoder, is used to generate the corresponding voltage signal based on the output signal of the rotary encoder.
[0013] As one embodiment, the resistor network includes at least one resistor network unit, and one resistor network unit is connected to a rotary encoder.
[0014] As an example, the source terminals of each resistor network unit are all connected to the same power supply terminal; the output terminals of each resistor network unit are connected to a common ground terminal and the output terminal after being connected in series with a resistor.
[0015] As one embodiment, the resistor network unit includes:
[0016] A first resistor and a second resistor are connected in series; the first resistor is also connected to a common power supply terminal; the second resistor and a ninth resistor are connected in series to a common ground terminal.
[0017] The third resistor and the fourth resistor are connected in series; the third resistor is also connected to a common power supply terminal; the fourth resistor is connected in series with the eighth resistor and then connected to the common terminal of the ninth resistor and the second resistor.
[0018] The fifth resistor and the sixth resistor are connected in series; the fifth resistor is also connected to a common power supply terminal; the sixth resistor and the seventh resistor are connected in series and then connected to the common terminal of the fourth resistor and the eighth resistor; the sixth resistor also serves as the output terminal of the resistor network unit.
[0019] The first output pin of the rotary encoder is connected to the common terminal of the first resistor and the second resistor, the second output pin of the rotary encoder is connected to the common terminal of the third resistor and the fourth resistor, and the third output terminal of the rotary encoder is grounded.
[0020] As an example, when the rotary encoder has a button, one contact of the button is connected to the common terminal of the fifth resistor and the sixth resistor, and the other contact is grounded.
[0021] As an example, when the number of resistor network units is at least two, the ninth resistor in the secondary resistor network unit is connected to the common terminal of the sixth and seventh resistors in the primary resistor network unit.
[0022] As one embodiment, the resistor network unit further includes:
[0023] The positive terminal of the first capacitor is connected to the common terminal of the first and second resistors, and the other terminal is grounded.
[0024] Two second capacitors are connected. The positive terminal of one second capacitor is connected to the common terminal of the third and fourth resistors, and the negative terminal is grounded. The positive terminal of the other second capacitor is connected to the common terminal of the fifth and sixth resistors, and the negative terminal is grounded.
[0025] According to a third aspect of the embodiments of this application, a system for identifying the output signal of a rotary encoder is provided, comprising:
[0026] The detection circuit;
[0027] The processing unit is used to execute the identification method of the rotary encoder output signal; the processing unit is connected to the detection circuit through an analog input channel.
[0028] The rotary encoder output signal identification method, detection circuit, and identification system provided in this application embodiment, by constructing a resistor network and connecting the resistor network to at least one rotary encoder, encodes the output signal of the rotary encoder to output a corresponding voltage signal, can output the output signals of multiple rotary encoders as one analog signal, thereby solving the problem of insufficient microcontroller input pins when there are many rotary encoders in the circuit control system. Attached Figure Description
[0029] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0030] Figure 1 A flowchart illustrating a method for identifying the output signal of a rotary encoder provided in an embodiment of this application;
[0031] Figure 2 This is a schematic diagram of the A and B output combinations of a rotary encoder;
[0032] Figure 3 Provided for the embodiments of this application Figure 1 A flowchart illustrating step S120;
[0033] Figure 4 A schematic block diagram of a detection circuit for the output signal of a rotary encoder provided in an embodiment of this application;
[0034] Figure 5 This is one of the circuit schematics of the resistor network unit provided in the embodiments of this application;
[0035] Figure 6 The second circuit schematic diagram of the resistor network unit provided in the embodiments of this application;
[0036] Figure 7The third circuit schematic diagram of the resistor network unit provided in the embodiments of this application;
[0037] Figure 8 for Figure 7 Simplified equivalent circuit schematic;
[0038] Figure 9 The equivalent circuit schematic for the VE2 component is shown below.
[0039] Figure 10 Here is a final equivalent circuit schematic for the VE2 component;
[0040] Figure 11 Here is another final equivalent circuit schematic for the VE2 component;
[0041] Figure 12 This is a final equivalent circuit schematic for the VB2 component;
[0042] Figure 13 This is another final equivalent circuit schematic for the VB2 component;
[0043] Figure 14 This is a final equivalent circuit schematic for the VA2 component;
[0044] Figure 15 This is another final equivalent circuit schematic for the VA2 component. Detailed Implementation
[0045] To make the technical solutions and advantages of the embodiments of this application clearer, the exemplary embodiments of this application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not an exhaustive list of all embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0046] A typical rotary encoder with an independent button has three pins (A, B, and C) on the encoder part and two pins (D and E) on the button part. C is the common ground pin, and A and B are two contact pins.
[0047] The encoder internally contains a slotted disk connected to a common ground pin C and two contact pins A and B. When the knob is rotated, pins A and B contact the common ground pin C in a specific order, depending on the direction of rotation. A signal is generated upon contact with the common ground. When one pin contacts the other before the other, these signals are staggered by 90°. This is called quadrature encoding. Rotating the knob clockwise connects pin A first, then pin B. Rotating the knob counter-clockwise connects pin B first, then pin A. During rotation, a series of pulses is simultaneously output from pins A and B. The direction of encoder rotation can be determined from the phase relationship of these two pulses. A common method is to delay one pulse by one step and then XOR the two pulses.
[0048] When rotating clockwise, A's output is 00110011, and B's output is 10011001. After delaying A by one step, it also becomes 10011001. Then, XORing it with B yields 00000000. When rotating counterclockwise, A's output is 10011001, and B's output is 00110011. After delaying A by one step, it becomes 11001100. XORing it yields 11111111.
[0049] After the MCU reads and makes a judgment, it executes the corresponding operation based on the current position and relative step size, such as increasing or decreasing brightness or volume. The independent buttons D and E are similar to ordinary push-button switches and are generally used for function selection.
[0050] When there are two rotary encoders, six input pins are required, and so on. When there are more encoders in the system, there may be a shortage of I / O ports on the controller. In this case, it is generally necessary to replace the controller with a model that has more I / O resources, and the system cost will increase accordingly.
[0051] To solve the above problems, the following will combine... Figures 1-3 The method, detection circuit, and identification system for identifying the output signal of the rotary encoder provided in this application are described in detail.
[0052] Figure 1 A flowchart illustrating a method for identifying the output signal of a rotary encoder provided in this application embodiment; see reference. Figure 1 This application provides a method for identifying the output signal of a rotary encoder, including but not limited to the following steps:
[0053] S110, acquire the voltage signal of the resistor network based on one analog input channel, wherein the resistor network is connected to at least one rotary encoder and is used to encode the output signal of the rotary encoder to output the corresponding voltage signal;
[0054] S120, the voltage signal is sampled, quantized, and decoded to determine the output signal of the rotary encoder.
[0055] Optional, such as Figure 2 As shown, the A and B output signals of the rotary encoder can be considered together as a 2-bit parallel bus, with four possible output combinations: 0x00, 0x01, 0x10, and 0x11. This multi-bit binary value can be converted into an analog voltage signal, effectively functioning as a digital-to-analog converter.
[0056] The output of combination A and B has four possibilities. The order in which the values appear is fixed regardless of the rotation direction: clockwise 2→0→1→3, counterclockwise 3→1→0→2.
[0057] In this embodiment, a resistor network is constructed to encode the output signal of the rotary encoder to output a corresponding analog voltage signal. Then, the analog voltage signal is sampled, quantized, and decoded to determine the value of the AB pin of the rotary encoder.
[0058] It is understood that this application constructs a resistor network, which is connected to at least one rotary encoder, and encodes the output signal of the rotary encoder to output a corresponding voltage signal. This allows the output signals of multiple rotary encoders to be output as a single analog signal, thereby solving the problem of insufficient input pins for the microcontroller when there are many rotary encoders in the circuit control system.
[0059] Figure 3 Provided for the embodiments of this application Figure 1 A flowchart of step S120 is shown below; refer to Figure 3 In a preferred embodiment, the step of sampling, quantizing, and decoding the voltage signal to determine the output signal of the rotary encoder includes:
[0060] S310, preprocess the voltage signal;
[0061] S320, based on the preset correspondence between the output signal of the rotary encoder and the output voltage signal of the resistor network, the preprocessed voltage signal is sampled, quantized, and decoded to determine the output signal of the rotary encoder.
[0062] Optionally, in step S310, preprocessing the voltage signal includes amplifying, filtering, and level conversion of the voltage signal.
[0063] Optionally, in step S320, the output signal of the rotary encoder has only two forms: closed and open, presenting as zero voltage or the corresponding high level.
[0064] Optionally, the preset correspondence between the output signal of the rotary encoder and the output voltage signal of the resistor network is the influence of the output signal of the rotary encoder on the output voltage signal of the resistor network. By simplifying the circuit structure of the resistor network, the correspondence between the output voltage signals of the resistor network corresponding to different combinations of the output signal of the rotary encoder can be determined. After obtaining the voltage signal output by the resistor network, the output signal of the rotary encoder can be determined.
[0065] It is understood that this application provides a technical solution for sampling, quantizing, and decoding voltage signals to determine the output signal of a rotary encoder. By establishing a preset correspondence between the output signal of the rotary encoder and the output voltage signal of the resistor network, the output signal of the rotary encoder can be determined. Based on the characteristics and basic circuit principles of the rotary encoder, a simple signal connection and acquisition method is constructed, which solves the problem of insufficient input pins of the microcontroller when there are many rotary encoders in the circuit control system. This method saves on the types of components, reduces circuit costs, and simplifies circuit complexity.
[0066] The detection circuit for the output signal of the rotary encoder provided by the present invention will be described below. The detection circuit for the output signal of the rotary encoder described below and the identification method for the output signal of the rotary encoder described above can be referred to in correspondence.
[0067] Figure 4 A schematic block diagram of a detection circuit for the output signal of a rotary encoder provided in an embodiment of this application is shown below. Figure 4 This application provides a detection circuit for the output signal of a rotary encoder, comprising:
[0068] A resistor network 410 is connected to the output pin of at least one rotary encoder for generating the corresponding voltage signal based on the output signal of the rotary encoder.
[0069] It is understood that, by constructing a resistor network and connecting it to at least one rotary encoder, the output signals of the rotary encoders are encoded to output corresponding voltage signals. This allows the output signals of multiple rotary encoders to be output as a single analog signal, thus solving the problem of insufficient input pins for the microcontroller when there are many rotary encoders in the circuit control system.
[0070] As one embodiment, the resistor network includes at least one resistor network unit, and one resistor network unit is connected to a rotary encoder.
[0071] Optionally, each resistor network unit has the same structure.
[0072] It is understandable that this application sets a resistor network unit to correspond to a rotary encoder, and the number of resistor network units can be adjusted according to the number of rotary encoders, which is simple, quick and easy to expand.
[0073] As an example, the source terminals of each resistor network unit are all connected to the same power supply terminal; the output terminals of each resistor network unit are connected to a common ground terminal and the output terminal after being connected in series with a resistor.
[0074] It is understandable that connecting all resistor network units to the same power supply terminal simplifies the resistor network unit and makes it easier to determine the relationship between the resistor network output voltage and the rotary encoder output signal.
[0075] Figure 5 This is one of the circuit schematics of the resistor network unit provided in the embodiments of this application, referred to... Figure 5 As one embodiment, the resistor network unit includes:
[0076] A first resistor and a second resistor are connected in series; the first resistor is also connected to a common power supply terminal; the second resistor and a ninth resistor are connected in series to a common ground terminal.
[0077] The third resistor and the fourth resistor are connected in series; the third resistor is also connected to a common power supply terminal; the fourth resistor is connected in series with the eighth resistor and then connected to the common terminal of the ninth resistor and the second resistor.
[0078] The fifth resistor and the sixth resistor are connected in series; the fifth resistor is also connected to a common power supply terminal; the sixth resistor and the seventh resistor are connected in series and then connected to the common terminal of the fourth resistor and the eighth resistor; the sixth resistor also serves as the output terminal of the resistor network unit.
[0079] The first output pin of the rotary encoder is connected to the common terminal of the first resistor and the second resistor, the second output pin of the rotary encoder is connected to the common terminal of the third resistor and the fourth resistor, and the third output terminal of the rotary encoder is grounded.
[0080] Optionally, Rp is a pull-up resistor, and R and 2R represent the resistance values. When selecting R and 2R, it's important to ensure they are sufficiently large relative to Rp. For example, if Rp is 1kΩ and R is 100kΩ, then 2R would be 200kΩ; otherwise, the voltage division ratio will be unbalanced. This circuit generates four different voltage signals, which are sampled, quantized, and decoded by the controller's ADC to obtain the values for pins "A" and "B".
[0081] It is understandable that this application uses a simple resistor network to achieve the digital-to-analog conversion of the A and B outputs of the rotary encoder. This method only uses two resistor values, R and 2R. A two-pin rotary encoder only needs four resistors, and the structure of the resistor network unit is simple.
[0082] Figure 6 The second circuit schematic diagram of the resistor network unit provided in the embodiments of this application is shown below. Figure 6 As an example, when the rotary encoder has a button, one contact of the button is connected to the common terminal of the fifth resistor and the sixth resistor, and the other contact is grounded.
[0083] Understandably, a typical rotary encoder also has a push button, but for the resistor network unit mentioned above, only two resistors need to be added to detect the output signal of the rotary encoder on both pins.
[0084] Figure 7 The third circuit schematic diagram of the resistor network unit provided in the embodiments of this application is shown below. Figure 7 As an example, when the number of resistor network units is at least two, the ninth resistor in the secondary resistor network unit is connected to the common terminal of the sixth and seventh resistors in the primary resistor network unit.
[0085] Understandably, each additional rotary encoder adds three sets of R-2R resistor networks. Two encoders with buttons form a 6-bit DAC. When the microcontroller's ADC input port has 10-bit precision, it can easily decode the signal into an analog signal and distinguish it.
[0086] As an example, refer to Figure 7 The resistor network unit further includes:
[0087] The positive terminal of the first capacitor is connected to the common terminal of the first and second resistors, and the other terminal is grounded.
[0088] Two second capacitors are connected. The positive terminal of one second capacitor is connected to the common terminal of the third and fourth resistors, and the negative terminal is grounded. The positive terminal of the other second capacitor is connected to the common terminal of the fifth and sixth resistors, and the negative terminal is grounded.
[0089] Understandably, in actual operation, considering button bounce and encoder sliding noise, a capacitor needs to be added to each contact point in the actual circuit to filter out noise.
[0090] The following explains the preset correspondence between the output signal of the rotary encoder and the output voltage signal of the resistor network.
[0091] Figure 7The circuit diagram shown can be simplified to Figure 8 The circuit diagram shown is illustrated. VA1, VB1, VE1, VA2, VB2, and VE2 represent the voltages of the pins of the two rotary encoders, and each pin has only two states: closed and open, with a voltage of 0 or a corresponding high level.
[0092] Simplifying the approach based on the DAC, we can use the superposition principle of circuits and Thevenin's theorem to perform circuit equivalence, calculate the input and output of each bit separately, and then add all the results together to calculate the final output of the ADC.
[0093] Specifically, when Thevenin's theorem simplifies circuits, voltage sources are treated as short circuits, and current sources are treated as open circuits. Furthermore, all one-port networks (two-terminal networks) can be equivalent to a one-port network consisting of a voltage source and a resistor in series. The voltage of the voltage source is equal to the voltage of the one-port network when the load is open, and the resistor is the equivalent resistance of all independent sources within the network after setting them to zero.
[0094] The idea behind the superposition principle is that when many inputs affect one output, the influence of each input can be analyzed individually, and all results can be superimposed. In order to determine the role of each independent source, all other power sources must be "off" (set to zero), which is the short circuit of voltage sources and the open circuit of current sources according to Thevenin's theorem.
[0095] therefore:
[0096] 1. For the VE2 component, the equivalent circuit is as follows: Figure 9 As shown.
[0097] From left to right, two 2R resistors are connected in parallel to obtain R, which is then connected in parallel with the series-connected R and the next stage's 2R, and so on, ultimately resulting in an equivalent structure. Figure 10 The effect of VE2 on Vout is only 0 and VE2 / 2.
[0098] Ultimately, this is equivalent to a voltage source of VE² / 2 connected in series with a resistor network of R, such as... Figure 11 As shown.
[0099] 2. Next, analyzing the other components, we can see from the above that regardless of the number of preceding bits, the output of the last bit can be equivalent to the voltage source and resistor network described above, with an output of 0 or half the voltage at that point. Therefore, for point VB2, the final equivalent circuit is: Figure 12 The circuit diagram shown has an output component of 0 or VB2 / 4, such as... Figure 13 As shown.
[0100] 3. Following the above pattern, such as Figure 14 and Figure 15As shown, for each bit further away from the final output, the impact on the final output is 1 / 2n-1, where n represents the nth position of the resistor network from the final output.
[0101] Therefore, the final output Vout = VA1 / 64 + VB1 / 32 + VE1 / 16 + VA2 / 8 + VB2 / 4 + VE2 / 2, which represents the preset correspondence between the output signal of the rotary encoder and the output voltage signal of the resistor network. Each bit participates in the final output, exerting its effective bit weight, resulting in a total of 64 output variations.
[0102] In practical applications, the voltage level at the corresponding position will become 0 only when a button is pressed or a knob is turned, which will affect the overall voltage level output to the controller. The controller can then determine which button is active and respond accordingly based on the actual design.
[0103] The rotary encoder output signal identification system provided by the present invention will be described below. The rotary encoder output signal identification system described below can be referred to in correspondence with the rotary encoder output signal identification method and detection circuit described above.
[0104] This application provides a system for identifying the output signal of a rotary encoder, comprising:
[0105] Detection circuit;
[0106] The processing unit is used to execute the identification method of the rotary encoder output signal; the processing unit is connected to the detection circuit through an analog input channel.
[0107] The rotary encoder output signal identification method, detection circuit, and identification system provided in this application embodiment, by constructing a resistor network and connecting the resistor network to at least one rotary encoder, encodes the output signal of the rotary encoder to output a corresponding voltage signal, can output the output signals of multiple rotary encoders as one analog signal, thereby solving the problem of insufficient microcontroller input pins when there are many rotary encoders in the circuit control system.
[0108] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0110] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0111] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", 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 this application 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 this application.
[0112] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0113] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection, an electrical connection, or a connection that allows communication between them; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0114] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0115] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method of identifying a rotary encoder output signal, characterized by, The application comprises: The voltage signal of the resistance network is obtained based on an analog input channel, and the resistance network unit comprises: a first resistance and a second resistance connected in series; the first resistance is also connected to a common power supply end; the second resistance is connected to a common ground end after being connected in series with a ninth resistance; a third resistance and a fourth resistance connected in series; the third resistance is also connected to a common power supply end; the fourth resistance is connected to the common end of the ninth resistance and the second resistance after being connected in series with an eighth resistance; a fifth resistance and a sixth resistance connected in series; the fifth resistance is also connected to a common power supply end; the sixth resistance is connected to the common end of the fourth resistance and the eighth resistance after being connected in series with a seventh resistance; the sixth resistance also serves as the output end of the resistance network unit; the first output pin of the rotary encoder is connected to the common end of the first resistance and the second resistance, the second output pin of the rotary encoder is connected to the common end of the third resistance and the fourth resistance, and the third output end of the rotary encoder is grounded; wherein the resistance network is connected with at least two rotary encoders, the resistance network comprises at least two resistance network units, and one resistance network unit is connected with one rotary encoder, wherein the ninth resistance in the secondary resistance network unit is connected to the common end of the sixth resistance and the seventh resistance in the primary resistance network unit, and the resistance network is used for encoding the output signal of the rotary encoder to output the corresponding voltage signal; The voltage signal is sampled, quantized and decoded to determine the output signal of the rotary encoder.
2. The method of identifying a rotary encoder output signal according to claim 1, wherein, The voltage signal is sampled, quantized and decoded to determine the output signal of the rotary encoder, comprising: The voltage signal is preprocessed; The preprocessed voltage signal is sampled, quantized and decoded according to the preset corresponding relationship between the output signal of the rotary encoder and the voltage signal output by the resistance network to determine the output signal of the rotary encoder.
3. A detection circuit for the output signal of a rotary encoder applying the method of claim 1 or 2, characterized in that The application comprises: The resistance network is connected with the output pin of at least one rotary encoder, and is used for generating the corresponding voltage signal according to the output signal of the rotary encoder.
4. The detection circuit of a rotary encoder output signal according to claim 3, characterized in that, The resistance network comprises at least one resistance network unit, and one resistance network unit is connected with one rotary encoder.
5. The detection circuit of a rotary encoder output signal according to claim 4, characterized in that, The source end of each resistance network unit is connected to the same power supply end; the output end of each resistance network unit is connected to the common ground end and the output end after being connected in series with a resistance.
6. The detection circuit of a rotary encoder output signal according to claim 5, characterized in that, When the rotary encoder has a key, one contact of the key is connected to the common end of the fifth resistance and the sixth resistance, and the other contact is grounded.
7. The detection circuit of a rotary encoder output signal according to claim 6, characterized in that, The resistance network unit further comprises: A first capacitor, whose positive electrode is connected to the common end of the first resistance and the second resistance, and the other end is grounded; Two second capacitors, wherein the positive electrode of one second capacitor is connected to the common end of the third resistance and the fourth resistance, and the negative electrode is grounded; the positive electrode of the other second capacitor is connected to the common end of the fifth resistance and the sixth resistance, and the negative electrode is grounded.
8. A system for identifying a rotary encoder output signal, characterized by The application comprises: The detection circuit of any one of claims 3-7; The processing unit is used for executing the identification method of claim 1 or 2. The processing unit is connected with the detection circuit through an analog input channel.
Citation Information
Patent Citations
Portable engine rotating speed signal simulation generator
CN204302698U
Input device and electronic apparatus
JP2010217108A