Image from: WPIlib Excerpt
To quote one of the developing companies:
The Victor SPX was co-developed through a collaborative partnership between VEX Robotics and Cross the Road Electronics and is 10% smaller and 25% lighter than the Victor SP, making it the smallest and lightest motor controller in FIRST Robotics Competition history.
That bit about the smallest motor controller might still be true, but really what sets the Victor SPX apart is the price. It is the cheapest CAN capable BRUSHED motor controller at the time of writing this. Why is it cheaper than the Talon SRX? Cross the Road Electronics made a handy guide that was available here hosted by FRC 358!
If you don’t need a data port or current limiting, the Victor SPX is a great choice for your robot.
The full specs from CTRE are below:
Kit Contents | (1) Victor SPX Motor Controller Power, Ground, Output, PWM/CAN cables come pre-attached |
Outputs | Powers brushed DC motors with variable speed forward, reverse, or off. Can NOT be used with Brushless motors. |
Material Type | Plastic w/Aluminum Heatsink |
Communication Protocols | PWM, CAN (1 Mbps) |
Dimensions | 2.5" x 1.16" x 0.77" (63.5mm x 29.4mm x 19.5mm) |
Weight | 0.12 lb [54.4g] (without wires) |
Nominal Voltage | 12V |
Min/Max Voltage | 6-16V |
Continuous Current | 60A |
Surge Current (2 sec) | 100A |
PWM Input Pulse (high time) | 1 - 2 ms nominal |
PWM Input Rate (period) | 2.9 - 100 ms |
PWM Output Chop Rate (Switching Frequency) | 15 kHz |
Minimum Throttle (Deadband) | Adjustable 0.1% - 25% (Default 4%) |
P/N | 17-868388 |
Depending on your control mode (PWM or CAN), the wiring will differ.
CAN:
package frc.robot;
import com.ctre.phoenix.motorcontrol.ControlMode;
import com.ctre.phoenix.motorcontrol.can.VictorSPX;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.TimedRobot;
public class Robot extends TimedRobot {
VictorSPX _victor0 = new VictorSPX(0); // Change '0' to match device ID in Tuner.
Joystick _joystick = new Joystick(0);
Override
public void teleopPeriodic() {
double stick = _joystick.getRawAxis(1);
_victor0.set(ControlMode.PercentOutput, stick);
}
}
PWM:
package frc.robot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.TimedRobot;
public class Robot extends TimedRobot {
VictorSPX _victor0 = new VictorSPX(0); // Change '0' to match device PWM port on the RoboRIO.
Override
public void teleopPeriodic() {
double stick = _joystick.getRawAxis(1);
_victor0.set(stick);
}
}