Codey OnlineArduino & ESP32 component library › Rotary Encoder module
Rotary Encoder module
Sensors

Rotary Encoder module

A rotary encoder module converts mechanical rotation into electrical pulses using quadrature (two phase-shifted signals, typically A and B) to determine both step count and rotation direction. It is commonly interfaced to an Arduino/ESP32 with digital inputs (often using interrupts for fast response). Many encoder modules also include a momentary push-button that can be read as an additional input.

Width: 34.6 mm

Pinout — Rotary Encoder module

Pin Signal Description
CLK digital Rotary encoder phase A pulse output for counting steps and direction.
DT digital Rotary encoder phase B pulse output, phase-shifted from CLK for direction sensing.
SW digital Momentary push-button switch output, typically read as a digital input.
+ power Positive supply input for the encoder module, commonly connected to 5V or 3.3V.
GND ground Ground reference for power and all encoder output signals.

Related components

18650 Battery Shield with USB-C Charger and 5V Boost Converter

18650 Battery Shield with USB-C Charger and 5V Boost Converter

2.4 inch OLED Display I2C 3.3V

2.4 inch OLED Display I2C 3.3V

3.5 inch TFT LCD Shield

3.5 inch TFT LCD Shield

50kg Load Cell Weight Sensor

50kg Load Cell Weight Sensor

Build your Arduino or ESP32 project with AI

Describe what you want to build. Codey Online writes the code, draws the wiring diagram, compiles it and flashes your board straight from the browser.

Start for free