REV Through Bore Encoder -> SparkMAX Brushless connection

Anyone have an elegant solution to wiring the REV Through Bore Encoder to the SparkMAX when using it to control a NEO (to the limit switch pins, not the encoder pins). We can use the supplied cable to a SparkMAX data breakout board, to the SparkMAX – but is there a better way?

Just want to make sure, I am not missing the obvious.

If you have the capability of crimping your own gadgeteer 10-pin connectors, you can make up a cable with the standard wiring at one end, and a “split/twist” connection at the other end similar to old floppy cables. You’ll need to cut the ribbon cable between connectors 3 and 4, and between 8 and 9. The two end pieces will pass straight through, but 4 and 8 will swap, 5 and 7 will swap, and 6 will remain 6. I suggest crimping the twisted end first so if you mess up you can try again, and put the untwisted connector on at the desired length.
And of course, make sure you leave pins 4, 6, and 8 (limit switches and multi-function pin) open at your encoder.

Added: Making the cable is definitely asymmetrical. However, once it is made, the cable itself is symmetrical in that either end can be at the encoder as long as the other is at the controller.

1 Like

REV also said they will release an Alternate Encoder adapter board soon that allows you to do the connection directly between the bore encoder and the data port.

1 Like

How would you connect the Through Bore Encoder as a absolute encoder via the pwm signal to the robo rio. Looking into it other teams seem to not be able to read the pwm signal through rio and I’ve seen no examples of it. We use brushless spark maxes for our drive train so we can’t use them as the brushless mother takes up the port.

It’s actually really easy. If you use the cable that has the 4 PWM connectors on the opposite end, take the one with the white wire and plug that into one of the DIO headers on the rio, with the white wire being the signal wire. You then can use the DutyCycleEncoder class in WPILib to read the signal, where the get function returns rotations and current angle of the sensor. No special configuration required.

But where would one plug in the other 3 PWMs?

If you don’t need their functionality, you can leave them unplugged. Or if you wanted the relative quadrature functionality, you could hook them up and also initialize those other pins as a quadrature encoder.