Skip to Content

Rotary Encoder Module RobotDYN

The RobotDYN Rotary Encoder Module is a precision position sensor that converts the rotational movement of a knob into digital signals. It allows full 360° continuous rotation without mechanical limits, making it ideal for applications where detecting movement direction and step count is required rather than absolute position. This module operates at 5V and provides 24 positions per revolution. It also includes an integrated push-button switch, expanding its functionality for menu selection, parameter adjustment, and embedded control systems.

Package Includes

  • 1 × RobotDYN Rotary Encoder Module
Rotary Encoder
9.45 AED 9.45 AED (Tax included)

Terms and Conditions
30-day money-back guarantee
Shipping: 2-3 Business Days

 

Features

  • 24 steps per revolution (24 PPR)
  • Full 360° continuous rotation
  • Built-in push-button switch (SW pin)
  • 5V operating voltage
  • Quadrature output (2-bit Gray code)
  • Onboard power indicator LED

Specifications

  • Operating Voltage: 5V DC
  • Mechanical Angle: 360° continuous
  • Positions per Revolution: 24
  • Output Signal: 2-bit Gray code (CLK and DT)
  • Integrated Push Button: Yes (SW)

Working Principle

Inside the encoder, a slotted disc connects to the common ground (C). Two output pins (A and B) generate signals as the shaft rotates.

The signals from pins A and B are 90° out of phase (quadrature encoding). The order in which these signals change determines the direction of rotation:

  • If B ≠ A when A changes → Clockwise rotation
  • If B = A when A changes → Counterclockwise rotation

By monitoring these transitions, a microcontroller can determine both direction and position increment/decrement.

Pinout

RobotDyn Rotary encoder with button | LaskaKit

Pin Description
CLK Encoder Output A
DT Encoder Output B
SW Push Button Switch
VCC +5V Power Input
GND Ground (Common C)

Applications

  • Robotic arm control
  • Servo and stepper motor positioning
  • Menu navigation systems
  • CNC machines
  • Volume and parameter adjustment interfaces

Arduino Connection Example

  • VCC → 5V
  • GND → GND
  • CLK → Pin 6
  • DT → Pin 7
  • SW → Optional digital pin

Arduino Example Code

#define outputA 6
#define outputB 7

int counter = 0;
int aState;
int aLastState;

void setup() {
  pinMode(outputA, INPUT);
  pinMode(outputB, INPUT);
  Serial.begin(9600);
  aLastState = digitalRead(outputA);
}

void loop() {
  aState = digitalRead(outputA);

  if (aState != aLastState) {
    if (digitalRead(outputB) != aState) {
      counter++;
    } else {
      counter--;
    }

    Serial.print("Position: ");
    Serial.println(counter);
  }

  aLastState = aState;
}

Library

No external library is required. The module works using standard Arduino digitalRead() functions to detect quadrature signals.

Comparison with Potentiometer

Unlike potentiometers, which have a limited rotation angle (typically 270°) and provide absolute position, rotary encoders rotate endlessly and detect relative movement. This makes them ideal for increment/decrement control applications rather than fixed position measurement.