EDN -- 01.04.96 Circuit produces valid encoder pulse
Design Ideas:January 4, 1996
Circuit produces valid encoder pulses
The output of an incremental optical shaft encoder typically consists of three square-wave signals: the index signal, which indicates one full-shaft rotation, and two signals in phase quadrature (Figure 1a- - A and B), which produce a fixed number of counts per shaft revolution. The encoder-interface circuits use the quadrature signals to provide velocity and position feedback to digital controllers or other circuits.
Creating the feedback signals is straightforward in principle: You obtain the speed by counting the pulses for a fixed time interval and then scale the output appropriately. You obtain position by incrementing or decrementing a counter based on the direction of rotation. You must determine which pulses to use to drive the speed and position counters. At first, it appears as though either of the quadrature signals are suitable for this purpose. Consider the situation in Figure 1a and assume that signal A is the clock signal for the feedback counters. If the shaft started to oscillate between pointsxand y, a number of false pulses would result, yielding erroneous feedback information.
To avoid this problem, you must use the quadrature signals to create valid pulses. Consider a circuit design that requires the output to go high when B goes high and the output to go low only if A goes low after B goes high. Such a circuit eliminates the problem of counting errors due to small oscillations of the shaft.Figure 2’s simple asynchronous, sequential design shows one implementation. The output of the MC14027 flip-flop toggles when a rising transition occurs at the clock input. Note that the circuit requires only two ICs, because you can implement the combinatorial logic using a quad, two-input NAND gate, such as the MC14011. Figure 1b shows a sample output. (DI #1816) EDN Magazine. EDN is a registered trademark of Reed Properties Inc, used under license.