I am looking for the name of potentiometer like component which built in keyboards like Logitech G910, it sending just a plus and minus data I assume. Thanks
-
\$\begingroup\$ It's probably just a rotary switch or encoder (unlikely). You can easily figure this out by opening it up and looking at it. \$\endgroup\$– Ron BeyerCommented Mar 15, 2020 at 19:40
-
4\$\begingroup\$ I assumed it to be a encoder which outputs gray code. \$\endgroup\$– OldfartCommented Mar 15, 2020 at 19:41
-
1\$\begingroup\$ That's basically the same as scroll wheel on mouse. \$\endgroup\$– JustmeCommented Mar 15, 2020 at 19:43
-
\$\begingroup\$ en.wikipedia.org/wiki/Incremental_encoder#Quadrature_outputs \$\endgroup\$– Solomon SlowCommented Mar 15, 2020 at 20:23
1 Answer
You are describing a rotary encoder.
Figure 1. A typical rotary encoder.
These consist of two switching contacts (mechanical or optical) which give out a train of pulses offset by 90°.
Figure 2. The output waveform and the resultant count when rotating clockwise and anti-clockwise.
The offset allows determination of rotation direction. If, for example, we check the status of B every time A goes positive we can say:
- If B is '0' then increment the count by 1.
- If B is '1' then decrement the count by 1.
See Rotary encoder to 2 buttons for more and a sample circuit.