Use Can Buse to control all the robot motors?

What ar the pros and cons while using the Can buses to control the drive train motors and motors for external mechanisms.

We are using encoders so we think its necesary to use the Can but, we haven´t seen a FRC robot using all motors as can.

thank you.

We’ve been using full CAN on our robots back to 2012. We love the Talon SRX controllers and think they are fantastic for integrating encoders. If you can do it then go for it!

if you use can bus for all of your motors, everything will have to be connected properly or nothing will work, but everything is on one bus which might be easier to manage.

This is at least an exaggeration, but yes, a loose connection will take everything downstream off of the bus. (The loss of the terminating resistor is unlikely to be a real problem at the length of most FRC CAN busses.)

It is certainly much cleaner to wire a single pair of CAN wires in a daisy chain than to have the star pattern of PWM wires, especially if you like to put your motor controllers close to the motors rather than close to the roboRIO. This is even more the case if you’re using encoders; long signal cables back to the roboRIO are replaced with short cables to the motor controller – and the PIDs are even easier to program.

Pros:

  • Daisy chain wiring. Super easy
  • Single roborio port. Free your PWM ports for servos
  • Diagnostics and feedback. Want to make sure your 775pros don’t stall and overheat? Simple: check for stall current
  • Talons can integrate encoders and run onboard high rate PID loops
  • Toggle brake and coast mode on Talons

Cons

  • Daisy chain wiring. If something comes loose, you lose a bunch of devices
  • If you accidentally wire a CAN connector backwards right before the last device, you won’t notice that anything is wrong until you try to upgrade the Talon firmware and it fails halfway through (don’t worry, we didn’t brick the Talon :slight_smile: )
  • To find devices, you need to go to the web dashboard and individually flash the LEDs. Then you need to set CAN IDs without setting two devices to the same ID. It can be tedious

We have decided to use only Talons this year for their CANbus feature. You can monitor and limit current to motors to prevent the possibility of burn-outs.
Another pro is all your motors are on the same system…

SOP for us is new Talons get firmware flashed, IDs set, and a number sticker placed on them when they arrive. This is done with the rest of the CAN bus disconnected, so the target Talon is the only device seen, no conflicts.

It might be tempting to solder CAN wires for reliability, but you’ll destroy your ability to troubleshoot the bus. You’ll thank yourself for using the CTRE CAN Connector (expensive,) twisting the wires and using good, appropriately-small wirenuts (cheap,) or a 2-pin Molex pin/socket connector. It will be easy to bypass or replace devices.

Chaperol,
Using the CAN buss for control may add work for your software team but the controllers give you the opportunity to use other features in those controllers like current sense, rotation sensor and limit switch inputs. The status ond data from those encoders can be ported via the CAN buss to your RoboRio and used for precision control of some of your motors. CAN is a common solution in most vehicles these days.