paper: Victor Calibration code

Thread created automatically to discuss a document in CD-Media.

Victor Calibration code
by: Astronouth7303

Cross platform automatic victor calibration code.

Sometime during build, I wrote some code to automatically calibrate the victors. I’m releasing it under GNU GPL.

By using this, you can precisly calibrate your victors. If you’re having subtle problems with the robot not reacting as you’d like, run this before tweaking constants.

It cycles all the PWM values from 0 to 254 and back down, pausing at 0, 127, and 254. Pushing p1_sw_top (the top button on joystick 1). The current value is displayed on the user byte. Autonomous mode kills everything.

The code will compile for the 2004/2005 RC, 2006 RC, and the EDU bot (Robovation). Notice the seperate libraries and linker scripts for each one. It was developed in Eclipse, so there are no MPLAB project files. There are, however, makefiles.

Recomended usage:
[list=1]
[]Unhook all your motors
[
]Download program
[]Go through each victor and calibrate it according to the directions, but instead of moving the joystick, run this (hit the button)
[
]Download your code, turn off bot, and reconnect your motors
[/list]

When it’s all done, allow it to run. All the LEDs should change together, in syncronicity. If one of them is off, it isn’t calibrated quite right. (When they’re all going at once, the off one sticks out.)

You may configure the timings and the switch at the top of user_routines.c.

This can also serve as a small template. The only reason ifi_utilities.c/.h is in there is because I use printf() once for initialization.

victor-calibrate.zip (464 KB)

Since this paper is getting referenced, I figured I should add this note:

The code should still work exactly as-is on the 2007 RC. (Besides firmware, is there any difference between the 2006 and 2007 RC?) The most one should need to do is add the 2007 library. Don’t replace the header files or you will loose compatibility with older controllers.