Rectronx Circuits
Components

KY-040 Rotary Encoder Module

Rotary knob input module for menus, counters and adjustment controls.

Rotary Input4.5/5RM3-RM10Beginner
ArduinoESP32Raspberry Pi Pico
KY-040 Rotary Encoder Module electronics module illustration

AI Ready Overview

Quick Summary

KY-040 Encoder is a rotary input commonly used in FYP and embedded projects. It is best for menu control and setpoint adjustment, with wiring and testing planned around Arduino, ESP32, Raspberry Pi Pico.

Difficulty

Beginner

Time Required

1-3 days for basic wiring and sample code; 1 week if used inside a complete FYP prototype

Cost

RM3-RM10 module range in Malaysia; full project cost depends on scope.

Components

KY-040 Encoder, Arduino, ESP32, Raspberry Pi Pico

Overview

What is KY-040 Encoder?

KY-040 rotary encoders provide incremental rotation and a push button. They are useful for embedded menus, setting values and manual counter controls.

Engineering Reference

Quick Specs

Operating Voltage3.3V / 5V
InterfaceDigital, GPIO
DifficultyBeginner
Typical Malaysia PriceRM3-RM10
Best ForMenu control, Setpoint adjustment

Real Usage Notes

Suitable / Not Suitable

Suitable for

  • Menu control
  • Setpoint adjustment
  • Counter input

Not suitable for

  • Absolute angle measurement
  • High-speed shaft feedback
  • No-debounce software

Build Planning

Difficulty

KY-040 Encoder is rated Beginner. Plan around 1-3 days for basic wiring and sample code; 1 week if used inside a complete fyp prototypedepending on wiring, libraries, calibration, dashboard/app integration and testing evidence.

Build Planning

Time Required

1-3 days for basic wiring and sample code; 1 week if used inside a complete FYP prototype

Malaysia Price Guidance

Cost

Typical module price range: RM3-RM10. This is component guidance only; a complete FYP cost depends on controller, sensors, casing, display, app/dashboard, documentation and timeline.

Connections

Pinout

VCC

Power input. Check whether the module expects 3.3V or 5V before wiring.

GND

Common ground with the controller and external supply.

Digital

Main Digital connection used by the module.

IO

Additional signal pins depend on the exact module variant.

Platform Notes

Wiring Guides

KY-040 Encoder with Arduino / ESP32

Connect power, ground and the Digital / GPIO signal lines. Use level shifting when a 5V module connects to a 3.3V controller.

KY-040 Encoder VCC5V or module-rated supply
KY-040 Encoder GNDController GND
Signal pinsDigital, GPIO

Fix Common Problems

Troubleshooting

Check wiring against the pinout before debugging code.
Use a stable power supply and common ground between modules.
Test the component with a simple example sketch before adding dashboard, app or database features.

Troubleshooting

Common Mistakes

No debounce handling
Confusing CLK/DT direction
Expecting absolute position

FYP Ideas Using KY-040 Encoder

Related Projects

Compare Options

Alternative Components

Student Questions

FAQ

Is KY-040 Encoder good for FYP projects?

Yes, KY-040 Encoder is suitable for FYP work when the project matches its limits: Menu control and Setpoint adjustment.

What is the most common KY-040 Encoder mistake?

No debounce handling