ELM405
Output Waveforms
Once the ELM405 has some bounce-free signals
to work with, it can generate outputs based on them.
checking, and monitors for problems such as an output
pulse being initiated before the previous one had
completed, which might occur for some very fast
inputs (the second one will be ignored in this case).
The logic to decode the motion of an encoder
shaft is not as simple as it would first appear. Some
authorities recommend simply monitoring an input and
when it changes, provide an output based on the level
of the other input. This does not always work, as the
encoder can output multiple signals from only the ‘A’ or
or only the ‘B’ contact if the shaft is moved ever so
slightly when at the detent or at the mid-point position
(between detents). Simply seeing one input change is
not sufficient to say that there is any significant shaft
rotation.
The output of the ELM405 is a series of pulses, as
shown in Figure 4 (representative pulses are enlarged
and shown in Figures 5 and 6). When the encoder is
moving in a clockwise direction, the pulses will be
generated with the U/D output at a high level, while a
counter-clockwise rotation of the shaft results in pulses
generated with the U/D output at a low level. The
direction assumes that the encoder is a standard one,
where the ‘A’ signal leads the ‘B’ for a clockwise
rotation.
The ELM405 monitors both ‘A’ and ‘B’ transitions,
and determines the outputs based on the sequence in
which the transitions have occurred. This is a better
way to guarantee that the output signals are generated
properly. The internal logic also performs some self-
Outputs are usually generated each time that one
of the inputs change, so for each full cycle of both of
the inputs, there will be 4 output pulses. This is what is
known as 4x decoding. The other type of decoder that
direction changes
A Input
B Input
CS
debounce
delay
Clk
U/D
Figure 4. Output signals (pin 4 = 0V)
CS
Clk
CS
200 µsec
200 µsec
Clk
U/D
U/D
Figure 5. Up or Clockwise Output
Figure 6. Down or Counter-clockwise Output
ELM405DSA
Elm Electronics – Circuits for the Hobbyist
7 of 10
www.elmelectronics.com