Not a member yet? Register now and get started.

lock and key

Sign in to your account.

Account Login

Forgot your password?

Using Rotary Encoder

Integrating a Rotary Encoder with the 16 bit Micro Experimenter

Another type of input device is the mechanical rotary encoder that allows the microcontroller to read both direction and count the number rotations and also rate of turns from a single user input device. Rotary encoders find application as rapid input device to do a variety of selections: setting parameters, selecting a menu items, entering data.

These photos show the 16 bit Experimenter running a demo program with a Spark Fun Rotary Encoder . The demo automatically updates the LCD with current rotation count ( CW is positive, CCW negative). The left photo displays the result of 11 clockwise turns, the right display then shows the result of turning 22 turns counter clockwise.

(Click images for full screen)

Download Demo Software

A schematic for interconnection of the rotary encoder to the Experimenter is shown. This particular encoder also has a built in single pole single throw switch that is closed when you press down on the knob.

(Click images for full screen)

There is some assembly required see photos below. The rotary encoder is mounted on vector board ( source RADIO Shack) with .1 headers for insertion into a solder less breadboard.

A knob was purchased separately.

(Click images for full screen)