How To Test Rotary Encoder Using Arduino Uno

Did you worrying about The rotary encoder is working properly or not ? Don’t worry here is the proper tutorial about how to troubleshoot rotary encoder. You can easily test your rotary encoder using Arduino Uno or Nano. so Follow through all the steps don’t skip anything lets we do together.

Rotary encoder
Rotary encoder

Rotary Encoder Troubleshooting

First you needs to connect the rotary encoder pins to the Arduino. The clear image of Arduino rotary encoder wiring has to be given below. study the connections properly and don’t connect the wires on any other pin in the Arduino. properly connect the rotary encoder pins using male to female pins, much easiest way.

Rotary encoder pinout

Explaining about the pinout of rotary encoder, The rotary encoder module contains a 5 pin connections which are

rotary encoder pinout
Rotary encoder pinout
PINOUTFUNCION
CLKCONTACT B OUTPUT CLOCK
DTCONTACT A OUTPUT DATA
SWOUTPUT OF INTERNAL BUTTON
+VECONNECTING 5V +VE SUPPLY
GNDCONNECTED TO GROUND
Rotary encoder pinout

Rotary encoder specification

The rotary encoder having the specifications of

  • 360 degree free rotation has to be possible.
  • 20 steps of means cycles per revolution.
  • This is a incremental type of encoder.
  • Easy interface has to be providing
  • Long life as comparing with other electronic components like liner pot.

Troubleshooting Arduino code For Programming

Connect CLK to the 2, DT to 3, SW to 4 the pin of the Arduino. and next install the code and click on the serial monitor and rotate the encoder to see the working.

Working: Block diagram

type of rotary encoder
type of rotary encoder

Akhil Satheesh

Akhil Satheesh

Akhil Satheesh is an electronics expert and the Founder and CEO of Soldering Mind. Specializes in designing innovative electronic circuits and custom, high-performance PCB layouts. Every project he shares on solderingmind.com is rigorously bench-tested to ensure accuracy for makers and hobbyists alike.

One comment

Leave a Reply

  1. Dear Sir/ Madam,

    kindly can you inform me what is the resolution of the above rotary encoder in bits?
    Thank you