I have a potential mechanism application for which it would be desirable to dynamically switch between brake and coast modes on a speed controller via software rather than setting a mode prior to a match via a switch or calibration button.
Do any of the legal speed controllers currently support such an application? I have not used CAN control on the Talons before, so I wasn’t sure if the Talons could be programmed with this functionality. I know the Jaguar is configured via jumpers – is it legal to create a custom circuit that will allow electronic switching of the jumper position?
Any speed controller that has a brake/coast jumper can have that jumper connected to a digital I/O and be controlled in software. We have done it many times in the past. CAN is also an alternative.
For R66, I could classify Al’s solution under part E - a pin is a pin, and the controller reads it as a signal. All the jumper does is set that signal to something steady.
For R88, I think the controller is still being controlled by the PWM port - the DIO hooked up to the coast/break header won’t cause the motor to move at any time, only the PWM signal will do that. The DIO signal will just change the performance characteristics of the controller when it’s being used by the PWM signal.
This concept has always bothered me, a bit, for a couple of reasons:
On the Jaguar, the BRAKE sensor pin (middle one) is a direct input to the MCU which has 3.3V IOs (which are 5V tolerant, but still). In retrospect, we really should have put an ESD suppression device on that pin (he says looking at the last version of the schematics).
But more so,
2. When you’ve done this in the past, did you also connect ground? I.e. Was the DIO connection to the brake/coast jumper 2 wires (signal+ground), or just one wire (signal only)? I presume you did single wire. I ask since the PWM input of motor controllers use optoisolators so that the only ground return from the motor controller is V-. Connecting to the brake/coast jumper with 2 pins introduces a second ground return which may bear more current should the V- get disconnected, even momentarily.
I don’t recall seeing any documentation for how to do the dynamic brake/coast. I don’t recall providing this in the Jaguar docs. I don’t recall seeing it in the Victor (but that was a while ago for me).
Scott,
This is not using the PWM interface, ever. The Brake/Coast jumper is a pulled up input. Close the contact to common and it pulls down into the other state on those devices that use this feature. So you are supplying a closing contact to ground and no voltage in either state. This is my preferred method of interfacing to external control electronics. I don’t like volts…
Bullet J of R66 refers specifically to the limit switch jumpers, not the brake/coast jumper. Applying bullet E assumes that a jumper pin is a standard connection point, which isn’t clear. The other arguments don’t convince me either, though this is a case where I’d like to be wrong; it would have provided a simple solution to a design problem a few years ago, but I thought it illegal. I have asked about this on the Q&A.
Second Edit: I’ll also post the answer here to close the loop for future generations.
Guys,
There is no rule that prevents this use of the Brake/Coast jumpers. R66 lists allowed modifications to electrical components. The removal of a jumper and the connection to a DIO output is what was intended by the manufacturer starting with the Victor 883 and has been allowed since that device was introduced in FRC robots.
The bullet that refers to the limit switch input on Jaguars has a history to their first introduction and the firmware that was used at that time. To make it clear for present day users, Bullet J was added.
R68 has no bearing on the Brake/Coast jumper. R68 requires that all PWM controls originate in the RoboRio directly or through the listed MXP devices to insure that FMS will stop all motors used on an FRC robot when so commanded.
Everyone,
In a discussion with Engineering, certain conditions could produce a hazardous condition. (verified during component testing) The current Q&A response is the only way to prevent this condition from occurring in all legal controller implementations on FRC robots. The Q&A response will be enforced at least for FRC season 2016. Sorry for the confusion.
Is this an issue with the new controllers, or one of the old ones? I am also curious on what the issue actually is too. Does one of the controllers allow enable if the jumper isn’t set correctly. And switching the jumpers manually between brake and coast is still allowed, right?
Moving the jumpers are legal as specified in R66.i.
If a power return cable were to open under certain conditions, full current might flow in the jumper cable common lead.
I know we had dynamic brake/coast in our drive train on the 2012 robot, however I believe we used a spike to control the state on the jaguar jumper pins.
Don’t believe it was even questioned during inspection at 2 regionals.
It had been assumed to be legal, including I’m pretty sure Al had used it and suggested it in the past. But if they found a hardware issue where high current could end up running though a legally allowed to be 28 AWG wire, it’s absolutely the right call to make it illegal. Thats a good way to start a fire really easily.
As promised previously, here’s the Q&A so that when someone reads this in 2020 they can see the content:
As for a simple way to do this safely (but not currently legally), an optoisolatorcould be used to act as a virtual jumper. Assuming the outputs of the isolator can handle the current that passes through the jumpers, this should only need a ballast resistor for the LEDs to be enough. If more current is needed, a few transistors and resistors would be necessary to supplement. One could even do the double isolation and use a totally COTSrelay module. Repeat: this would be safe, but not (currently) FRC legal.
Virtually no current passes through the brake/coast jumper.
On the Jaguar (I cann’t speak for the design of others, but I can for Jag) the current involved is that in charging the MCU’s GPIO input. The GPIO input uses an internal (to the MCU) pull up which is on the order of 50 kohms. The isolator would only have to pull the input below VIL.
Note that this opto isolator, like the one on Jaguar’s PWM input, is inverting.
If there is virtually no current, couldn’t you just move the resistor and output tap to the ground (emitter) side and re-invert passively?
In any case, I was thinking of using the phototransistor side directly as a switch between the center pin and the brake/coast pins. To do this, you would only need to know whether the jumper pulled the B/C pins up or down.