At first I wanted to control them using an ball mouse, but this didn't work. I think the resolution is far too fast for the old mice I had.
Yes, the encoder wheel resolution was far lower (less pulses per revolution) and the sample rate for the old optical (mouse) encoder is too slow to keep up with every phase step in the quadrature waveform output from these new rotary encoders, causing backspin.
- For anyone interested, there's some technical info explaining backspin in
this post.
Encoder spinner0(0, 1);
Encoder spinner1(2, 3);
For those trying to figure out how to wire the rotary encoder to the Pro Micro, these two lines of Marsupial's code define which Arduino pin numbers (blue circles) are the data lines.
- Spinner0 uses Arduino pins 0 and 1.
- Spinner1 uses Arduino pins 2 and 3.
- If a spinner is going in the opposite direction expected, swap the data lines for that spinner. (0<=>1 for Spinner0 or 2<=>3 for Spinner1)
The other spinner connections are 5v (VCC) and ground.
- Be very careful to not accidently connect a data line to 5v (VCC) because that will
instantly destroy the data line circuit on this type of encoder.
Ok, mounting it on a control panel isn't as easy as some commercial spinners
If you want to 3d print a mount, the M3 screw holes are 120 degrees apart with one set of three 14mm from the center of the shaft and the other set at 15mm.
This post has a Thingiverse link to one rotary encoder mount bracket and OpenSCAD code for another bracket that can be modified for use on a control panel.
- LMK if anyone is interested in a control panel mount.
http://forum.arcadecontrols.com/index.php/topic,159527.msg1677612.html#msg1677612Scott