My team is trying to connect a REV Through Bore Encoder directly to a SPARK MAX so we can run it in Alternate Encoder Mode. However, as soon as we plug it into the data port on the SPARK MAX the status light turns off and we can’t detect it using the Client.
Currently, we don’t have any wires soldered to the pads on the board.
Has anyone had fixed this issue before?
Are you using the
REV Robotics Data Port Breakout Board to connect the encoder? Does the Spark Max status light turn back on when you unplug the encoder from the data port?
If you can provide pictures of your setup, that would be helpful to see what’s going wrong.
REV Robotics designs, builds and manufactures robotics parts and components used by students for learning about science, technology, engineering, and math (STEM). Our parts are commonly used within the FIRST Robotics Competition and the FIRST Tech...
This is what you’re looking for with a spark max.
If you can’t get one of the REV alternate encoders (best option), you can also use a Talon SRX/CTRE breakout board.
Did you set up the Speed Controller to use the Alternate Encoder. Check out section 126.96.36.199
I have connected the AndyMark MA-3 Analog encoder to the data port using the Sentinel board analog input.
No issues with this so long as your SparkMax is on current firmware.
The SparkMax data port pinout is identical to the TalonSRX so what you are trying to do should work.
That is the part that I purchased, and connecting it directly into the SPARK MAX makes its status light turn off.
I did set up the Speed Controller to be in Alternate Encoder Mode.
You can see the code here.
m_kinematics = new DifferentialDriveKinematics(Constants.Drivetrain.kTrackWidth);
m_odometry = new DifferentialDriveOdometry(getAngle());
m_leftPIDController = new PIDController(1, 0, 0);
m_rightPIDController = new PIDController(1, 0, 0);
m_gearShift = new DoubleSolenoid(Constants.kGearShift, Constants.kGearShift);
m_leftEncoder = new Encoder(0, 1, 2);
m_rightEncoder = new Encoder(3, 4, 5);
m_testEncoder = m_leftFront.getAlternateEncoder(AlternateEncoderType.kQuadrature, 8192);
m_leftEncoder.setDistancePerPulse(2 * Math.PI * Constants.Drivetrain.kDistancePerPulse);
m_rightEncoder.setDistancePerPulse(2 * Math.PI * Constants.Drivetrain.kDistancePerPulse);
SmartDashboard.putData("Drivetrain - Left PID", m_leftPIDController);
SmartDashboard.putData("Drivetrain - Right PID", m_rightPIDController);
Please send me a photo of the board and sensor connected to the SPARK MAX. You can send it to
Just to make sure we’re not skipping a base - you’re using this with one of the NEO or NEO 550 motors and have the controller in brushless mode, correct?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.