Skip to content

PWM vs CAN Control

learnfrc.com
learnfrc.comAuthor
Veer Bajaj
Veer BajajMaintainer

Motor controllers can be commanded two ways, and the choice affects wiring, capability, and debugging.

With PWM, the roboRIO sends a single pulse signal to each controller over a 3-wire cable plugged into one of the roboRIO’s PWM ports (0-9). The pulse width (typically 1.0-2.0 ms) tells the controller how fast and which direction to drive.

Pros:

  • Simple and easy to understand.
  • Easy to troubleshoot - one controller per port.
  • No device IDs to configure.

Cons:

  • One wire run per controller (lots of wires).
  • No feedback data comes back to the roboRIO over PWM.
  • Limited to 10 controllers (the number of PWM ports).

WPILib recommends PWM as a starting point because it is less complex and easier to debug.

CAN is a digital network that daisy-chains many devices on just two wires (CANH and CANL). The roboRIO, the PD, and every CAN motor controller share the same bus.

Pros:

  • Far less wiring - one bus serves dozens of devices.
  • Rich two-way data : the controller reports velocity, position, current, temperature, and faults.
  • Advanced features : closed-loop control, motion profiling, current limiting, follower mode.
  • Easier configuration through vendor tools.

Cons:

  • Each device needs a uniqueCAN ID (set with Phoenix Tuner X for CTR, REV Hardware Client for REV).
  • A single broken connection can take down everything downstream on the bus.

Most competitive teams use CAN for motor controllers to unlock current limiting and telemetry, while sometimes using PWM for a simple device like an LED blinker driver. Beginners often start with PWM and migrate to CAN as they get comfortable.

  • PWM sends one pulse signal per controller over a 3-wire cable to roboRIO ports 0-9 - simple but no feedback.
  • CAN is a two-wire digital bus that daisy-chains many devices and returns rich telemetry.
  • CAN unlocks current limiting, closed-loop control, follower mode, and far less wiring.
  • Each CAN device needs a unique ID (set via Phoenix Tuner X or REV Hardware Client).

This lesson was adapted from learnfrc.com.