REV Spark calibration does not calibrate

When we drove our robot straight ahead, it started turning to the side a bit when it didn’t previously. We observed that some of the Sparks, when given full power, were blinking. We calibrated them several times and the problem has persisted. Does anyone have any suggestions for getting the Sparks behaving correctly?

EDIT: We have verified that during calibration we were sending signals of -1 and 1. We calibrated one speed controller that we had issues with in the past and that fixed it. One is having issues with moving forward. A third is having issues with moving backward. All three were calibrated with the same process described in the Spark user manual

Perhaps your roboRIO is miscalibrated, or producing uneven signals among the ports? Given the difficulties you’re experiencing, you may want to ensure that you are calibrating each motor controller for the specific RIO and port where you intend to use it. If you have an oscilloscope and someone who knows how to use it, verifying the PWM signal directly would be even better.

Hi Brian,

When you say the SPARK was blinking, do you mean it was blinking quickly, indicating proportional output rather than full output (solid red or green)?

I agree with GeeTwo that verifying the PWM signals coming out of the roboRIO will be helpful, but like he said, it requires an oscilloscope.

Have you tried to reset the SPARK to its factory defaults?
Which motor configuration APIs are you using? (e.g. SPARK, Talon SR, Victor)

With its default settings, the SPARK should respond in full to the output of the roboRIO. Rarely, I have seen that the output PWM signal can right on the edge of being interpreted as full.

A quick way to verify this is to modify your code to output a range slightly less than +/-1 during calibration. For example, +/- 0.99. After successful calibration, switch the code back to +/-1 and observe the SPARK behavior. Anything the SPARK sees past its calibrated maximum and minimum (to a point) will be interpreted as full output.

-David

*If you have a PWM generator with an accurate digital readout of pulse width, you can quickly measure the calibration of the SPARK (determine what pulse widths are required for full forward, full reverse, and neutral output).

If you don’t have a PWM generator with an accurate digital readout, and your team can’t afford one, you can build your own using an old junker single-core Pentium laptop (or desktop) with an RS232 serial port or IEEE1284 parallel port.

Using that same laptop (or desktop) and a TTL to RS232 converter board from eBay ($1 including free shipping) you can build a “poor man’s” logic analyzer which can measure the RIO’s PWM pulse width with sub-microsecond accuracy.

Good summer project.

UPDATE:

We tried calibrating them one last time. The two that were having issues in different directions ended up having issues in both directions after calibration. So we replaced those two. We then calibrated them and they were both working forward but not backwards, but that was likely due to human error when calibrating. So we calibrated again, but went extremely slow as we ramped the signal up from 0 to 1 and then fully stopped at zero, and then went extremely slow from 0 to -1. Afterwards all the sparks were properly calibrated and the robot is driving straight again!