a speed and direction detector for rotating bodies such as gears including a pair of spaced sensors mounted adjacent the gear teeth to develop phase - shifted alternating signal waveforms , and a decoder to develop a sequence of output signal conditions depending upon the relation between the alternating waveform values . signal stage memories utilizing flip - flops and gates connect the decoder outputs to an up / down counter which is incremented or decremented according to gear rotation direction only if a complete signal condition sequence occurs .