Skip to main content

Rotary Encoder - How it works

Rotary encoder is a positional sensor which is used for determining the angular position of a rotating shaft, and generates an electrical output signal related to that position. Breakout board uses EC11E1534408 rotary encoder by ALPS When using an Qwiic version you are essentially communicating with an onboard ATTINY404 MCU via I2C communication.

ATTINY404 on the board
ATTINY404 on the board

Datasheet

For an in-depth look at technical specifications, refer to the official EC11E1534408 Datasheet:

EC11E1534408 Datasheet

Detailed technical documentation for the EC11E1534408 sensors


How the encoder works

Rotary encoder contains a disc of evenly spaced contact zones that rotate with the shaft. Contact zones are connected to the common pin. When the disk starts rotating, the pins also start making contact with the common pin and the two square wave otput signals are created accordingly. Any of the two outputs can be used to determine the rotated position by counting the pulses, but to determine the direction of rotation both signals need to be considered. Output signals are displaced at 90 degrees out of phase from each other.

Conceptual drawing of a rotary incremental encoder
Conceptual drawing of a rotary incremental encoder
Conceptual drawing of output signals
Conceptual drawing of output signals

I2C communication - Qwiic

Qwiic versions of the product use onboard ATTINY404 MCU to implement I2C communication. Breakout board perates with a default I2C address of 0x30 but can be changed with onboard switches,to change breakout board's address, check the Address selection. When detected, ATTINY404 recives data from sensor and passes it to the main MCU using I2C data line. To check in detail how to ATTINY404 is preprogrammed, check firmware github page.