Encoder Problems

We recently decided to use the encoders and we are having problems with the programming aspect. When we use the motor with encoder example vi, the motor works but the encoder just shows a small number for the distance and nothing for the rate The numbers flash as if they are changing but remain constant.

The encoder wires were soldered to two female-end pwm cables with the brown to black, orange to red, blue to white, and yellow to white.

The wiring sounds right (though I’m going from memory and I might be wrong). I assume you have the encoder outputs connected to the Digital Sidecar inputs that the software is expecting.

Did you correctly attach the encoder “code disk” to the gearbox shaft? The long plastic collar with the slits goes on first. If it’s on backwards, you will read nothing. The disk should be pressed on until it is exactly in line with the mounting tabs for the cover. If it’s too far away from the sensor circuit board, you will read inconsistent values. If it’s too close to the sensor circuit board, you have probably destroyed it by scratching off the reflective lines against the encoder’s mounting screws.

If the disk is too loose, it won’t give useful results. It will probably end up sliding off the end of the shaft where it will get wedged inside the housing and the values will stop changing.

our team had that EXACT SAME PROBLEM
long, dreadfully sad, story short we concluded it was hardware issue with the sensor ciruit board because we had infinite resistance running across the circuit board that we tested with a multimeter. But now im not so sure anymore… Recently i was browsing the programming forums here and discovered a certified national instruments programmer was saying there may be a problem with the Encoder.vi
As far as i know it is still a hardware issue (because of the infinite resistance) but could very well be a combination of hardware and software.

in other words: :confused: :confused: :confused:

It sounds like one of your encoder channels is disconnected.
This would result in the value changing rapidly, but not going anywhere.

That’s is what one of our mentors suggested it could be…

Thank you for the responses. We made sure that the encoder was well secured on the gear box. It might be a hardware problem. These were the encoders that we assembled but never got to use last year so the assembly might have been faulty. We will try again with the encoders from this year and see how it goes.

You can test the encoders using the PSOC I.O. board. If you remove the plastic head from the PWM cables the pine can be connected directly to the PSOC pins as follows.
Orange = VDDIO
Blue = P6_0
Brown = Ground
Yellow = P6_2

Configure the pins as inputs floating. Start the driver station and turn the motor on or spin the encoder by hand. The values should display on the drives station lower right corner.

To install the encoders you should use tools from US Digital or make your own.
The tools ensure that the encoder is centered correctly around the shaft and set the disk to sensor distance. The centering tool is just a small alum collar that fist over the shaft and into the hole of the encoder PCB. The disk insertion tool is a flat plastic disk that presses the disk in slightlt farther than tha cover tabs (approx .05 in farther). The side of the disk that looks like the surface of a CD goes toward the sensor PCB.