Author Topic: Need help with rotary encoders  (Read 1840 times)

0 Members and 1 Guest are viewing this topic.

Offline Charger

  • Thread Starter
  • Posts: 168
Need help with rotary encoders
« on: Sun, 01 November 2020, 23:23:09 »
Ok so i have been out of the keyboard game for a bit but im planning a new pc build and want to set up a custom multi media controller for it since im going to be building an a old stereo.

So what I have started with was replacing all the knobs on the stereo front with rotary encoders but now I have the problem of trying to figure out how to wire and code for the encoders. Also is there an micro controller that any one would recommend for this? it has 7 rotary encoders with push buttons as well as 5 locking switches




Any help would be appreciated.
Thanks.

Offline eribabu

  • Posts: 10
Re: Need help with rotary encoders
« Reply #1 on: Mon, 02 November 2020, 14:15:39 »
I would just keep it simple. Hand wire a promicro or equivalent MCU. You could look at the BD9 from keeb.io for firmware inspiration (cough copy paste cough), since that is 7 switches plus 2 encoders. Each encoder has at least 3 functions: CW (example: vol up), CCW (ex. vol dn), and keypress (ex. play/pause). Total of 13 switches essentially, which is more or less what you need here.

For the lock switches, honestly not sure what would work best for this... You could program a downstroke macro and an upstroke macro. Depending on what media player you use, could be something like a low pass or hi pass filter preset or toggle an EQ mode of some kind, toggle input or output. A mute button would be simple too of course.

Lots of options with QMK, just need to put in the legwork. Hand wiring the encoder: I would be surprised if there isn't a tutorial somewhere online already for this.

Sent from my Pixel 4a using Tapatalk


Offline Charger

  • Thread Starter
  • Posts: 168
Re: Need help with rotary encoders
« Reply #2 on: Mon, 02 November 2020, 16:05:28 »
I would just keep it simple. Hand wire a promicro or equivalent MCU. You could look at the BD9 from keeb.io for firmware inspiration (cough copy paste cough), since that is 7 switches plus 2 encoders. Each encoder has at least 3 functions: CW (example: vol up), CCW (ex. vol dn), and keypress (ex. play/pause). Total of 13 switches essentially, which is more or less what you need here.

For the lock switches, honestly not sure what would work best for this... You could program a downstroke macro and an upstroke macro. Depending on what media player you use, could be something like a low pass or hi pass filter preset or toggle an EQ mode of some kind, toggle input or output. A mute button would be simple too of course.

Lots of options with QMK, just need to put in the legwork. Hand wiring the encoder: I would be surprised if there isn't a tutorial somewhere online already for this.

Sent from my Pixel 4a using Tapatalk
I'm going to hand wire I almost always do it's 7 encoders that are the issue do I need interrupt on every pin I use or just any pin will work. Plan was pro micro or 2 unless I find something that can do all the encoders on one.i see qmk can do encoders now it wasn't a thing last time I built lol just have to figure out how to set it up.

Offline vvp

  • Posts: 887
Re: Need help with rotary encoders
« Reply #3 on: Tue, 03 November 2020, 03:35:40 »
You can scan rotary encoders with polling. Interrupt is not strictly necessary. My experience with rotary encoders indicates that the minimum polling frequency is 100 Hz with 3 bit debouncing.