Hobnobbing With The Knob

The scroll wheel might be the best thing that happened to the computer mouse since, well, the computer mouse. But sometimes you want something a little more tangible. For example, with a software-defined radio setup, it doesn’t feel right to scroll your mouse to change frequencies. That’s where [Wagiminator]’ USB knob would come in handy. Marrying a 3D printed case, some addressable LEDs, a rotary encoder, and a CH552E microcontroller, the knob appears to the host operating system as a normal USB keyboard. That means most programs can use it without any special drivers or software.

There’s honestly not much to the hardware. A custom PCB holds two WS2812’s, the tiny CPU, the encoder, and the USB plug. There are a few random discrete components, too, but not many. Everything you need is on the project page. The PCB layout, the software, the schematics, and the 3D print files. The code that does the main work is extremely simple. The USB code is a bit more complex (look in the include directory) but honestly, it isn’t as bad as most USB examples we’ve seen.

This project is ripe for hacking. The software is simple enough to modify easily. The 3D printed case wouldn’t be hard to spruce up or print in different colors. Following the example, this would make a reasonable core for a custom keyboard peripheral that used exotic keys instead of a rotary encoder.

Knobs can be simple or complex. If you want our take on the odd volume control, we used sonar.

23 thoughts on “Hobnobbing With The Knob

    1. I’ve been messing around with measuring the rate of change of an encoder and changing the increment value by the reciprocal of the delta t: if the encoder pulses are coming in at 50mS change the output by about 100 counts per increment, whereas if they’re coming in at 500mS, change it by 1 count. If you do it strictly as a reciprocal it’s pretty pleasing, but when you slow down you’re at like 734 or something weird, so I may end up quantizing it to increments of 250, 100, 50, 25, 10, or something like that. But having delta-x a function of delta-t is really nice feeling from a usability standpoint.

  1. To be usable, a pot like this needs to be embedded in a desk or have the enclosure filled with neutron star matter (or a steel plate/concrete). Point is, it needs gravity to resist twisting motion without needing down pressure or a second hand. A suction cup would be shit but a magnet may work.

        1. That’s the thing with a lot of the buttons in such projects, they are non-positional, just a stream of keys.
          But if you use a joystick ID to get a positional variant then you find that software by and large lack the support. Only a few music apps do if you use the MIDI ID instead.

          But now that I said that I suddenly realize that there is support in operating systems for touch interfaces, so if you make a knob that that pretends it’s a touch interface being used you could have positional, except then you would to somehow have it have a dynamic position on the screen, since it is 2D if you will
          Could be useful though if for instance you have a preprogrammed faked location where you have standard sliders, like in fullscreen video editing software, just report the starting point as being where you know the slider is and then have the knob pretend to be a finger slidng along that slider path and then you have a physical knob rotating along the screen, or with a button activation have it detect the position where the knob is at as a pretend touch event.

    1. Mount the encoder concentrically with the shaft of a stepper motor connected to a small flywheel with the same mass as the knob. When the encoder is rotated, rotate the flywheel in the opposite direction to counter the torque.

Leave a Reply to Rvn HurstCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.