Robot Concepts - Morasta/UrsaMajorFRC2025 GitHub Wiki
Drive Trains and Communication
PWM: the roborio talks directly to a motor controller and tells it how much power to give the motor (and the direction). Think a phone call to one person.
The signal is high or low (digital), and depending on how long the signal is high (or low) over a set time frame, the motor controller interprets this as an action (forward, backwards or stop). Talon motors use a 20ms cycle time (how long one signal is), and if 7.125ms of high (and 12.875ms of low), the controller interprets this as "stop". As the amount of time that the signal is high increases (usually) the motor speed increases, likewise with decreasing the time spent on high. PWM is the same concept between different controllers, just sometimes, there are some different numbers.
CAN: all of the motor controllers and roborio are connected together. It's a conference call. The roborio broadcasts all messages over the network, but uses the ID's/names of the motors. Roborio says: "Dave, I need you to give your motor this amount of power." Whichever motor "Dave" is, recognizes the roborio sent a message for him and acts on it. The others pieces on the CAN bus ignore it.