top of page
Rotary Encoder Module

Rotary Encoder Module

₹46.00Price

🧠 What is it?

A Rotary Encoder Module is a device that converts rotational movement (turning a knob) into digital signals.

👉 It is commonly used for:

  • Volume control

  • Menu navigation

  • Position tracking

Most Arduino modules use a mechanical incremental encoder like the KY-040 Rotary Encoder.

⚙️ How It Works

A rotary encoder does not measure angle directly like a potentiometer.
Instead, it detects steps (increments) and direction.

Internal Working:

  • Inside are two output signals: A and B

  • These signals are out of phase (quadrature signals)

👉 By analyzing which signal changes first, we determine direction.

🔄 Quadrature Signal Concept

👉 This phase difference helps detect:

  • Clockwise rotation

  • Counterclockwise rotation

🔌 Pin Configuration

Typical module pins:

PinFunction
CLKSignal A (clock)
DTSignal B (data)
SWPush button (when knob pressed)
VCCPower (3.3V–5V)
GNDGround

🔄 Working Flow

Knob Rotated

Internal Contacts Change

A & B Signals Generated

Microcontroller Reads Sequence

Direction + Steps Determined

🧠 Types of Rotary Encoders

1. Incremental Encoder (most common)

  • Gives step-by-step changes

  • Used in Arduino modules

2. Absolute Encoder

  • Gives exact position

  • Used in industrial systems

📊 Key Specifications

  • Operating voltage: 3.3V – 5V

  • Output: Digital pulses

  • Built-in push button

  • Steps per revolution: typically 20–30 clicks

🚀 Applications

  • 🔊 Volume control knobs

  • 📺 Menu navigation (TV, LCD UI)

  • 🤖 Robotics position tracking

  • 🖥️ CNC and motor control

  • 🎛️ User interface controls

✅ Advantages

  • Unlimited rotation (unlike potentiometer)

  • Detects direction + steps

  • Durable and reliable

  • Built-in button adds functionality

⚠️ Limitations

  • Mechanical bouncing (needs debouncing)

  • Limited resolution

  • Requires code logic to interpret signals

🔌 Arduino Connection

  • CLK → Digital pin (e.g., D2)

  • DT → Digital pin (e.g., D3)

  • SW → Digital pin (optional)

  • VCC → 5V

  • GND → GND

💡 Example Use

Menu control system:

  • Rotate → move up/down menu

  • Press button → select option

🔍 Practical Tips

  • Use interrupt pins for better accuracy

  • Add debouncing (software or hardware)

  • Keep wiring short to avoid noise

🔁 Encoder vs Potentiometer

FeatureEncoderPotentiometer
RotationInfiniteLimited
OutputDigital pulsesAnalog voltage
PrecisionStep-basedContinuous

🧪 Real-Life Example

In a music system:

  • Turning knob → volume increases/decreases

  • Pressing knob → mute/unmute

Quantity
bottom of page