Skip to Content

Rotary Encoder EC11 Audio Digital Potentiometer

This is a high-quality 24-pulse rotary encoder with detents and a satisfying tactile feel. It can be panel-mounted for enclosure applications or used on a breadboard by trimming or bending the side tabs. The encoder also features a pushbutton switch activated by pressing the knob.

Package Includes:

  • 1 x Rotary Encoder Code Switch EC11

6.30 AED 6.30 AED Tax Included
6.30 AED Tax Included

Not Available For Sale

This combination does not exist.

Rotary Encoder

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

 

Features:

  • Continuous rotary operation
  • Integrated push-button switch (push to operate)
  • Useful for data input like volume control, power control, and menu navigation
  • Ideal for use with PIC or ATMEL microcontrollers

 

Principle of Work:

A slotted disc connected to the common ground pin (C) interacts with two contact pins (A and B). As the knob is rotated, A and B sequentially make contact with ground, generating quadrature signals 90° out of phase. This allows for determining the rotation direction.

Internal Structure of Rotary Encoder

If pin B ≠ A when A changes, the rotation is clockwise.

Clockwise Rotation Encoder Output Pulses

If pin B = A when A changes, the rotation is counterclockwise.

Pinout of the Module:

Rotary Encoder Pinout

Pin Type Description
OutA Encoder Pin A
OutB Encoder Pin B
Switch Push-button switch
GND Ground

Applications:

  • Robotic arm controller
  • Servo and stepper motor control
  • Precise motor movement

Circuit:

Connect sensor ground to GND. Connect outA and outB through 220Ω resistors to VCC, and read their signals at pin 6 and 7 respectively.

Encoder Circuit Diagram

Library:

No library is required.

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;
}

Upload the code, open the Serial Monitor, and rotate the encoder to observe the position data. Each full cycle produces 30 counts on this module.

Technical Details:

  • Rotary Shaft Length: Approx. 12mm
  • Shaft Full Length: Approx. 20mm
  • Shaft Diameter: Approx. 6mm
  • Size (L x W): Approx. 15 x 11mm
  • Output: 2-bit gray code
  • Closed Circuit Resistance: 3 ohms max
  • Max Rating: 10 mA @ 5 VDC
  • Operating Temperature: -30 to 70°C
  • Storage Temperature: -40 to 85°C
  • Rotational Life: Minimum 30,000 cycles
  • Switch Life: Minimum 20,000 cycles

Resources:

  • Tutorial

Comparisons:

Rotary encoders offer 360° rotation, unlike potentiometers that are limited to ~270°. Potentiometers provide absolute position feedback, while encoders track relative position changes. This module requires external resistors, unlike some pre-assembled modules that integrate them.