EC12 RGB Rotary Encoder 24 Detent
5,000 د.ع
Add precision control and stunning RGB lighting effects to your Arduino, ESP32, or STM32 projects with this EC12 RGB Illuminated Rotary Encoder, a versatile input device combining an incremental rotary encoder with a built-in push-button switch and multicolor RGB LED illumination. This 24-detent encoder provides tactile feedback with each step, making it ideal for menu navigation, volume control, parameter adjustment, position sensing, and creating visually engaging user interfaces for automotive electronics, audio equipment, and DIY control panels.
In stock
CompareDescription
EC12 RGB Illuminated Rotary Encoder – Push Switch, Incremental, 24 Detents with LED Shaft
Add precision control and stunning RGB lighting effects to your Arduino, ESP32, or STM32 projects with this EC12 RGB Illuminated Rotary Encoder, a versatile input device combining an incremental rotary encoder with a built-in push-button switch and multicolor RGB LED illumination. This 24-detent encoder provides tactile feedback with each step, making it ideal for menu navigation, volume control, parameter adjustment, position sensing, and creating visually engaging user interfaces for automotive electronics, audio equipment, and DIY control panels.
Unlike standard potentiometers, this incremental encoder offers endless 360-degree rotation with precise step-by-step position detection through quadrature output signals. The integrated push-button switch on the rotary shaft adds selection capability for intuitive user interaction, while the illuminated shaft with RGB LED provides customizable visual feedback for status indication, position tracking, or aesthetic effects. The through-hole mounting design with standard 6mm shaft diameter fits easily into breadboards, PCBs, and panel mounts.
Key Features
RGB Illuminated Shaft
Features a built-in common anode RGB LED that illuminates the transparent encoder shaft, allowing customizable colors for status indication, position feedback, or aesthetic lighting effects.
24 Detents per Rotation
Provides 24 distinct detent positions per full revolution, giving tactile feedback with each step for precise manual control and accurate position sensing.
Incremental Quadrature Output
Outputs two-phase digital signals that allow the microcontroller to detect both rotation direction and step count with high precision.
Integrated Push-Button Switch
The rotary shaft includes a push-button function, enabling dual functionality for selection, confirmation, or reset actions in menu-driven interfaces without additional components.
Endless 360-Degree Rotation
Unlike potentiometers with physical stops, this encoder can rotate continuously in either direction, making it perfect for applications requiring unlimited travel and relative position control.
Through-Hole PCB Mounting
Standard 6mm bushing fits standard panel cutouts, while the 5-pin configuration allows easy PCB integration.
5V DC Operation
Operates at 5V DC with low current consumption, making it compatible with Arduino, ESP32, STM32, and other popular microcontroller platforms.
30,000 Cycle Life
Rugged design rated for up to 30,000 rotational cycles, ensuring long-term durability for high-use applications.
Specifications
| Parameter | Value |
|---|---|
| Encoder Type | Incremental (Quadrature) |
| Detent Count | 24 detents per revolution |
| Pulse Count | 24 pulses per revolution |
| Operating Voltage | 5V DC |
| Output Signals | 2-channel quadrature |
| Push Button | Integrated (momentary) |
| LED Type | Common anode RGB |
| Shaft Diameter | 6mm |
| Shaft Length | 20mm (typical) |
| Mounting Type | Through-Hole |
| Rotational Life | 30,000 cycles |
| Operating Temperature | -10°C to +70°C |
Pin Configuration
| Pin | Function | Description |
|---|---|---|
| A | Encoder Output A | Quadrature output A – connect to microcontroller digital input |
| B | Encoder Output B | Quadrature output B – connect to microcontroller digital input |
| SW | Push Button Output | Momentary switch output (active low when pressed) |
| LED+ | LED Common Anode | Connect to 5V for common anode RGB LED configuration |
| LED- | LED Cathodes | RGB control pins (connect to microcontroller PWM pins) |
Wiring Diagram
Arduino Connection
EC12 RGB Encoder Arduino Uno ----------------- ----------- A (Phase A) -----> Digital Pin 2 B (Phase B) -----> Digital Pin 3 SW -----> Digital Pin 4 (with INPUT_PULLUP) LED+ (Common) -----> 5V LED-R (Red) -----> Digital Pin 5 (PWM) LED-G (Green) -----> Digital Pin 6 (PWM) LED-B (Blue) -----> Digital Pin 7 (PWM) GND -----> GND
Arduino Code Example
const int encPinA = 2; const int encPinB = 3; const int swPin = 4; const int ledR = 5; const int ledG = 6; const int ledB = 7; volatile int encoderPos = 0; int lastEncoded = 0; bool buttonPressed = false; void setup() { Serial.begin(115200); pinMode(encPinA, INPUT_PULLUP); pinMode(encPinB, INPUT_PULLUP); pinMode(swPin, INPUT_PULLUP); pinMode(ledR, OUTPUT); pinMode(ledG, OUTPUT); pinMode(ledB, OUTPUT); attachInterrupt(digitalPinToInterrupt(encPinA), updateEncoder, CHANGE); attachInterrupt(digitalPinToInterrupt(encPinB), updateEncoder, CHANGE); Serial.println("EC12 RGB Encoder Ready"); } void updateEncoder() { int MSB = digitalRead(encPinA); int LSB = digitalRead(encPinB); int encoded = (MSB << 1) | LSB; int sum = (lastEncoded << 2) | encoded; if (sum == 0b1101 || sum == 0b0100 || sum == 0b0010 || sum == 0b1011) { encoderPos++; } else if (sum == 0b1110 || sum == 0b0111 || sum == 0b0001 || sum == 0b1000) { encoderPos--; } lastEncoded = encoded; } void setLEDColor(int r, int g, int b) { analogWrite(ledR, r); analogWrite(ledG, g); analogWrite(ledB, b); } void loop() { Serial.print("Position: "); Serial.println(encoderPos); if (digitalRead(swPin) == LOW && !buttonPressed) { buttonPressed = true; Serial.println("Button Pressed!"); setLEDColor(255, 255, 255); delay(200); setLEDColor(0, 0, 0); } else if (digitalRead(swPin) == HIGH) { buttonPressed = false; } int hue = (encoderPos * 10) % 255; setLEDColor(hue, 255 - hue, 127); delay(50); }
Common Applications
Automotive audio system controls and volume knobs
Menu navigation for LCD/OLED displays
Digital volume and tone controls for audio equipment
Parameter adjustment for test and measurement instruments
Position sensing for CNC machines
Industrial control panel HMI
Installation Guide
Mechanical Installation
Drill a 6mm hole in your panel
Insert the encoder shaft through the mounting hole from the front
Secure with the included mounting nut and lock washer
PCB Mounting
Position the encoder with pins aligned to 2.54mm pitch holes
Solder all 5 pins securely
Ensure the encoder sits flush against the PCB surface
Important Usage Notes
Always use external pull-up resistors or enable internal pull-ups for encoder outputs
For reliable rotation detection, use interrupt pins or poll at high frequency
The RGB LED requires current-limiting resistors on each cathode pin
The encoder is designed for panel mounting in dry environments
Avoid exceeding the maximum operating voltage of 5V
Package Contents
1 x EC12 RGB Illuminated Rotary Encoder
مشفر دوار مضيء RGB EC12 – مفتاح ضغط، متزايد، 24 درجة مع عمود LED
أضف تحكمًا دقيقًا وتأثيرات إضاءة RGB مذهلة إلى مشاريع Arduino أو ESP32 أو STM32 الخاصة بك باستخدام مشفر EC12 الدوار المضيء RGB، وهو جهاز إدخال متعدد الاستخدامات يجمع بين مشفر دوار متزايد مع مفتاح ضغط مدمج وإضاءة RGB متعددة الألوان. يوفر هذا المشفر ذو 24 درجة تغذية راجعة لمسية مع كل خطوة، مما يجعله مثاليًا للتنقل في القوائم والتحكم في مستوى الصوت وضبط المعلمات واستشعار الموضع وإنشاء واجهات مستخدم جذابة بصريًا.
على عكس مقاييس الجهد القياسية، يقدم هذا المشفر المتزايد دورانًا لا نهائيًا 360 درجة مع كشف موضع دقيق خطوة بخطوة من خلال إشارات الخرج الرباعية. يضيف مفتاح الضغط المدمج على العمود الدوار قدرة تحديد للتفاعل البديهي للمستخدم، بينما يوفر العمود المضيء بمصباح RGB تغذية راجعة بصرية قابلة للتخصيص.
المميزات الرئيسية
عمود مضيء RGB
يتميز بمصباح RGB مدمج بأنود مشترك يضيء عمود المشفر الشفاف، مما يسمح بألوان قابلة للتخصيص لمؤشرات الحالة أو تأثيرات الإضاءة الجمالية.
24 درجة لكل دورة
يوفر 24 موضع توقف متميز لكل دورة كاملة، مما يعطي تغذية راجعة لمسية مع كل خطوة للتحكم اليدوي الدقيق.
خرج رباعي متزايد
يخرج إشارات رقمية ثنائية الطور تسمح للمتحكم الدقيق باكتشاف كل من اتجاه الدوران وعدد الخطوات بدقة عالية.
مفتاح ضغط مدمج
يتضمن العمود الدوار وظيفة زر ضغط، مما يتيح وظيفة مزدوجة لأعمال التحديد أو التأكيد أو إعادة الضبط.
دوران 360 درجة لا نهائي
يمكن لهذا المشفر الدوران باستمرار في أي اتجاه، مما يجعله مثاليًا للتطبيقات التي تتطلب حركة غير محدودة.
المواصفات الفنية
| المعامل | القيمة |
|---|---|
| نوع المشفر | متزايد |
| عدد الدرجات | 24 درجة لكل دورة |
| جهد التشغيل | 5V |
| زر الضغط | مدمج |
| نوع LED | RGB أنود مشترك |
| قطر العمود | 6 مم |
| العمر الدوراني | 30,000 دورة |
تكوين الدبابيس
| الدبوس | الوظيفة |
|---|---|
| A | خرج A |
| B | خرج B |
| SW | زر الضغط |
| LED+ | أنود مشترك RGB |
| LED- | كاثودات RGB |
كود Arduino مثال
const int encPinA = 2; const int encPinB = 3; const int swPin = 4; volatile int encoderPos = 0; int lastEncoded = 0; void setup() { Serial.begin(115200); pinMode(encPinA, INPUT_PULLUP); pinMode(encPinB, INPUT_PULLUP); pinMode(swPin, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(encPinA), updateEncoder, CHANGE); attachInterrupt(digitalPinToInterrupt(encPinB), updateEncoder, CHANGE); } void updateEncoder() { int MSB = digitalRead(encPinA); int LSB = digitalRead(encPinB); int encoded = (MSB << 1) | LSB; int sum = (lastEncoded << 2) | encoded; if (sum == 0b1101 || sum == 0b0100 || sum == 0b0010 || sum == 0b1011) { encoderPos++; } else if (sum == 0b1110 || sum == 0b0111 || sum == 0b0001 || sum == 0b1000) { encoderPos--; } lastEncoded = encoded; } void loop() { Serial.print("Position: "); Serial.println(encoderPos); if (digitalRead(swPin) == LOW) { Serial.println("Button Pressed!"); } delay(100); }
التطبيقات الشائعة
واجهات التحكم في الصوت والملاحة بالقوائم
التحكم الرقمي في مستوى الصوت
واجهات المستخدم للأجهزة القابلة للبرمجة
التحكم في موضع آلات CNC
لوحات التحكم الصناعية
محتويات العلبة
1 × مشفر دوار مضيء RGB EC12






Reviews
There are no reviews yet