Digital Rotary Encoder Module with Knob Cap

1,500 د.ع

Add precise rotary control to your Arduino, ESP32, or STM32 projects with this Digital Rotary Encoder Module, a versatile input device that converts rotational motion into digital signals. Unlike traditional analog potentiometers, this encoder provides endless rotation with precise step-by-step position detection, making it ideal for menu navigation, volume control, parameter adjustment, and position sensing applications.

In stock

Compare
SKU: DIYS10840 Category:

Description

Digital Rotary Encoder Module – Rotating Potentiometer with Knob Cap

Add precise rotary control to your Arduino, ESP32, or STM32 projects with this Digital Rotary Encoder Module, a versatile input device that converts rotational motion into digital signals. Unlike traditional analog potentiometers, this encoder provides endless rotation with precise step-by-step position detection, making it ideal for menu navigation, volume control, parameter adjustment, and position sensing applications.

The module features an integrated push-button switch on the rotary shaft, allowing you to also use the encoder as a select button for user interface applications. The included knob cap provides a comfortable grip and visual position reference, while the onboard pull-up resistors simplify wiring by reducing the need for external components. The encoder operates on the principle of quadrature encoding, generating two square wave outputs (A and B) that allow the microcontroller to determine both the direction and amount of rotation.

Key Features

Quadrature Encoding Output

Provides two digital output signals (A and B) that allow the microcontroller to detect rotation direction (clockwise or counterclockwise) and count steps with high precision.

Built-in Push Button Switch

The rotary shaft includes a push-button function (SW pin), enabling dual functionality for selection, confirmation, or reset actions in menu-driven interfaces.

Endless Rotation

Unlike potentiometers with physical stops, this encoder can rotate continuously in either direction, making it perfect for applications requiring unlimited travel.

Onboard Pull-Up Resistors

Includes pull-up resistors on all signal lines, simplifying wiring and ensuring stable logic levels without external components.

Standard 5V and 3.3V Compatible

Operates at both 3.3V and 5V logic levels, making it compatible with Arduino, ESP32, Raspberry Pi, STM32, and other popular development boards.

Easy Breadboard Mounting

Standard 2.54mm pin spacing allows for easy integration into breadboards, perfboards, and PCBs for rapid prototyping.

Knob Cap Included

Comes with a colored knob cap for comfortable operation and visual position reference.

Specifications

  • Encoder Type: Incremental Rotary Encoder

  • Resolution: 20 pulses per revolution (typical)

  • Output Signals: 2-channel quadrature (A and B)

  • Push Button: Yes (integrated into shaft)

  • Operating Voltage: 3.3V – 5V DC

  • Logic Output: TTL compatible

  • Pull-Up Resistors: Onboard (10kΩ typical)

  • Operating Temperature: -40°C to +85°C

  • Dimensions: Approximately 30mm x 20mm x 25mm (including knob)

  • Mounting: 2.54mm pin header

Pin Configuration

Pin Function Description
CLK (A) Output A Quadrature output A (phase A)
DT (B) Output B Quadrature output B (phase B)
SW Push Button Output goes low when knob is pressed
+ VCC 3.3V – 5V DC power
GND Ground Common ground

Wiring Diagram

Arduino Connection

text
Rotary Encoder Module          Arduino Uno
---------------------          -----------
CLK (A)            ----->      Digital Pin 2
DT (B)             ----->      Digital Pin 3
SW                 ----->      Digital Pin 4
VCC (+)            ----->      5V
GND (-)            ----->      GND

Arduino Code Example

cpp
const int clkPin = 2;   // CLK (A) pin
const int dtPin = 3;    // DT (B) pin
const int swPin = 4;    // Push button pin

int counter = 0;
int currentStateCLK;
int lastStateCLK;

void setup() {
  Serial.begin(9600);
  
  pinMode(clkPin, INPUT);
  pinMode(dtPin, INPUT);
  pinMode(swPin, INPUT_PULLUP);
  
  lastStateCLK = digitalRead(clkPin);
}

void loop() {
  currentStateCLK = digitalRead(clkPin);
  
  // Detect rotation
  if (currentStateCLK != lastStateCLK) {
    if (digitalRead(dtPin) != currentStateCLK) {
      counter++;  // Clockwise rotation
    } else {
      counter--;  // Counter-clockwise rotation
    }
    Serial.print("Position: ");
    Serial.println(counter);
  }
  lastStateCLK = currentStateCLK;
  
  // Detect button press
  if (digitalRead(swPin) == LOW) {
    Serial.println("Button pressed!");
    delay(200);  // Simple debounce
  }
}

Common Applications

  • Menu navigation and selection interfaces

  • Digital volume and tone controls

  • Motor speed and position control

  • Parameter adjustment in test equipment

  • User input for programmable devices

  • Position sensing in robotics

  • Frequency adjustment for signal generators

Package Contents

  • 1 x Digital Rotary Encoder Module

  • 1 x Knob Cap


وحدة مشفر دوار رقمي – مقياس جهد دوار مع غطاء مقبض

