KY-040 Rotary Encoder with Switch Module

In stock

The KY-040 Rotary Encoder is a mechanical incremental encoder that converts rotational position and direction into electrical signals. Designed with a 360-degree mechanical angle and a built-in knob, it is ideal for precise control of motors such as steppers and servos. It is commonly used in automation systems, robotic interfaces, and user input controls. ...See more
SKU BTS-00005102
SF Code M2.R2
Tags: Modules
Write Your Own Review
Only registered users can write reviews. Please Sign in or create an account

The KY-040 Rotary Encoder is a mechanical incremental encoder that converts rotational position and direction into electrical signals. Designed with a 360-degree mechanical angle and a built-in knob, it is ideal for precise control of motors such as steppers and servos. It is commonly used in automation systems, robotic interfaces, and user input controls.

 

Specifications:

  • Operating Voltage: 5V DC

  • Mechanical Rotation Angle: 360° (continuous rotation)

  • Output Format: 2-bit Gray code (quadrature output)

  • Positions Per Revolution: 30 detents (steps)

  • Output Type: Digital square wave pulses

  • Shaft Type: With detents for tactile feedback

  • Switch Type: No integrated push-button switch

 

Pin Configuration:

The KY-040 module includes five pins for power and signal transmission. Below is the pin description:

Pin Label Function
CLK Encoder Signal A (Channel A)
DT Encoder Signal B (Channel B)
SW Not connected (no switch)
VCC Voltage Input (+5V)
GND Ground (common pin C)
 
 

Working Principle:

The KY-040 encoder works by generating two square wave signals (channels A and B) as the knob rotates. These signals are offset from each other and represent incremental changes in the encoder’s position. The phase difference between the signals determines the direction of rotation:

  • If Channel A leads Channel B, the encoder is rotating clockwise.

  • If Channel B leads Channel A, the encoder is rotating counter-clockwise.

By counting the pulses and determining the signal sequence, a microcontroller can measure both rotation and direction.

 

Wiring Instructions:

To interface the KY-040 with a microcontroller:

  • VCC → Connect to +5V supply on MCU/MPU

  • GND → Connect to ground on MCU/MPU

  • CLK → Connect to digital input pin on MCU

  • DT → Connect to another digital input pin on MCU

The encoder generates digital pulses, so standard interrupt-based or polling methods can be used for signal reading and position tracking.

 

Applications:

  • Rotary input control in embedded user interfaces

  • Robotic arm positioning and feedback

  • Servo or stepper motor precision control

  • Menu navigation for digital devices

  • Industrial automation controls

arrow-down
See More
View all reviews above by our customers.

You might also be interested in...

Customers who bought this also bought...

General Questions

  • What is the latest price of the KY-040 Rotary Encoder with Switch Module in Bangladesh?

    The latest price of KY-040 Rotary Encoder with Switch Module in Bangladesh is BDT 125.00 . You can buy the KY-040 Rotary Encoder with Switch Module at the best price on BDTronics.com or contact us via phone.

  • Where to buy KY-040 Rotary Encoder with Switch Module in Bangladesh?

    You can buy KY-040 Rotary Encoder with Switch Module online by ordering on BDTronics.com or directly collect by visiting our store in person. BDTronics is a trusted provider of high-quality electronics, 3D printers, solar systems, and robotics parts. We offer fast shipping across the country via courier service.

  • What are the delivery options of KY-040 Rotary Encoder with Switch Module in Bangladesh?

    We provide home delivery service all over Bangladesh. We support Cash on Delivery, Online Bank Transfer, bKash and Credit Card (Visa/ MasterCard/ Amex) payment solutions. The delivery time usually takes 1-2 days inside Dhaka and 2-4 days outside Dhaka.

phone
Contact

My Cart

Loading...
home Home
menu Menu
user Account shopping-cart Cart