Quadrature Encoder wiring

I just received some shiny new Quadrature Encoders and I don’t quite understand the wiring. Apparently both are output channels that can calculate the position and direction of a Vex shaft. However in the Vex Encoder Test file, the pdf states that only one wire, doesn’t matter which one, has to be plugged into interrupt port #2. What about the other one? Which wire measures what, where do you plug the other one in, and how do you tell w/o labels?


Lets see if I can help clear things up for you.

First, the test code was made for the original encoders and can only test one output channel at a time.

Second, the new Quadrature Encoders have 2 output channels that’s why they have 2 cables. One channel is out of phase from the other one so by detecting which one changes from high to low before the other one, you can determine which way the shaft is rotating.

I don’t know which software you are using, but EasyC 2 doesn’t currently support them. There is an update coming out once all of the new sensors are available. I’m not sure about the other software that’s available for the VEX microcontroller. The only one I know for sure that supports Quadrature Encoders is EasyC Pro. I assume that each output channel would plug into one of the interrupt ports, but I can’t say for sure.

I hope this helps,

That makes sense, thank you for the explanation.

Just this moment I found the explanation in the shaft encoder kit manual, somehow I missed it before… strange.

I am currently using MPLAB and if anyone has a code with both wires from the Quadrature Encoders included in it and you could post it that’d be great.

It sure does


I’m glad that I was able to help. Hopefully, someone with MPLAB will be able to post the code for you if it supports the encoders.

Unfortunately, I will have to wait for the EasyC 2 update to try mine out. I have had them since February so it’s been a long wait and I’ve been really anxious to try them out!

You can take it as a chance to try out MPLAB too :smiley: