Optimizing Speed Controllers

So, my team is trying to use the inputs on the speed controllers (and possibly the sidecars) more effectively, to improve our overall robot. One of mentors brought up using CAN bus however I’m not exactly sure how I would go about setting this up(if this is actually more efficient than the connection of every jag being connected to a different input on the digital sidecar). So I was just wondering if other teams had used other inputs that improved their robot’s preformance.

Also I have read the datasheet for the digital sidecar and it seems as though the connections are pretty clear cut but I just wanted to make sure there aren’t more creative uses.


We did some testing last year (using Java), and determined that CAN is in fact slower than PWM (in terms of update rate). Therefore, unless you are using the built-in closed-loop control features (control of current, velocity, and position as well as exact voltage are possible), I do not see any competitive advantage to CAN

However, PWM cables are known to be a bit unreliable, so CAN is an improvement in reliability.

There’s a guide (or two) on the forums for setting it up. I suggest looking in the “CAN” subforum.

Fyi, we found last year that Java’s CAN driver averages 180-200 commands per second (depending on the command). The Jaguar’s PWM is updated at 200 Hz, and the Victor’s is at 100 Hz. The internal PID algorithm in the Jaguar runs at 1000 Hz – so if you need closed-loop control, then CAN might be a better option for some of your Jaguars.

Good luck with whatever you choose to go with.

Which method of CAN was that: 2CAN or serial?

Serial. However, according to a thread here (CD) (I’ll go try to find it), the serial bandwidth is far higher than is necessary for 200 commands/s. Therefore, I don’t think it will matter which type is used, but I am still waiting to see if things have improved this year and if the 2CAN makes any difference.

EDIT: It’s at http://www.chiefdelphi.com/forums/showthread.php?t=86259.

Which type of jaguars did you test with? I know they’re both similar but I’m not sure if there are any specific differences having to do with CAN.
Also my mentor said he heard there were more capabilities ,like using limit switches?

I used both black and tan jaguars. The main differences are that black jaguars can run at a higher voltage, black jaguars can act as a serial-to-can bridge, and black jaguars aren’t as prone to failing if students pull the terminal screws out all the way.

Limit switches work whether or not you’re using CAN – check the manual, though, to make sure there aren’t rules limiting their use when using PWM.

The jaguars are capable of built-in PID control for position and speed, using a relative encoder or potentiometer for feedback. They can also output a given voltage (rather than duty cycle) and have current control capabilities.

Good luck.

The output is always a “duty cycle” (PWM).

Perhaps what you meant is the difference between voltage mode and %Vbus mode, explained here:

Sorry I wasn’t clear… that’s what I meant.

To those not familiar with motor controllers (and the Jaguars in particular), the %Vbus (EDIT: Correction below) mode changes the duty cycle as a function of the Jaguar’s input voltage so as to produce an output that simulates the specified voltage. The formula is as follows:

duty cycle = Target voltage
              Input voltage

The result of this formula should be scaled to -1,1]. If scaling is required, then the requested voltage is not achievable unless the voltage of the Jaguar’s power supply is increased. If percentage is required, multiply by 100%.

With brushed DC motors (I’m sure there are other motor types as well, but BLDC (EDIT: correction below) motors are all that FRC teams need to be concerned with), changing the duty cycle this way has exactly the same effect on the motor’s outputs as giving it exactly the specified voltage would.

EDIT: As highlighted below by Ether, the Jaguar’s voltage-control mode is it’s “voltage” mode, not “%Vbus” mode.

Also, when I said “BLDC”, I should have said “brushed DC”.

Assuming that by “Input voltage” you meant Vbus voltage, then I believe that what you have described above is the voltage mode, not the %Vbus mode. Someone please correct me if I’m wrong.

The %Vbus mode simply takes the command and interprets it as a % PWM.

With brushed DC motors (I’m sure there are other motor types as well, but BLDC motors are all that FRC teams need to be concerned with)

“BLDC” is an acronym for brushless DC.

You’re probably correct…

“BLDC” is an acronym for brushless DC.

I knew that! :stuck_out_tongue:

I’ll try not to make any more careless mistakes in this thread :rolleyes: