Learning About VCR Jog Wheel
Project Log
( 9 June 2009 )
- A while back I obtained a jog wheel from (I assume) a VCR. It contains a rotary encoder attached to an inner spinning wheel and an outer wheel which moves probably ~120 degrees left and right with a spring return to centre.
- There's a Rotary Encoder page on the playground with a variety of approaches but there is also Quadrature Encoder library.
- I've searched on all the identifying numbers I could find and couldn't find any information. The underlying component appears to be manufactured by Alps.
- There is an eight (8) pin connector with 7 grey wires and 1 brown wire (pin 1).
- Presumed pin allocations: (1) Ground? (2) Encoder A? (3) Encoder B? (4) -- (5) -- (6) -- (7) -- (8) --
- Ah, it all becomes clear: Jogging and shuttling with Arduino which suggests the shuttle ring uses grey encoded output.
- The connector has 2mm headers rather than 0.1" so I had to wire up an adapter. I can't reliably detect movement from the jog wheel, I'm not sure why.
( 27 June 2009 )
- Copying and pasting code is a bad idea. Remember that. :-) Discovered I was never configuring one pin because I configured the other pin twice. :-) Also, changed the order as it seems ground is the middle pin.
- Successfully read jog wheel result consistently with correct count.
- From the code on the page linked above I add:
int PIN_C = 14; int PIN_G = 15; int PIN_D = 16; void setup() { pinMode(PIN_G, OUTPUT); digitalWrite(PIN_G, LOW); pinMode(PIN_C, INPUT); digitalWrite(PIN_C, HIGH); pinMode(PIN_D, INPUT); digitalWrite(PIN_D, HIGH); Serial.begin(9600); }
- And change the digital read to (I know, overcomplicated):
a = digitalRead(PIN_C); b = digitalRead(PIN_D); // inverted if (a == LOW) { a = HIGH; } else { a = LOW; } if (b == LOW) { b = HIGH; } else { b = LOW; }
- The inversion above is because I use the internal pull-up resistors whereas the code expects a external pulldown. I haven't checked if this inversion is actually required for correct function though.
- As far as I can tell the inversion isn't actually necessary. It also seems each "detent" on the wheel generates two counts.
( 19 August 2009 )
- Got the jog wheel working with the AVRUSB code to send "frame advance/back" via the cursor keys in Blender.