We are taking our first foray into build a swervebot. Is there a recommended good practice for wiring the CAN connections for everything involved with it? There are 12 CAN devices (8x Neos, 4x CANCoders) that need to be connected. Normally we use a hybrid loop/star system for our robot. We have the Mind Sensors CAN splitter that we use for creating a star wiring setup in the bot.
It was suggested to use a splitter for each swerve module and then connect the modules into the main bus, but something about that seems kinda screwy. Are there any suggested methods that other teams have done?
Wiring redundancy seems pretty critical on this, if you lose a module, you are now dragging a wheel. I’d like to also looking into locking connectors. Are there any suggested connectors for CAN wires? I was hoping to use mini anderson connectors, but if there are better suggestions out there, I’d appreciate it.
When you put that many items on the can bus you’re going to probably want a canivore. If you use a carnivore, you can only use an in line can topology. No hybrids or stars.
Note that a CANivore won’t help much, since they’re using NEOs (which are not compatible). The CANCoders could be put on a CANivore, but I’m not sure how much that will help.
We did a lot of work on this 2-3 years ago. Our recommendations are documented in the “BearCAN2” section of this document, including full PCB board designs and terminal recommendations. We do plan to add a recommendation to do the bus termination on one of these boards (using a 120 ohm resistor), instead of using the terminator in the PDP unit (short story – this is due to a failure we experienced on a robot during competition). Definitely only use stranded copper wire; the yellow/green wire sold by CTRE and several other FIRST-oriented vendors works great. And, technically, any drop (connection from the main CAN bus to a device like a CANcoder or motor controller) shouldn’t be longer than 13 inches, but we’ve gone up to 18" without observed problems. We’ve used these designs in our last 2 competition robots that took quite a beating but stayed reliable and fully operating throughout. I hope this helps.
We made a single loop around the robot in series for our swerve drive and everything else. We did have a canivore though since we were using all CTRE devices.
A little more useful info. On our 2022 robot, we ran a single CAN bus in a bus+star configuration (that’s what our BearCAN2 modules implement). We had 17 NEO’s, plus a Limelight, Pigeon2 IMU and 5 CANcoders (plus the RoboRio and Rev PDH) all connected to this one bus, on top of a swerve-drive chassis (2 NEO’s per swerve module). We kept the BearCAN2 modules as far away from the chassis perimeter and swerve modules as we could (remember that 13" drop length limit) to keep the CAN bus as secure as possible. This robot experienced no electrical control failures or CAN bus anomalies, and typical CAN bus loads were in the 60% range (we log and monitor this) and rarely exceeded 70%. Just sharing some real data to help teams set expectations and plan.