Filter circuit
The filter circuit addresses noise interference in rotary encoders by using D-type flip-flop circuits and adaptive circuit configurations to remove noise, ensuring clean output signals.
Patent Information
- Application Number
- JP2023024182
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-02-20
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Noise generated near drive systems like motors interferes with the input signal of rotary encoders, leading to noise contamination in the output signal.
A filter circuit utilizing D-type flip-flop circuits, AND and OR circuits, and a selection circuit to remove noise, with a determining circuit to adjust the number of functioning flip-flop circuits based on noise detection.
Effectively removes noise from input signals, ensuring clean output signals for rotary encoders by dynamically adjusting the number of flip-flop circuits based on noise presence.
Smart Images

Figure 2024118023000001
Abstract
Description
[Technical field]
[0001] The present invention relates to a filter circuit. [Background technology]
[0002] 2. Description of the Related Art A filter circuit for removing noise occurring in an input signal is known (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 62-232214 Summary of the Invention [Problem to be solved by the invention]
[0004] For example, rotary encoders are used to detect the rotation of motors, etc. A lot of noise occurs near the driving system such as the motor. If noise gets mixed into the input signal of the rotary encoder, it cannot be removed, and the noise may get mixed into the output signal.
[0005] In one aspect, the present invention has an object to provide a filter circuit capable of removing noise. [Means for solving the problem]
[0006] In one embodiment, the filter circuit comprises: a first circuit having at least one first D-type flip-flop circuit and receiving an input signal; a second circuit having at least one second D-type flip-flop circuit and receiving an output signal of the first circuit; a first AND circuit receiving the signal, the output signal of the first circuit, and the output signal of the second circuit; a first OR circuit receiving the signal, the output signal of the first circuit, and the output signal of the second circuit; a selection circuit selecting and outputting one of the output signal of the first AND circuit and the output signal of the first OR circuit; and a D-type flip-flop circuit receiving the output signal of the selection circuit.
[0007] In the above filter circuit, the first circuit may have a plurality of first D-type flip-flop circuits, the first D-type flip-flop circuits forming a flip-flop array, and the input signal may be input to a first D-type flip-flop circuit in a front-stage among the plurality of first D-type flip-flop circuits; the second circuit may have a plurality of second D-type flip-flop circuits, the second D-type flip-flop circuits forming a flip-flop array, and the output signal of the first circuit may be input to a second D-type flip-flop circuit in a front-stage among the plurality of second D-type flip-flop circuits.
[0008] The above filter circuit may further include a decision circuit that decides the number of first D-type flip-flop circuits that function in the flip-flop array of the first circuit and the number of second D-type flip-flop circuits that function in the flip-flop array of the second circuit.
[0009] In the above filter circuit, the first circuit may have a plurality of second AND circuits and a second OR circuit, output signals of the plurality of D-type flip-flop circuits of the first circuit are input to the plurality of second AND circuits, and output signals of the plurality of second AND circuits are input to the second OR circuit, and the second circuit may have a plurality of third AND circuits and a third OR circuit, output signals of the plurality of D-type flip-flop circuits of the second circuit are input to the plurality of third AND circuits, and output signals of the plurality of third AND circuits are input to the third OR circuit.
[0010] In the above filter circuit, the decision circuit may have a switch that selects a terminal to be connected to a power supply voltage from a plurality of terminals, and the plurality of terminals may be connected to the plurality of second AND circuits and the plurality of third AND circuits.
[0011] The filter circuit may be provided in a rotary encoder. Effect of the Invention
[0012] It is possible to provide a filter circuit capable of removing noise. [Brief description of the drawings]
[0013] [Figure 1] 1(a) is a block diagram illustrating a rotary encoder, and FIG. 1(b) is a schematic diagram illustrating a rotary encoder. [Diagram 2] FIG. 2 is a diagram illustrating a filter circuit according to the embodiment. [Diagram 3] FIG. 3 is a diagram illustrating a filter circuit according to the embodiment. [Figure 4] FIG. 4 is a flowchart illustrating a process for determining the number of flip-flop circuits. [Diagram 5] FIG. 5 is a diagram illustrating an example of a timing chart. [Figure 6] FIG. 6 is a diagram illustrating a timing chart. [Figure 7]FIG. 7 is a diagram illustrating a timing chart. [Figure 8] FIG. 8 is a diagram illustrating an example of a timing chart. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, an embodiment will be described with reference to the drawings.
[0015] (Embodiment) [Rotary Encoder] Fig. 1(a) is a block diagram illustrating a rotary encoder. As shown in Fig. 1(a), a filter circuit 100 according to an embodiment is applied to a rotary encoder 1. Data output by a sensor 2 is input to the filter circuit 100. A signal output by the filter circuit 100 is input to a processing circuit 3. The processing circuit 3 processes the signal and calculates the number of rotations, the rotation speed, and the like.
[0016] The rotary encoder 1 is an encoder having a mechanism in which a disk-shaped rotary scale rotates relative to a detection head, and is suitable for detecting a rotation angle, etc. Therefore, the rotary encoder 1 is provided near a drive system such as a motor. Vibrations in the drive system can cause noise in the electrical signal.
[0017] FIG. 1(b) is a schematic diagram illustrating a rotary encoder 1. As shown in FIG. 1(b), a rotating plate 104 is attached to the tip of a shaft 102 of a motor 101. The rotating plate 104, a light-emitting element 106, and a light-receiving element 107 are provided inside a casing 103. When the shaft 102 rotates, the rotating plate 104 also rotates together with the shaft 102. The rotating plate 104 has a slit 105. The slit 105 penetrates the rotating plate 104. The light-emitting element 106 is spaced apart from the rotating plate 104 and disposed on one side of the rotating plate 104. The light-receiving element 107 is spaced apart from the rotating plate 104 and disposed on the other side of the rotating plate 104. The light-emitting element 106 and the light-receiving element 107 face each other.
[0018] Light emitting element 106 emits light. The light is blocked by rotating plate 104 and does not enter light receiving element 107. When the light passes through slit 105, the light enters light receiving element 107. Light receiving element 107 receives the light and outputs an electrical signal.
[0019] 1. A signal output from the light receiving element 107 is input to the filter circuit 100. As the motor 101 and the rotating plate 104 are driven, noise is likely to occur in the electrical signal output from the light receiving element 107. The filter circuit 100 removes noise from the input signal.
[0020] [Filter circuit] 2 and 3 are diagrams illustrating a filter circuit 100 according to an embodiment. The filter circuit 100 includes an input terminal 4, an input terminal 5, an output terminal 6, a first circuit 10, a second circuit 30, a decision circuit 46, an OR circuit 50 (first OR circuit), an AND circuit 52 (first AND circuit), a selection circuit 54, a D-type flip-flop circuit 56, and a control unit 60.
[0021] The OR circuit 50 and the AND circuit 52 each have three input terminals. The selection circuit 54 is, for example, a multiplexer, and has two input terminals and one output terminal.
[0022] As described below, the first circuit 10 has a plurality of D-type flip-flop circuits. The plurality of D-type flip-flop circuits form a flip-flop array. The second circuit 30 has a plurality of D-type flip-flop circuits. The plurality of D-type flip-flop circuits form a flip-flop array.
[0023] The decision circuit 46 is connected to the first circuit 10 and the second circuit 30. The decision circuit 46 decides the number of D-type flip-flop circuits included in the flip-flop array of the first circuit 10 and the number of D-type flip-flop circuits included in the flip-flop array of the second circuit 30.
[0024] The input terminal 4 is connected to an input terminal of the first circuit 10, one input terminal of the OR circuit 50, and one input terminal of the AND circuit 52. The output terminal of the first circuit 10 is connected to the second circuit 30, one input terminal of the OR circuit 50, and one input terminal of the AND circuit 52. The output terminal of the second circuit 30 is connected to one input terminal of the OR circuit 50 and one input terminal of the AND circuit 52.
[0025] The output terminal of the OR circuit 50 is connected to an input terminal I1 of the selection circuit . The output terminal of the AND circuit 52 is connected to an input terminal I0 of the selection circuit .
[0026] The output terminal O of the selection circuit 54 is connected to the input terminal of a D-type flip-flop circuit 56. The output terminal of the D-type flip-flop circuit 56 is connected to the output terminal 6 of the filter circuit 100, and is also connected to a terminal S of the selection circuit 54 and the control unit 60.
[0027] The input terminal 5 is connected to the D-type flip-flop circuit of the first circuit 10 , the D-type flip-flop circuit of the second circuit 30 , and the D-type flip-flop circuit 56 .
[0028] 3, the configurations of the first circuit 10, the second circuit 30, and the decision circuit 46 are illustrated in detail. As shown in FIG. 3, the first circuit 10 has a flip-flop array 12, AND circuits 14, 16, 18, 20, and 22 (above, second AND circuits), and an OR circuit 24 (second OR circuit). The flip-flop array 12 has five D-type flip-flop circuits 12a to 12e (first D-type flip-flop circuits). The D-type flip-flop circuit 12a is located at the front end of the flip-flop array 12. The D-type flip-flop circuit 12e is located at the rear end. The AND circuits 14, 16, 18, 20, and 22, and the OR circuit 24 function as the circuit 11.
[0029] The second circuit 30 has a flip-flop array 32, AND circuits 34, 36, 38, 40, and 42 (above, a third AND circuit), and an OR circuit 44 (a third OR circuit). The flip-flop array 32 has five D-type flip-flop circuits 32a to 32e (second D-type flip-flop circuits). The D-type flip-flop circuit 32a is located at the front end of the flip-flop array 32. The D-type flip-flop circuit 32e is located at the rear end. The AND circuits 34, 36, 38, 40, and 42, and the OR circuit 44 function as a circuit 41.
[0030] The decision circuit 46 has a switch 47. The switch 47 switches the wiring connected to the power supply voltage Vcc by selecting one of the terminals S1 to S5. Each of the terminals S1 to S5 is grounded via a resistor.
[0031] The control unit 60 is connected to the decision circuit 46 and switches the switch 47 of the decision circuit 46. The control unit 60 may include, for example, a circuit and a computer.
[0032] The input terminal 4 is connected to the input terminal of the D-type flip-flop circuit 12a. The output terminal of the D-type flip-flop circuit 12a is connected to the input terminal of the D-type flip-flop circuit 12b. The output terminal of the D-type flip-flop circuit 12b is connected to the input terminal of the D-type flip-flop circuit 12c. The output terminal of the D-type flip-flop circuit 12c is connected to the input terminal of the D-type flip-flop circuit 12d. The output terminal of the D-type flip-flop circuit 12d is connected to the input terminal of the D-type flip-flop circuit 12e.
[0033] One input terminal of the AND circuit 14 is connected to the output terminal of the D-type flip-flop circuit 12a. The other input terminal of the AND circuit 14 is connected to the terminal S1 of the decision circuit 46. One input terminal of the AND circuit 16 is connected to the output terminal of the D-type flip-flop circuit 12b. The other input terminal of the AND circuit 16 is connected to the terminal S2 of the decision circuit 46. One input terminal of the AND circuit 18 is connected to the output terminal of the D-type flip-flop circuit 12c. The other input terminal of the AND circuit 18 is connected to the terminal S3 of the decision circuit 46. One input terminal of the AND circuit 20 is connected to the output terminal of the D-type flip-flop circuit 12d. The other input terminal of the AND circuit 20 is connected to the terminal S4 of the decision circuit 46. One input terminal of the AND circuit 22 is connected to the output terminal of the D-type flip-flop circuit 12e. The other input terminal of the AND circuit 22 is connected to the terminal S5 of the decision circuit 46. The output terminals of the AND circuits 14 , 16 , 18 , 20 and 22 are connected to the input terminals of an OR circuit 24 .
[0034] An output terminal of the OR circuit 24 is connected to one input terminal of an OR circuit 50 , one input terminal of an AND circuit 52 , and an input terminal of a D-type flip-flop circuit 32 a of the second circuit 30 .
[0035] The D-type flip-flop circuits of the flip-flop array 32 are connected in the same manner as the D-type flip-flop circuits of the flip-flop array 12 .
[0036] The AND circuit 34 of the second circuit 30 is connected to the output terminal of the D-type flip-flop circuit 32a and the terminal S1 of the decision circuit 46. The AND circuit 36 is connected to the output terminal of the D-type flip-flop circuit 32b and the terminal S2 of the decision circuit 46. The AND circuit 38 is connected to the output terminal of the D-type flip-flop circuit 32c and the terminal S3 of the decision circuit 46. The AND circuit 40 is connected to the output terminal of the D-type flip-flop circuit 32d and the terminal S4 of the decision circuit 46. The AND circuit 42 is connected to the output terminal of the D-type flip-flop circuit 32e and the terminal S5 of the decision circuit 46. The output terminals of the AND circuits 34, 36, 38, 40 and 42 are connected to the input terminals of the OR circuit 44.
[0037] The output terminal of the OR circuit 44 is connected to one input terminal of an OR circuit 50 and one input terminal of an AND circuit 52 .
[0038] The input terminal 5 is connected to each of the D-type flip-flop circuits of the first circuit 10, each of the D-type flip-flop circuits of the second circuit 30, and the D-type flip-flop circuit 56.
[0039] An input signal IN is input from an input terminal 4 to the filter circuit 100, and then input to the flip-flop array 12, the OR circuit 50, and the AND circuit 52 of the first circuit 10. A clock signal CK is input from an input terminal 5, and then input to the D-type flip-flop circuits of the flip-flop array 12, the D-type flip-flop circuits of the flip-flop array 32, and the D-type flip-flop circuit 56.
[0040] The output signal D1 of the first circuit 10 is input to the flip-flop array 32, the OR circuit 50, and the AND circuit 52 of the second circuit 30. The output signal D2 of the second circuit 30 is input to the OR circuit 50 and the AND circuit 52.
[0041] The output signal A of the OR circuit 50 is input to the input terminal I1 of the selection circuit . The output signal B of the AND circuit 52 is input to the input terminal I0 of the selection circuit .
[0042] The selection circuit 54 outputs one of the signals A and B as an output signal C. The output signal C is input to a D-type flip-flop circuit 56. The signal output from the D-type flip-flop circuit 56 is input to a terminal S of the selection circuit 54 as a feedback signal. The output signal of the D-type flip-flop circuit 56 is output from an output terminal 6 as an output signal OUT. The filter circuit 100 removes noise mixed in the input signal IN, and outputs an output signal OUT.
[0043] [Determining the number of D-type flip-flop circuits] The control unit 60, the decision circuit 46, and the circuit 11 make it possible to select the number of D-type flip-flop circuits that contribute to noise elimination in the flip-flop array 12 of the first circuit 10. The control unit 60, the decision circuit 46, and the circuit 41 make it possible to select the number of D-type flip-flop circuits that contribute to noise elimination in the flip-flop array 32 of the second circuit 30.
[0044] An output signal OUT is input to the control unit 60. The control unit 60 controls the connection of the switch 47 of the decision circuit 46. When the terminal S1 of the switch 47 is selected, the AND circuit 14 of the circuit 11 and the AND circuit 34 of the circuit 41 are connected to the power supply voltage Vcc. The other AND circuits of the circuit 11 and the other AND circuits of the circuit 41 are not connected to the power supply voltage Vcc. Of the D-type flip-flop circuits included in the flip-flop array 12, the D-type flip-flop circuit 12a contributes to the elimination of noise. Of the D-type flip-flop circuits included in the flip-flop array 32, the D-type flip-flop circuit 32a contributes to the elimination of noise. The other D-type flip-flop circuits of the flip-flop array do not contribute to the elimination of noise.
[0045] When the terminal S2 of the switch 47 is selected, the AND circuit 16 of the circuit 11 and the AND circuit 36 of the circuit 41 are connected to the power supply voltage Vcc. The other AND circuits of the circuit 11 and the other AND circuits of the circuit 41 are not connected to the power supply voltage Vcc. Of the D-type flip-flop circuits included in the flip-flop array 12, the D-type flip-flop circuits 12a and 12b contribute to noise elimination. Of the D-type flip-flop circuits included in the flip-flop array 32, the D-type flip-flop circuits 32a and 32b contribute to noise elimination. The other D-type flip-flop circuits of the flip-flop array do not contribute to noise elimination.
[0046] When the terminal S3 of the switch 47 is selected, the D-type flip-flop circuits 12a, 12b, and 12c among the D-type flip-flop circuits included in the flip-flop array 12 contribute to noise elimination. Among the D-type flip-flop circuits included in the flip-flop array 32, the D-type flip-flop circuits 32a, 32b, and 32c contribute to noise elimination.
[0047] When the terminal S4 of the switch 47 is selected, the D-type flip-flop circuits 12a, 12b, 12c, and 12d among the D-type flip-flop circuits included in the flip-flop array 12 contribute to noise elimination. Among the D-type flip-flop circuits included in the flip-flop array 32, the D-type flip-flop circuits 32a, 32b, 32c, and 32d contribute to noise elimination.
[0048] When the terminal S5 of the switch 47 is selected, all of the D-type flip-flop circuits included in the flip-flop array 12 contribute to noise elimination. All of the D-type flip-flop circuits included in the flip-flop array 32 contribute to noise elimination.
[0049] 4 is a flowchart illustrating a process for determining the number of flip-flop circuits. The control unit 60 selects the terminal S1 of the switch 47. The number of D-type flip-flop circuits functioning in each of the flip-flop arrays 12 and 32 is set to 1 (step S10).
[0050] The filter circuit 100 receives an input signal IN (step S12). The filter circuit 100 outputs an output signal OUT. The output signal OUT is input to the control unit 60. The control unit 60 determines whether or not noise is mixed into the output signal OUT (step S14). If the answer is No in step S14, the number is determined to be 1 (step S16).
[0051] If the answer is Yes in step S14, the control unit 60 increases the number of D-type flip-flop circuits in the flip-flop array by one (step S18). After step S18, steps S12 and after are repeated. If the answer is No in step S14, the number is determined to be the number determined in step S18 (step S16). After step S16, the process ends.
[0052] 5 to 8 are diagrams illustrating timing charts. The period of the clock signal CK is Tck. The length of the noise N is TN.
[0053] 5 to 7, from the top, they represent a clock signal CK, an input signal IN, an output signal D1 of the first circuit 10, an output signal D2 of the second circuit 30, an output signal A of the OR circuit 50, an output signal B of the AND circuit 52, an output signal C of the selection circuit 54, an output signal OUT of the filter circuit 100, and a signal selection in the selection circuit 54. A terminal S1 of the decision circuit 46 is connected to a power supply voltage Vcc. In each of the first circuit 10 and the second circuit 30, the number of D-type flip-flop circuits contributing to the elimination of noise N is one.
[0054] In the examples of FIGS. 5 and 6, the length TN of the noise is longer than one period of the clock signal CK and shorter than two periods (Tck < TN < 2Tck). In the timing charts after FIG. 5, the noise is represented as a black area to indicate that the noise randomly becomes either H or L. Therefore, it is unknown whether the noise is H or L at a certain timing. At that timing, if there is a problem when the noise is H, for example, it is assumed that the noise is H.
[0055] In the example of FIG. 5, the input signal IN transitions from Low (L) to High (H). At the start of the timing chart, the input signal IN, the output signal D1 of the first circuit 10, and the output signal D2 of the second circuit 30 are L. The output signal B of the AND circuit 52 is selected as the input signal to the selection circuit 54.
[0056] The clock signal CK periodically changes between L and H. The clock signal CK transitions from L to H at times t1, t2, t3, t4, and t5. The noise N is mixed into the input signal IN from before time t1 until after time t2. When the clock signal CK rises at time t1, the output signal D1 of the first circuit 10 becomes H.
[0057] The signals IN, D1, and D2 are input to the OR circuit 50 and the AND circuit 52. When the signal D1 becomes H, the output signal A of the OR circuit 50 becomes H. Since the output signal D2 of the second circuit 30 remains L, the output signal B of the AND circuit 52 also maintains L. The selection circuit 54 selects and outputs the signal B. The signals C and OUT are L. The noise N is removed from the output signal OUT.
[0058] When the clock signal CK changes from L to H at time t2, the output signal D1 of the first circuit 10 changes from H to L, and the output signal D2 of the second circuit 30 changes from L to H. The input signal IN after the noise N ends is H. When the clock signal CK changes from L to H at time t3, the output signal D1 of the first circuit 10 becomes H, and the output signal D2 of the second circuit 30 becomes L.
[0059] From time t1 to t4, one of the output signals D1 and D2 is H and the other is L. The output signal A of the OR circuit 50 is H, and the output signal B of the AND circuit 52 remains L. Since the signal B is selected by the selection circuit 54, the output signal C is L. A glitch signal G occurs in the signals A, B and C. The D-type flip-flop circuit 56 removes the glitch signal G and outputs the output signal OUT. The signals C and OUT are L.
[0060] When the clock signal CK transitions to H at time t4, the output signal D2 of the second circuit 30 becomes H. Since the input signal IN and the output signals D1 and D2 are H, the output signal B of the AND circuit 52 transitions from L to H. As a result, the output signal C of the selection circuit 54 also transitions to H. The output signal OUT of the D-type flip-flop circuit 56 remains L. When the clock signal CK transitions to H at time t5, the output signal OUT of the D-type flip-flop circuit 56 transitions from L to H. A feedback signal is input to the terminal S of the selection circuit 54, and the output signal A of the OR circuit 50 is selected. The signals C and OUT remain H.
[0061] 6, the input signal IN transitions from H to L. At the start of the timing chart, the input signal IN, the output signal D1 of the first circuit 10, and the output signal D2 of the second circuit 30 are all H. The output signal A of the OR circuit 50 is selected as the input signal of the selection circuit 54.
[0062] The clock signal CK transitions to H at times t6, t7, t8, t9 and t10. Noise N mixes with the input signal IN from before time t6 to after time t7. When the clock signal CK goes to L at time t6, the output signal D1 of the first circuit 10 goes from H to L. As the signal D1 goes to L, the output signal B of the AND circuit 52 also goes to L. The output signal D2 of the second circuit 30 and the output signal A of the OR circuit 50 remain H. The selection circuit 54 selects and outputs signal A. Signals C and OUT are H. Noise N has been removed from the output signal OUT.
[0063] From time t6 to t9, one of the output signals D1 and D2 is H and the other is L. The output signal A of the OR circuit 50 is H, and the output signal B of the AND circuit 52 is L. Since signal A is selected in the selection circuit 54, the output signal C is H. A glitch signal G is generated for signals A, B, and C. The D flip-flop circuit 56 removes the glitch signal G and outputs the output signal OUT. Signals C and OUT are H.
[0064] When the clock signal CK transitions to H at time t9, the output signal D2 of the second circuit 30 becomes L. The input signal IN, output signals D1 and D2 are L. The output signal A of the OR circuit 50 and the output signal C of the selection circuit 54 transition from H to L. When the clock signal CK becomes H at time t10, the output signal OUT of the D flip-flop circuit 56 transitions from H to L. A feedback signal is input to the terminal S of the selection circuit 54, and the output signal B of the AND circuit 52 is selected. Signals C and OUT maintain L.
[0065] In the examples of FIGS. 7 and 8, the length TN of the noise is longer than 4 periods and shorter than 5 periods of the clock signal CK (4Tck < TN < 5Tck). The input signal IN transitions from L to H. At the start of the timing chart, the input signal IN, the output signal D1 of the first circuit 10, and the output signal D2 of the second circuit 30 are L. The output signal B of the AND circuit 52 is selected as the input signal to the selection circuit 54.
[0066] In the example of FIG. 7, in each of the first circuit 10 and the second circuit 30, the number of D flip-flop circuits contributing to the removal of the noise N is 1.
[0067] The clock signal CK transitions to H at times t11, t12, t13, t14, t15, t16, and t17. The noise N is mixed into the input signal IN from before time t11 to after time t15.
[0068] When the clock signal CK goes high at time t11, the output signal D1 of the first circuit 10 goes high. As the signal D1 goes high, the output signal A of the OR circuit 50 also goes high. The output signal D2 of the second circuit 30 and the output signal B of the AND circuit 52 remain low. The selection circuit 54 selects and outputs the signal B. The signals C and OUT are low.
[0069] When the clock signal CK goes H at time t12, the output signal D2 of the second circuit 30 goes H. The output signal D1 of the first circuit 10 is also H. The AND circuit 52 is input with the signals D1 and D2 and the input signal IN containing noise N. Noise is generated in the output signal B of the AND circuit 52. Since the signal B is selected by the selection circuit 54, noise is also generated in the output signal C. However, since the input signal to the D-type flip-flop circuit 56 is L at the time t12, the output signal OUT of the D-type flip-flop circuit 56 is L.
[0070] When the clock signal CK becomes H at time t13, the output signal D1 of the first circuit 10 transitions from H to L. The output signal B of the AND circuit 52 transitions to L. The output signal OUT of the D-type flip-flop circuit 56 transitions from L to H. As the feedback signal transitions to H, the selection circuit 54 selects the output signal A of the OR circuit 50. The output signal D2 of the second circuit 30 remains H. The output signal A of the OR circuit 50 is H. The output signal OUT switches to H.
[0071] When the clock signal CK goes H at time t14, the output signal D2 of the second circuit 30 goes L. Both signals D1 and D2 are L. Noise N is generated in the input signal IN. The signals D1 and D2 and the input signal IN are input to the OR circuit 50. Noise is also generated in the output signal A of the OR circuit 50. Since the selection circuit 54 selects the output signal A of the OR circuit 50, noise is also generated in the output signal C of the selection circuit 54. However, since the input signal to the D-type flip-flop circuit 56 is H at the time t14, the output signal OUT of the D-type flip-flop circuit 56 maintains H.
[0072] When the clock signal CK becomes H at time t15, the output signal D1 of the first circuit 10 and the output signal A of the OR circuit 50 become H. The output signal C of the selection circuit 54 becomes H. The output signal OUT of the D-type flip-flop circuit 56 switches to L. As the feedback signal becomes L, the selection circuit 54 selects the output signal B of the AND circuit 52. The noise disappears from the output signal C, and the signal C changes from H to L. After the noise N disappears, the input signal IN is H.
[0073] When the clock signal CK goes to H at time t16, the output signal D2 of the second circuit 30 goes to H. Because the input signal IN, signals D1 and D2 are H, the output signal B of the AND circuit 52 goes to H and the output signal C of the selection circuit 54 also goes to H.
[0074] When the clock signal CK goes to H at time t17, the output signal OUT of the D-type flip-flop circuit 56 transitions to H. A feedback signal is input to the terminal S of the selection circuit 54, so that the selection circuit 54 selects the signal A.
[0075] 7, the noise also propagates to the output signal C of the selection circuit 54. As a result, the output signal OUT frequently switches between L and H.
[0076] The control unit 60 detects noise in the output signal OUT (step S14 in FIG. 4). The noise is a flutter of L and H as shown in FIG. 7. The control unit 60 increases the number of D-type flip-flop circuits in the flip-flop array by one (step S18).
[0077] 8, the number of D-type flip-flop circuits contributing to the removal of noise N is two in each of the first circuit 10 and the second circuit 30. From the top, they represent the clock signal CK, the input signal IN, the output signal d11 of the D-type flip-flop circuit 12a, the output signal D1 of the first circuit 10, the output signal d21 of the D-type flip-flop circuit 32a, the output signal D2 of the second circuit 30, the output signal A of the OR circuit 50, the output signal B of the AND circuit 52, the output signal C of the selection circuit 54, the output signal OUT of the filter circuit 100, and the selection of a signal in the selection circuit 54.
[0078] At times t18, t19, t20, t21, t22, t23, t24, t25, and t26, the clock signal CK transitions to H. Noise N is mixed into the input signal IN from before time t18 until after time t22.
[0079] When the clock signal CK goes to H at time t18, the output signal d11 of the D-type flip-flop circuit 12a goes to H, but the output signal D1 of the first circuit 10 remains at L. The signals D1, d21, and D2 are L. The output signal A of the OR circuit 50 goes to H. Since the selection circuit 54 selects the output signal B of the AND circuit 52, the output signal C is L. The output signal OUT of the D-type flip-flop circuit 56 is also L.
[0080] From time t18 to t22, noise N is mixed into the input signal IN. From time t18 to t25, one of the signals D1 and D2 is H and the other is L. As a result, the output signal B of the AND circuit 52 remains L. The output signal C of the selection circuit 54 and the output signal OUT of the filter circuit 100 also remain L. In other words, the noise N is removed without propagating to the signals C and OUT. The fluttering of the output signal OUT is suppressed.
[0081] When the clock signal CK goes to H at time t25, the output signal D2 of the second circuit 30 goes to H. The input signal IN, signals D1 and D2 are H. The output signal B of the AND circuit 52 goes to H, and the output signal C of the selection circuit 54 also goes to H. The output signal OUT remains at L.
[0082] When the clock signal CK goes high at time t26, the output signal OUT of the D - type flip - flop circuit 56 goes high. By inputting a feedback signal to the terminal S of the selection circuit 54, signal A is selected in the selection circuit 54. After time t26, the output signal OUT is high.
[0083] In the examples of FIGS. 5 and 6, in each of the first circuit 10 and the second circuit 30, the number of D - type flip - flop circuits contributing to the removal of the noise N is 1. Noise N with Tck < TN < 2Tck can be removed. However, noise N with 4Tck < TN < 5Tck propagates (example in FIG. 7). In the example of FIG. 8, in each of the first circuit 10 and the second circuit 30, the number of D - type flip - flop circuits contributing to the removal of the noise N is 2. The noise N can be removed.
[0084] According to the present embodiment, the first circuit 10 has, for example, five D - type flip - flop circuits, and the input signal IN is input. The second circuit 30 has, for example, five D - type flip - flop circuits, and the output signal D1 of the first circuit 10 is input. The input signal IN, the signal D1, and the output signal D2 of the second circuit 30 are input to the OR circuit 50 and the AND circuit 52. The selection circuit 54 selects and outputs either the output signal A of the OR circuit 50 or the output signal B of the AND circuit 52. The output signal C of the selection circuit 54 is input to the D - type flip - flop circuit 56. The D - type flip - flop circuit 56 outputs the output signal OUT. The noise N mixed in the input signal IN can be removed.
[0085] The first circuit 10 has a flip - flop array 12. The second circuit 30 has a flip - flop array 32. The noise N mixed in the input signal IN can be removed. The configuration of the filter circuit 100 is simple.
[0086] The decision circuit 46 determines the number of D-type flip-flop circuits that function to remove noise in each of the flip-flop arrays 12 and 32. When the number is one, noise N where Tck < TN < 2Tck can be removed as in the examples of FIGS. 5 and 6. When the number is two, noise where 4Tck < TN < 5Tck can be removed as in the example of FIG. 8.
[0087] As shown in FIG. 5, the first circuit 10 and the second circuit 30 each have a plurality of D-type flip-flop circuits, for example, five in number. The number may be one, four or less, or six or more. The first circuit 10 and the second circuit 30 each have at least one D-type flip-flop circuit.
[0088] The output signals of the D-type flip-flop circuits of the flip-flop array 12 are input to the AND circuits 14, 16, 18, 20, and 22 of the first circuit 10 respectively. The output signals of the five AND circuits are input to the OR circuit 24. The output signals of the D-type flip-flop circuits of the flip-flop array 32 are input to the AND circuits 34, 36, 38, 40, and 42 of the second circuit 30 respectively. The output signals of the five AND circuits are input to the OR circuit 44. Noise N can be removed.
[0089] The switch 47 of the decision circuit 46 selects one of the terminals S1 to S5 and connects it to the power supply voltage Vcc. The terminals are connected to the AND circuits of the first circuit 10 and the AND circuits of the second circuit 30. By selecting the terminals, the number of D-type flip-flop circuits that function to remove noise in each of the flip-flop arrays 12 and 32 can be determined.
[0090] The filter circuit 100 is provided in the rotary encoder 1. Since the rotary encoder 1 has drive components such as a motor, noise is likely to occur. The filter circuit 100 can remove the noise.
[0091] Although the embodiments of the present invention have been described in detail above, the present invention is not limited to such specific embodiments, and various modifications and variations are possible within the scope of the gist of the present invention described in the claims. [Explanation of symbols]
[0092] 1 Rotary Encoder 2 Sensors 3 Processing circuit 4, 5 Input terminals 6 Output terminal 10 1st circuit 11, 41 Circuit 12, 32 Flip-Flop Array 12a to 12e D-type flip-flop circuit (first D-type flip-flop circuit) 14, 16, 18, 20, 22 AND circuit (second AND circuit) 24 OR circuit (second OR circuit) 30 2nd circuit 32a to 32e D-type flip-flop circuit (second D-type flip-flop circuit) 34, 36, 38, 40, 42 AND circuit (3rd AND circuit) 44 OR circuit (3rd OR circuit) 46 Decision Circuit 47 Switch 50 OR circuit (first OR circuit) 52 AND circuit (first AND circuit) 54 Selection circuit 56 D-type flip-flop circuit 60 Control section 100 Filter Circuit 101 Motor 102 Axis 103 Casing 104 Rotating Plate 105 Slit 106 Light emitting element 107 Photodetector
Claims
1. a first circuit having at least one first D-type flip-flop circuit and receiving an input signal; a second circuit having at least one second D-type flip-flop circuit and receiving an output signal from the first circuit; a first AND circuit to which the signal, an output signal of the first circuit, and an output signal of the second circuit are input; a first OR circuit to which the signal, an output signal of the first circuit, and an output signal of the second circuit are input; a selection circuit that selects and outputs either an output signal of the first AND circuit or an output signal of the first OR circuit; a D-type flip-flop circuit to which the output signal of the selection circuit is input.
2. the first circuit includes a plurality of first D-type flip-flop circuits; the first D-type flip-flop circuits form a flip-flop array; the input signal is input to a first D-type flip-flop circuit at a front stage among the plurality of first D-type flip-flop circuits, the second circuit includes a plurality of second D-type flip-flop circuits; the second D-type flip-flop circuits form a flip-flop array; 2. The filter circuit according to claim 1, wherein an output signal of said first circuit is input to a second D-type flip-flop circuit at a front stage among said plurality of second D-type flip-flop circuits.
3. A decision circuit is provided, 3. The filter circuit according to claim 2, wherein the determination circuit determines the number of first D-type flip-flop circuits functioning in the flip-flop array of the first circuit and the number of second D-type flip-flop circuits functioning in the flip-flop array of the second circuit.
4. the first circuit has a plurality of second AND circuits and a second OR circuit; output signals of the plurality of D-type flip-flop circuits of the first circuit are input to the plurality of second AND circuits; The output signals of the plurality of second AND circuits are input to the second OR circuit; the second circuit includes a plurality of third AND circuits and a third OR circuit; output signals of the plurality of D-type flip-flop circuits of the second circuit are input to the plurality of third AND circuits; 4. The filter circuit according to claim 2, wherein output signals of the plurality of third AND circuits are input to the third OR circuit.
5. the determination circuit has a switch for selecting a terminal connected to a power supply voltage from among a plurality of terminals; The filter circuit according to claim 4 , wherein the plurality of terminals are connected to the plurality of second AND circuits and the plurality of third AND circuits.
6. 2. The filter circuit according to claim 1, which is provided in a rotary encoder.
Citation Information
Patent Citations
Noise elimination circuit
JP1987232214A
