KY-040 Rotary Encoder Module with Push Button for Arduino
Price in USD, tax calculated at checkout. Free U.S. shipping when your cart reaches $39.
Add $0.74 more for free U.S. shipping
Ships in 1–3 business days. Delivered in 7–15 business days across the U.S. Under $39, a flat $8.99.
30-day returns
Changed your mind? Send it back unused for a refund to your original payment.
Secure checkout
Description
Add a knob and a click button to your Arduino projects.
The KY-040 rotary encoder module gives your Arduino build a turnable knob with a built-in push button. It is a handy way to add menu navigation, volume control or value adjustment to a DIY electronics project without building the circuit from scratch.
Why You'll Love It
- Turn to adjust: The rotary shaft lets you step a value up or down with each turn, ideal for settings and menus.
- Press to select: The integrated push button adds a second input, so one module can handle both turning and confirming.
- Easy mounting: The threaded bushing and nut let you fix the encoder to a panel or enclosure.
- Clear pin layout: The labelled header pins make it straightforward to wire up to a microcontroller.
- Compact board: A small PCB keeps your project tidy and easy to fit into tight spaces.
Product Details
- Type: Rotary encoder with push button
- Board: Small black PCB with five header pins
- Mounting: Threaded bushing with nut
- Pull-up resistors on board: three 10K resistors (R1, R2, R3)
What's in the Box
- 1 x KY-040 rotary encoder module
How to Use
- Mount the encoder through a panel hole and secure it with the nut.
- Connect the header pins to your Arduino, such as CLK, DT, SW, +, and GND.
- Read the rotation direction and push button state in your sketch.
Good to Know
This module is intended for use with Arduino and similar microcontrollers. Check the pin labels on your board before wiring, as pin order can vary between versions. Rotation is detected as clicks, so count steps in your code rather than expecting a continuous reading.
FAQ
Do I need to solder this module?
The module has header pins, so you can connect it with jumper wires. Soldering is only needed if you want a permanent connection.
Can I use it to control volume?
Yes. Turning the knob can increment or decrement a value in your code, which is a common way to control volume or brightness in a project.
Shipping
Free U.S. shipping on orders from $39. Orders under $39 ship for a flat $8.99.
We pack and ship within 1–3 business days. Delivery takes 7–15 business days anywhere in the United States, with a tracking link by email as soon as it leaves.
Returns
Return anything within 30 days of delivery for a full refund to your original payment method. Items must be unused and in their original packaging. Damaged or wrong item? We cover the return.







