Hey guys, so we’re participating in Infinite Recharge and we’ve made a robot that uses up all the PWM ports on the roborio. However, we still need to add one more motor controller to the system and couldn’t figure out how to do so.
You can use can bus
If you need to use PWM, there are 10 more PWM outputs in the MXP port.
Also, depending on what motor controllers you are using, you can chain them into the CAN bus.
What motor controllers are you using?
^^ Both of those above. OBTW, if you need to break out the MXP port, it turns out that an old floppy disk connector is the right size.
There’s also the possibility that one or more of your motors could use relays if they are fairly small and only need on/off, not proportional control… See R29b for the list of legal relays, and R30 (third row of the table) for the list of motors which can be controlled by relays.
I’m using vector SPXs and Talons
Assuming you are using the TalonSRX (as opposed to an older TalonSR), the TalonSRX and VictorSPX can both be daisy chained into the CAN bus.
This can (pun intended) potentially simplify your robot wiring efforts as devices will just connect to each other, as opposed to all needing to be wired directly into the RoboRio.
Also, programatically, using the motor controllers via the CAN bus gives you access to more features (such as follower mode, smart current limiting, onboard ramp rates and PID control just to name a few).
You can easily wire your motor controllers as described in the Talon SRX User’s Guide.
Note it doesn’t matter what order you put your TalonSRXs and VictorSPXs in!
Using the CAN bus also allows you to update firmware and diagnose problems using Phoenix Tuner.
If you do decide to move from PWM to CAN (and I recommend you look into it, if not for this season, during the offseason), check out all the awesome documentation provided by CTRE and WPILib on the matter.
I’ve linked some relevant pages below.
Also, in a similar vein to multiple motors per controller, if you have two motors which do the same thing, like one side of a drivetrain, it’s perfectly fine to use a PWM Y cable to both of the controllers instead of linking them together in code.
And on a similar note to that, in some cases, you can run two motors from one motor controller, see R30 (Table 9-2) in the game manual.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.