For the frequency adjustment, use a rotary encoder with two gray coded outputs.
Expensive solution 1:
Rotary encoder from HP "HEDS5701-A00" Farnell no=730944
This type has 500 steps / revolution
BUT they are expensive, from 40 to 75 US$ depending on type.
The two outputs from the encoder looks like this
turning the knob clockwise will generate 0 - 1 - 3 - 2 - 0 and so on
turning the knob counter clockwise will generate 0 - 2 - 3 - 1 - 0 and so on
The PIC program compare the old value with the new value, to find out what direction the knob was turned.
A step motor from an old floppy drive 5 1/4 inch disk can be used,
The two windings generate voltage when the motor is turned,
The pulse relations from the two windings is in perfect gray code,
but needs to be amplified and level converted to fit the 5 Volt input level of the PIC controller
This type from a TEAC drive has 200 steps / revolution
Has ball-barings and a super good feeling
Note on the picture the small aluminium thing that was on the 5mm axle,
to remove it simply heat it up fast up to 150 C use wide screw driver to pull it off,
don't use force to pull it off, this will kill the ball-barings.
Detail to mention here: the need for a big and heawy knob on the stepper axle,
becourse at slow turning the magnet will push and pull small and weak pulses,
some of them powerfull enough be seen on the output, this is removed totaly with a heawy knob.
Also: both outputs will be at high state everytime the knob is standing still,
so the verry first low-pulse on output A or B, Should be ignored in the software.
The whole floppy drive costed me under 1US$ at a HAM marked !!
This schematic is from VK6BRO, thanks alot, it's much more simple than the first solution I had :-)
Why not also visit his great homepage
Here is the PCB layout, using SMD or normal standing up components
This PCB is 35 X 35 mm and is glued on the back side of the steppermotor,
Input connector has pinout that fits directly to the steppers.
The output connector has the same pinout as the HP and BURNES encoders.
Note the BIG hole in the center of the PCB is for the axle that goes out on the rear side of the steppermotor.
This knob was turned by OZ8LX, and then cromed !
Looks good, the weight is 330 grames of pure cobber, it was not possible for me to find brass, that is much better to work with