Smallest USB-C encoder you can make in 8 min for $8. It is possible to use MIDI or HID or whatever you want "X over USB" protocol. It is also Arduino compatible so you can use all your beloved fancy-shmancy libraries.
- $5 Seeeduino XIAO
- $3 Rotary encoder with integrated button, 9-11mm footprint and vertical orientation. It is most common type on the market, actually.
I recommend Bourns PEC11L series. I've used PEC11R-4015F0-S0024. Another popular brands is Alps, Alpha, Elma and tons of their chinese clones. Check datasheet before buying.
0 wires. There is only 5 soldering points. Remove all unnecessary mounting pins from encoder to avoid short circuit before soldering.
Source code in this repo made with PlatformIO IDE.
- Install Control Surface library from master like
pio lib install https://github.com/tttapa/Control-Surface.git#master
. It is essential to use latest version which is well- documented. - Install MIDIUSB library with
pio lib install "arduino-libraries/MIDIUSB"
You also could use Arduino IDE. Just install Control Surface and MIDIUSB libraries as well.
Knob-98 is an alternative design which required additional 1 minute to build.
It used the back side of XIAO to mount encoder so you need to solder 1 additional jumper to configure button properly. You only need to uncomment Knob-98 definition
section in the /src/main.cpp
and comment Knob-88
back then build the firmware.
Advantages against Knob-88:
- You could use SMT encoders cause back side of the XIAO has a perfectly flat surface.
- Encoder will be soldered into geometric center of the XIAO.