








The KY-040 Rotary Encoder Module is a 360° rotational input device used to detect rotation direction, position, and button press actions. It provides 20 pulses per revolution with tactile clicking positions for accurate control. The module includes a built-in push button switch and operates at 5V. It is commonly used in menu navigation, motor control, volume adjustment, and digital control systems for Arduino and other microcontroller projects.
وحدة KY-040 Rotary Encoder هي جهاز إدخال دوّار بزاوية 360 درجة يُستخدم لاكتشاف اتجاه الدوران وعدد الخطوات بالإضافة إلى وظيفة الضغط على الزر. توفر 20 نبضة لكل دورة كاملة مع إحساس بالنقرات لسهولة التحكم. تعمل بجهد 5 فولت وتحتوي على زر ضغط مدمج. تُستخدم في التحكم بالمحركات، القوائم الإلكترونية، تعديل الصوت، وأنظمة التحكم الرقمية مع الأردوينو والمتحكمات الدقيقة.
The KY-040 Rotary Encoder Module is an electronic input device designed to detect rotational movement and direction. Unlike traditional potentiometers, the encoder can rotate continuously through 360 degrees without stopping, making it ideal for precise digital control applications.
The module generates electrical pulses while rotating. By monitoring the sequence of signals from output pins A and B, a microcontroller can determine both the amount of rotation and the direction of movement. If signal A changes before B, the rotation is clockwise; if B changes first, the rotation is counterclockwise.
The encoder provides 20 tactile positions per revolution, allowing users to feel physical clicks during rotation for better accuracy and user feedback.
A built-in push button switch is integrated into the shaft. Pressing the shaft activates the switch connected to the SW pin, enabling additional control functions such as selection, reset, mode switching, or power control.
The module is widely compatible with Arduino, Raspberry Pi, ESP32, STM32, and other microcontroller platforms operating at 5V.