Motor Controllers
Pages 9
Clone this wiki locally
Motor controllers are needed to, well, control the motors on the robot. They allow the user to run the motor at whatever percentage of full power that is wanted using a PWM signal. PWM stands for pulse width modulation which essentially sends a square wave with variable pulse width. For example setting it to 100% power would just send a high voltage consistently while setting it to 50% would send waves that are half period high and half period low.
There are three main types of motor controllers team 3341 uses for FRC. These are the Jaguar, Victor and Talon. Generally, these motor controllers take power inputs from the power distribution board and two motor outputs. A PWM cable goes from the controller to the RoboRIO to control the percentage of power to be sent to the motor. Negative voltages can be sent too which makes the motor spin in the opposite direction. There is also something called a servo which isn't necessarily a motor controller or even a motor but will be explained in this section.
Jaguar
The jaguar is our most used motor controller because it has hardware support for limit switches. It can also be controlled by CAN instead of PWM but our team has generally not used CAN. In code, there is a Jaguar class that is instantiated as
new Jaguar(int pwm_port)
Victor
The Victor is much more compact than the Jaguar but the fan makes it annoying to use and is generally inferior to the Talon. The best use that our team has found for Victors are due to its power curve being approximately a cubic function meaning that there is a non-linear increase which may be desired. In code, there is a Victor class that is instantiated as
new Victor(int pwm_port)
Below are the power curves for the different motor controllers. There are two models of Victors on the plot.
Talon
Our team has found Talons to be the best for motors that do not need limit switch functionality such as drive motors. They are extremely compact and simple. A control curve can be used to simulate something similar to the power curve of a Victor. For example, setting the PWM value to the joystick value cubed. In code, there is a Talon class that is instantiated as
new Talon(int pwm_port)
Servo
A servo is a controller that can be set to a desired position. Most servos have a 180 degree range and they lock at a certain position depending on the signal sent to them. In code, there is a Servo class that is instantiated as
new Servo(int pwm_port)
the Set function can be given a value between 0.0 and 1.0 where 0.0 is one extreme of the servo range and 1.0 is the other extreme. SetAngle can also be used but will not work for all servos so use with caution.


