Blocking -VDC

A rotary encoder is just two switches. It works by having the switches get activated in quadrature.

If you look at the output:

http://playground.arduino.cc/Main/RotaryEncoders

You can set up your own quadrature rotary encoder. Two optical disks rotated so as to be 90 degrees out of phase with each other.