I posted this at the end of the “Bizarre driving issue” thread, but so far only one person replied and I thought a lot of teams may be interested in this:
Everyone has been talking about these “asymmetrical” deadzones, where one victor picks up speed more slowly in one direction, but not the other, but no one has ever found a good solution outside of lookup tables, or complicated sensors.
Has anyone ever tried recalibration of the Victors? It seems like the factory default position for the victors is not quite perfect for the ifi controller. We set up this simple code like so:
void Process_Data_From_Master_uP(void)
{
Getdata(&rxdata);
if(p1_sw_trig == 1)
pwm01=pwm02=pwm03=pwm04=254; // note: change these pwms to match the pwms connected to victors
else if(p1_sw_top == 1)
pwm01=pwm02=pwm03=pwm04=0; // note: change these pwms to match the pwms connected to victors
else
pwm01=pwm02=pwm03=pwm04=127; // note: change these pwms to match the pwms connected to victors
Putdata(&txdata);
}
And then ran the Victor calibration like this:
A quick warning that you should either calibrate all of the victors on your robot at once (because the victors don’t send any signals to the motors while calibrating), or disconnect all your motors.
Originally Posted by IFIRobotics 884 Users Manual
The Victor is pre-calibrated to values compatible with an
IFI Control System and re-calibration is not needed.
You can re-calibrate to achieve ‘full forward/reverse’
from your joystick movement if necessary.
NOTE: While in calibration mode, the Victor will
record the max PWM value detected as ‘full forward’,
the min PWM value as ‘full reverse’, and ‘neutral’ will
be the PWM value recorded at the release of the Cal
button. The following steps will guide.
User Calibration:
- Power ON the speed controller.
- Press and hold the Cal button. After a moment, the
LED indicator on the Victor will begin alternating
between RED and GREEN to indicate a cal mode.- While continuing to hold the Cal button, move the
joystick to the maximum and minimum positions.
This can be done in any order and as many times as
desired.- While continuing to hold the Cal button, return the
joystick to center (neutral position).- Release the Cal button.
- A flashing GREEN indicator confirms a successful
calibration.- A flashing RED indicator denotes an unsuccessful
calibration.
An unsuccessful calibration occurs when either:
a) Insufficient joystick travel was detected in forward
and/or reverse.
b) The trim tab is too far from center.
Resetting Calibration to Factory Pre-calibration:- Power OFF the speed controller.
- Press and hold the Cal button.
- While continuing to hold the Cal button, Power ON
the speed controller.- A flashing GREEN indicator denotes calibration is
reset. Release the Cal button.
Make sure that you use the provided code (or something similar) and whatever you do don’t recalibrate directly from a joystick axis because any imperfections in the joystick (like being slightly off-center, or not reaching 254 and/or 0) will ruin the calibration and make your deadzones worse, not better.
The wheels now seem to have none of the strange speed difference between forwards and backwards. Anyone else want to give it a try and report results?