Decoding circuit of incremental encoder
By designing the edge extraction circuit and counting control circuit in the incremental encoder decoding circuit, and using the clock SCLK signal to synchronously extract and process signal edges, the problem of miscounting of the incremental encoder under interference is solved and the anti-interference ability is improved. and accuracy of position accumulation.
Patent Information
- Application Number
- CN202420449422.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-08
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2034-03-08
AI Technical Summary
When there is interference, the existing incremental encoder decoding circuit can easily mistake the interference signal for a valid signal for counting, resulting in position accumulation errors.
An incremental encoder decoding circuit including an edge extraction circuit, a counting control circuit and an increment and decrement counter is designed. By extracting the rising and falling edges of the A signal and B signal, and counting increases and decreases according to the UP signal and DOWN signal, The clock SCLK signal is used for synchronization to eliminate interference signals.
It effectively prevents interference signals from being miscounted, improves anti-interference capabilities, and ensures the accuracy of position accumulation.
Smart Images

Figure CN221886475U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of decoding circuits, in particular to an incremental encoder decoding circuit. Background Art
[0002] Most of the existing incremental encoder decoding circuits use separate recognition of rotation direction and independent pulse counting circuits. In the case of interference, the above incremental encoder decoding circuits will count the interference signal as a valid signal, resulting in errors in position accumulation.
[0003] Therefore, it is necessary to propose an incremental encoder decoding circuit with anti-interference ability. Utility Model Content
[0004] The utility model aims to provide an incremental encoder decoding circuit, which has anti-interference capability and avoids counting interference signals as valid signals, thereby causing errors in position accumulation.
[0005] To achieve the above-mentioned purpose, the utility model adopts an incremental encoder decoding circuit, including an edge extraction circuit, a counting control circuit, an up-down counter and a clock SCLK, wherein the edge extraction circuit is connected to the counting control circuit, the up-down counter is connected to the counting control circuit, and the edge extraction circuit, the counting control circuit and the up-down counter are respectively provided with the clock SCLK;
[0006] The clock SCLK is used to receive an SCLK signal;
[0007] The edge extraction circuit is used to extract the rising edge and falling edge of the A signal and the rising edge and falling edge of the B signal, and synchronize the clock SCLK;
[0008] The counting control circuit is used to control the generation of UP signal and DOWN signal;
[0009] The up-down counter is used to receive the SCLK signal and count up and down according to the UP signal and the DOWN signal.
[0010] The edge extraction circuit includes an edge extraction chip U1, an edge extraction chip U2, a first NOT gate circuit, a second NOT gate circuit and a first AND gate circuit.
[0011] The first NOT gate circuit is connected to the edge extraction chip U1 and the first AND gate circuit respectively, the edge extraction chip U2 is connected to the first AND gate circuit, and the edge extraction chip U2 is connected to the counting control circuit.
[0012] The first AND gate circuit is connected to the edge extraction chip U1, the edge extraction chip U2 and the second NOT gate circuit respectively, and the edge extraction chip U2 is connected to the counting control circuit.
[0013] Among them, the counting control circuit includes a third NOT gate circuit, a fourth NOT gate circuit, a third AND gate circuit, a fourth AND gate circuit, a fifth AND gate circuit, a sixth AND gate circuit, an OR gate circuit and a counting chip U3, the third NOT gate circuit is connected to the third AND gate circuit, the fourth NOT gate circuit is connected to the sixth AND gate circuit, the third AND gate circuit, the fourth AND gate circuit, the fifth AND gate circuit and the sixth AND gate circuit are respectively connected to the OR gate circuit, and the counting chip U3 is connected to the up-down counter.
[0014] The utility model discloses an incremental encoder decoding circuit, which is used for receiving SCLK signal through the clock SCLK; the edge extraction circuit is used for extracting the rising edge and falling edge of A signal and the rising edge and falling edge of B signal, and synchronizing the clock SCLK; the counting control circuit is used for controlling the generation of UP signal and DOWN signal, so as to realize interference elimination; the up-down counter is used for receiving SCLK signal, and counts up and down according to UP signal and DOWN signal, so as to realize anti-interference capability, avoid counting the interference signal as the effective signal, and cause the error of position accumulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the utility model or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the utility model. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 The utility model is a circuit principle diagram of an incremental encoder decoding circuit.
[0017] Figure 2 It is a circuit principle diagram of the edge extraction circuit of the utility model in the state of detecting the rising edge of the A signal.
[0018] Figure 3 It is a waveform diagram of the utility model in the detection A signal rising edge state.
[0019] Figure 4 It is a circuit principle diagram of the edge extraction circuit of the utility model for detecting the falling edge state of the A signal.
[0020] Figure 5It is a waveform diagram of the utility model in the detection A signal falling edge state.
[0021] Figure 6 It is a logic circuit diagram of the UP signal of the utility model.
[0022] Figure 7 It is a logic circuit diagram of the DOWN signal of the utility model.
[0023] 10-edge extraction circuit, 11-first NOT gate circuit, 12-second NOT gate circuit, 13-first AND gate circuit, 20-counting control circuit, 21-third NOT gate circuit, 22-fourth NOT gate circuit, 23-third AND gate circuit, 24-fourth AND gate circuit, 25-fifth AND gate circuit, 26-sixth AND gate circuit, 27-OR gate circuit, 30-incremental and decremental counter, 40-clock SCLK. DETAILED DESCRIPTION
[0024] See also Figure 1 to Figure 7 ,in Figure 1 This is the circuit schematic diagram of the incremental encoder decoding circuit. Figure 2 is a circuit schematic diagram of the edge extraction circuit for detecting the rising edge of the A signal. Figure 3 This is the waveform diagram of the rising edge of the A signal. Figure 4 : is a circuit schematic diagram of the edge extraction circuit for detecting the falling edge state of the A signal. Figure 5 This is the waveform diagram of the falling edge of the A signal. Figure 6 This is the logic circuit diagram of the UP signal. Figure 7 This is the logic circuit diagram of the DOWN signal.
[0025] The utility model provides an incremental encoder decoding circuit: comprising an edge extraction circuit 10, a counting control circuit 20, an up-down counter 30 and a clock SCLK40, wherein the edge extraction circuit 10 is connected to the counting control circuit 20, the up-down counter 30 is connected to the counting control circuit 20, and the edge extraction circuit 10, the counting control circuit 20 and the up-down counter 30 are respectively provided with the clock SCLK40;
[0026] The clock SCLK40 is used to receive the SCLK signal;
[0027] The edge extraction circuit 10 is used to extract the rising edge and falling edge of the A signal and the rising edge and falling edge of the B signal, and synchronize the clock SCLK40;
[0028] The counting control circuit 20 is used to control the generation of UP signal and DOWN signal;
[0029] The up-down counter 30 is used to receive the SCLK signal and count up and down according to the UP signal and the DOWN signal.
[0030] In this specific embodiment, the clock SCLK40 receives the SCLK signal; the edge extraction circuit 10 extracts the rising edge and falling edge of the A signal and the rising edge and falling edge of the B signal, and synchronizes the clock SCLK40; the counting control circuit 20 controls the generation of the UP signal and the DOWN signal to achieve interference elimination; the up-down counter 30 receives the SCLK signal, and counts up and down according to the UP signal and the DOWN signal, thereby achieving anti-interference capability and avoiding counting interference signals as valid signals, which causes errors in position accumulation.
[0031] Furthermore, the edge extraction circuit 10 includes an edge extraction chip U1 , an edge extraction chip U2 , a first NOT gate circuit 11 , a second NOT gate circuit 12 and a first AND gate circuit 13 .
[0032] In this specific embodiment, the edge extraction circuit 10 is used to extract the rising edge and falling edge of the A signal and the rising edge and falling edge of the B signal; when extracting the rising edge of the A signal and the rising edge of the B signal, the edge extraction chip U1, the edge extraction chip U2, the first NOT gate circuit 11 and the first AND gate circuit 13 are used; when extracting the falling rising edge of the A signal and the falling rising edge of the B signal, the edge extraction chip U1, the edge extraction chip U2, the second NOT gate circuit 12 and the first AND gate circuit 13 are used.
[0033] Further, the first NOT gate circuit 11 is connected to the edge extraction chip U1 and the first AND gate circuit 13 respectively, the edge extraction chip U2 is connected to the first AND gate circuit 13 , and the edge extraction chip U2 is connected to the counting control circuit 20 .
[0034] In this specific implementation, when extracting the rising edge of the A signal and the rising edge of the B signal, as shown in FIG. Figure 2 and Figure 3 As shown, Figure 2 The circuit schematic diagram of the edge extraction circuit 10 for detecting the rising edge of the A signal is as follows: Figure 3 In order to detect the waveform of the A signal in the rising edge state (the detection of the B signal is the same), the edge extraction chip U1, the edge extraction chip U2, the first NOT gate circuit 11 and the first AND gate circuit 13 are used.
[0035] Furthermore, the first AND gate circuit 13 is connected to the edge extraction chip U1 , the edge extraction chip U2 , and the second NOT gate circuit 12 , respectively, and the edge extraction chip U2 is connected to the counting control circuit 20 .
[0036] In this specific implementation, when extracting the falling edge of the A signal and the falling edge of the B signal, as shown in FIG. Figure 4 and Figure 5 As shown, Figure 4 The circuit schematic diagram of the edge extraction circuit 10 for detecting the falling edge of the A signal is as follows: Figure 5 In order to detect the waveform of the falling edge of the A signal (the detection of the B signal is the same), the edge extraction chip U1, the edge extraction chip U2, the second NOT gate circuit 12 and the first AND gate circuit 13 are used.
[0037] Furthermore, the counting control circuit 20 includes a third NOT gate circuit 21, a fourth NOT gate circuit 22, a third AND gate circuit 23, a fourth AND gate circuit 24, a fifth AND gate circuit 25, a sixth AND gate circuit 26, an OR gate circuit 27 and a counting chip U3, the third NOT gate circuit 21 is connected to the third AND gate circuit 23, the fourth NOT gate circuit 22 is connected to the sixth AND gate circuit 26, the third AND gate circuit 23, the fourth AND gate circuit 24, the fifth AND gate circuit 25 and the sixth AND gate circuit 26 are respectively connected to the OR gate circuit 27, and the counting chip U3 is connected to the up-down counter 30.
[0038] In this specific embodiment, Figure 6 and Figure 7 As shown, Figure 6 This is the logic circuit diagram of the UP signal. Figure 7 The logic circuit diagram of the DOWN signal adopts the third NOT gate circuit 21, the fourth NOT gate circuit 22, the third AND gate circuit 23, the fourth AND gate circuit 24, the fifth AND gate circuit 25, the sixth AND gate circuit 26, the OR gate circuit 27 and the counting chip U3, and the counting chip U3 is connected to the up-down counter; when the UP signal is high, the count increases with each rising edge of the SCLK signal. When the DOWN signal is high, the count decreases with each rising edge of the SCLK signal.
[0039] The above disclosure is only a preferred embodiment of the present invention, and certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope covered by the utility model.
Claims
1. An incremental encoder decoding circuit, characterized in that: It includes an edge extraction circuit, a counting control circuit, an up-down counter and a clock SCLK, wherein the edge extraction circuit is connected to the counting control circuit, the up-down counter is connected to the counting control circuit, and the edge extraction circuit, the counting control circuit and the up-down counter are respectively provided with the clock SCLK; The clock SCLK is used to receive an SCLK signal; The edge extraction circuit is used to extract the rising edge and falling edge of the A signal and the rising edge and falling edge of the B signal, and synchronize the clock SCLK; The counting control circuit is used to control the generation of UP signal and DOWN signal; The up-down counter is used to receive the SCLK signal and count up and down according to the UP signal and the DOWN signal.
2. The incremental encoder decoding circuit according to claim 1, characterized in that: The edge extraction circuit includes an edge extraction chip U1, an edge extraction chip U2, a first NOT gate circuit, a second NOT gate circuit and a first AND gate circuit.
3. The incremental encoder decoding circuit as claimed in claim 2, characterized in that: The first NOT gate circuit is connected to the edge extraction chip U1 and the first AND gate circuit respectively, the edge extraction chip U2 is connected to the first AND gate circuit, and the edge extraction chip U2 is connected to the counting control circuit.
4. The incremental encoder decoding circuit as claimed in claim 2, characterized in that: The first AND gate circuit is connected to the edge extraction chip U1, the edge extraction chip U2 and the second NOT gate circuit respectively, and the edge extraction chip U2 is connected to the counting control circuit.
5. The incremental encoder decoding circuit according to claim 1, characterized in that: The counting control circuit includes a third NOT gate circuit, a fourth NOT gate circuit, a third AND gate circuit, a fourth AND gate circuit, a fifth AND gate circuit, a sixth AND gate circuit, an OR gate circuit and a counting chip U3, the third NOT gate circuit is connected to the third AND gate circuit, the fourth NOT gate circuit is connected to the sixth AND gate circuit, the third AND gate circuit, the fourth AND gate circuit, the fifth AND gate circuit and the sixth AND gate circuit are respectively connected to the OR gate circuit, and the counting chip U3 is connected to the up-down counter.
