Fork me on GitHub

Project Notes

#119 RotaryEncoderModule

Testing a Rotary Encoder module controlling an LED 8x8 display

Here’s a quick video of the circuit in action:

RotaryEncoderModule

Notes

In the RotaryEncoderMethods project I determined that the Rotary library was by far the best option for reading a rotary encoder.

This project is similar, but uses a rotary encoder “module” that includes switch functionality. The module I am using is this one from seller on aliexpress. The module has built-in 10kΩ pull-up resistors on the signal lines, and external connections as follows:

Label Use
CLK Trigger rotational read on falling edge
DT(DAT) When CLK triggered, DT pulled low for counter-clockwise, DT pulled high for clockwise
SW Switch output - pulls the output low when pressed
+ Upper supply rail (5V)
GND Ground

Note the CLK/DT nomenclature is just a simplification of the underlying workings of the rotary encoder. These pins are actually just the regular two quadrature output phases of the encoder. Treating one as a clock and the other as the direction indicator is a workable analogy though.

This sketch uses the rotary encoder to control the position of a single enabled LED on an 8x8 LED display. This makes the accuracy of encoder input quite obvious, as it is very easy to single-step the LED position backwards and forwards.

The rotary encoder module includes a switch (press on the encoder shaft). This is hooked up to clear/reset the display.

Construction

Breadboard

The Schematic

The Build

Credits and References

About LEAP#119 Sensor8x8 LEDArduino

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader