SRX Mag encoder with Spark Max

I was informed that in the latest release of REVLib I can use an external absolute encoder such as the SRX Mag encoder together with the Spark Max.
1.) Is this setup:

still necessary to do it?
2.) From this page: Alternate Encoder Mode - SPARK MAX


How worried should I be? What does “damage” mean? Damage to the sensor or the Spark Max? And what would cause that?
3.) Is there a manual covering this that I missed? Talking about both the wiring and programming of this setup.

Any updates? Could you manage to solve it

  1. If you just want to use the absolute encoder portion of the mag encoder then no, there is no extra configuration in REV HC or robot code. But you do need to manually disconnect certain pins (as certain pins of the encoder ports are tied together).

  2. Damage to the SMax, it isn’t rated for that. This is not a concern for this setup as the SRX Mag encoder, per the datasheet, outputs 3.3 volts on all of the signal rails.

  3. There is no manual or guide for this setup, we (4739) have looked into doing this and have decided to make our own custom breakout boards. Temporarily mutilated some ribbon cables and the setup works fine (NEO + SRX Mag for abs enc input)

To do that ribbon cable modification you disconnect pins 5,7, and 9 (leave 9 for now) on the “smax side” and connect pin 9 on the “encoder side” to pin 6 on the “smax side”.

2 Likes

We’ve been able to re-pin our SRX mag encoder/sparkmax ribbon cables as suggested and are able to pull accurate absolute position data from the encoder using the “getPosition()” function using NEO brushless motors. However, using the “setReference()” function for the sparkmax’s integrated PID controller causes the NEO motors to spin, similar to when they are functioning in “percent” mode. Any suggestions on what might be going wrong with how we’re trying to use the mag encoder for generating absolute position in the sparkmax’s internal PID controller?