أضف تحكمًا دوارًا دقيقًا لمشاريع Arduino أو ESP32 أو STM32 الخاصة بك باستخدام وحدة المشفر الدوار الرقمي، وهو جهاز إدخال متعدد الاستخدامات يحول الحركة الدورانية إلى إشارات رقمية. على عكس مقاييس الجهد التماثلية التقليدية، يوفر هذا المشفر دورانًا لا نهائيًا مع كشف موضع دقيق خطوة بخطوة، مما يجعله مثاليًا للتنقل في القوائم والتحكم في مستوى الصوت وضبط المعلمات وتطبيقات استشعار الموضع.

تتميز الوحدة بمفتاح ضغط مدمج على عمود الدوران، مما يسمح لك أيضًا باستخدام المشفر كزر تحديد لتطبيقات واجهة المستخدم. يتضمن غطاء المقبض المرفق قبضة مريحة ومرجع موضع بصري، بينما تعمل مقاومات السحب المدمجة على تبسيط الأسلاك عن طريق تقليل الحاجة إلى مكونات خارجية. يعمل المشفر على مبدأ التشفير الرباعي، مما يولد مخرجين من الموجات المربعة (A و B) يسمحان للمتحكم الدقيق بتحديد كل من اتجاه وكمية الدوران.

المميزات الرئيسية

خرج ترميز رباعي

يوفر إشارتي خرج رقميتين تسمحان للمتحكم الدقيق باكتشاف اتجاه الدوران وعد الخطوات بدقة عالية.

مفتاح ضغط مدمج

يتضمن عمود الدوران وظيفة زر ضغط، مما يتيح وظيفة مزدوجة لأعمال التحديد أو التأكيد أو إعادة الضبط في الواجهات المعتمدة على القوائم.

دوران لا نهائي

على عكس مقاييس الجهد ذات التوقفات الفيزيائية، يمكن لهذا المشفر الدوران باستمرار في أي اتجاه، مما يجعله مثاليًا للتطبيقات التي تتطلب حركة غير محدودة.

مقاومات سحب مدمجة

تتضمن مقاومات سحب على جميع خطوط الإشارة، مما يبسط الأسلاك ويضمن مستويات منطق مستقرة بدون مكونات خارجية.

متوافق مع 5V و 3.3V

يعمل مع مستويات منطق 3.3V و 5V، مما يجعله متوافقًا مع Arduino و ESP32 و Raspberry Pi و STM32 ولوحات التطوير الشهيرة الأخرى.

تركيب سهل على لوحة التجارب

تباعد دبابيس 2.54 مم قياسي يسمح بسهولة التكامل في لوحات التجارب ولوحات التوصيل و PCBs للنمذجة الأولية السريعة.

غطاء مقبض مضمن

يأتي مع غطاء مقبض ملون للتشغيل المريح ومرجع موضع بصري.

المواصفات الفنية

  • نوع المشفر: مشفر دوار تزايدي

  • الدقة: 20 نبضة لكل دورة

  • إشارات الخرج: قناتان

  • زر الضغط: نعم

  • جهد التشغيل: 3.3V – 5V

  • مقاومات السحب: مدمجة

  • درجة حرارة التشغيل: -40 درجة مئوية إلى +85 درجة مئوية

  • الأبعاد: حوالي 30 مم × 20 مم × 25 مم

تكوين الدبابيس

الدبوس الوظيفة
CLK (A) خرج A
DT (B) خرج B
SW زر الضغط
+ طاقة 3.3V-5V
GND أرضي

كود Arduino مثال

cpp
const int clkPin = 2;
const int dtPin = 3;
const int swPin = 4;

int counter = 0;
int lastStateCLK;

void setup() {
  Serial.begin(9600);
  pinMode(clkPin, INPUT);
  pinMode(dtPin, INPUT);
  pinMode(swPin, INPUT_PULLUP);
  lastStateCLK = digitalRead(clkPin);
}

void loop() {
  int currentStateCLK = digitalRead(clkPin);
  
  if (currentStateCLK != lastStateCLK) {
    if (digitalRead(dtPin) != currentStateCLK) {
      counter++;
    } else {
      counter--;
    }
    Serial.print("Position: ");
    Serial.println(counter);
  }
  lastStateCLK = currentStateCLK;
  
  if (digitalRead(swPin) == LOW) {
    Serial.println("Button pressed!");
    delay(200);
  }
}

التطبيقات الشائعة

  • واجهات التنقل في القوائم والاختيار

  • التحكم الرقمي في مستوى الصوت والنغمات

  • التحكم في سرعة المحرك وموضعه

  • ضبط المعلمات في معدات الاختبار

  • التحكم في موضع الروبوتات

  • ضبط التردد لمولدات الإشارات

محتويات العلبة

  • 1 × وحدة مشفر دوار رقمي

  • 1 × غطاء مقبض

Reviews

There are no reviews yet

Be the first to review “Digital Rotary Encoder Module with Knob Cap”

Your email address will not be published. Required fields are marked *