Thank you to Gerrit (PA3BYA) for writing in and sharing a hardware project he completed that combines an affordable optical encoder and a microcontroller with custom firmware to create a high-resolution USB mouse wheel for SDR tuning. Many people prefer using a knob to tune through the bands rather than a keyboard and mouse. Gerrit writes:

Although I initially developed it for use with the RTL-SDR, it is actually a general-purpose tuning solution that can be used with virtually any SDR software. Many SDR projects use a cheap mechanical rotary encoder with, for example, 24 pulses per revolution.

But why settle for a 24-pulse mechanical encoder when an affordable optical encoder can provide 600 pulses per revolution? For this quick SDR experiment, I combined a high-resolution optical encoder with a tiny Digispark ATtiny85 and turned it into a standard USB mouse wheel for tuning.

The result is a surprisingly simple and platform-independent tuning control that works with SDR software on macOS, Windows, Linux, and even a Raspberry Pi.

The encoder he used is a cheap Chinese part, costing around 17 Euros. However, one interesting issue that Gerrit encountered was that the cheap encoder would not reliably operate when powered from 5V, even though the operating voltage was specified as 5V to 24V. To fix this, he suspected that the input LDO was dropping too much voltage at the low 5V end, so he modified the encoder by shorting the input and output of the 78M05 regulator, to allow direct 5V power without any dropout.

His firmware for the ATtiny85 is open source and can be found on GitHub.

The Optical Encoder and ATTiny85 Microcontroller
The Optical Encoder and ATTiny85 Microcontroller