Skip to content
Electrical & Wiring·Lesson 14 of 34

PWM vs CAN Control

Two ways to command motor controllers - when to use each.

Sign in to track progress, earn XP, and save lessons.

Two control methods

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

PWM (Pulse Width Modulation)

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 (Controller Area Network)

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 unique CAN 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.

Which to choose?

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.

Sources

Key takeaways

  • 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).

Lesson quiz

Required

Answer all 3 questions correctly to complete this lesson.

1.What is a key advantage of CAN control over PWM control for FRC motor controllers?

2.How does CAN wiring typically differ from PWM wiring on an FRC robot?

3.What does a PWM (Pulse Width Modulation) signal do in a basic FRC motor controller?

Answer every question to submit.