I have a project where I need a lot of encoders (Hand turned) and I found on ardsim's site : http://svglobe.com/arduino/in_encoder.html a way to connect them on a bus. (At the bottom of the page) (I attached the diagram below)
It makes the number of pins much smaller.
I know how to read encoders, but in my present setup, the ground pin has always been connected to... ground, and it requires two Arduino pins per encoder.
I am also intrigued by the way the encoder's switches are connected.
I tried to find this setup somewhere else on the net, but no cigar.
I would think that in your diagram, the two input pins for the bus are configured with INPUT_PULLUP. Then I think you would set the common pin to ground using pinMode OUTPUT and digitalWrite(LOW) depending on which encoder you wanted to read.
To read multiple encoders, you would cycle through the common pins, setting each to ground in turn, and read the two bus pins as you would normally.
allanhurst : There will be only one encoder that will be working at a time.
cattledog : I will try to write a sketch to check this. That would mean that reading the encoders would have to be done in the loop(). No use of interrupts possible there.