Can't read PLG built-in encoder

We wired up a PLG per the wiring diagram with 1k-ohm resistor between yellow and blue and a separate 1k-ohm resistor between green and blue. We split the brown wire into 2 leads and similarly with the blue lead. Then we connected 1 brown as +5, 1 blue as ground and yellow/green to each of two connectors and plugged them into DIO 0 & 1. We ran the motor but we’re not seeing any readings from the encoder.

I used a multimeter and checked all the wiring. As far as I can tell, there are no shorts and everything is connected as it should be.

In the code, we are simply constructing an Encoder passing in the two DIO channels. Readings from the Encoder are all 0.

Any suggestions would be greatly appreciated.

We also had that issue if I am understanding correctly. Apparently a pull-up resistor connects to power, not ground. We connected the resistors to the brown wire instead and now it works. Hope this helps.

The RoboRIO has built-in pull-up resistors.

1 Like

Thanks for the suggestions. We removed the “pull-down” resistors and tried the signal wires straight into the RoboRio, relying on the built-in pull-ups. Still no luck.
Next try will be to add explicit pull-ups between the signal wires and the brown (+5) wire.
Unless someone else has any other suggestions.

So we never got around to trying the 1kOhm pull-ups to the brown wire. We decided to add a Rev through-bore encoder instead.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.