Go to Post I'll wait for someone else to do it, then disagree with whatever they say. :p - Jcarbon [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-02-2007, 00:55
kitscuzz's Avatar
kitscuzz kitscuzz is offline
Not alotta posts
AKA: Kit
FRC #1389 (Worst Case Scenario)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Home
Posts: 47
kitscuzz will become famous soon enough
A Neat Victor Fix

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:

Code:
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.

Quote:
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:
1. Power ON the speed controller.
2. 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.
3. 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.
4. While continuing to hold the Cal button, return the
joystick to center (neutral position).
5. Release the Cal button.
6. A flashing GREEN indicator confirms a successful
calibration.
7. 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:
1. Power OFF the speed controller.
2. Press and hold the Cal button.
3. While continuing to hold the Cal button, Power ON
the speed controller.
4. 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?

Last edited by kitscuzz : 12-02-2007 at 01:15.
  #2   Spotlight this post!  
Unread 12-02-2007, 01:02
Cody Carey's Avatar
Cody Carey Cody Carey is offline
,':-)
AKA: C. Carey
FRC #0306 (CRT)
Team Role: Alumni
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Corry, PA
Posts: 1,137
Cody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond repute
Send a message via AIM to Cody Carey Send a message via Yahoo to Cody Carey
Re: A Neat Victor Fix

Hmmm...


This reminds me a lot of THIS white paper... Nonetheless, that is an awesome Idea, and your code seems really simple.
__________________
  #3   Spotlight this post!  
Unread 12-02-2007, 01:10
kitscuzz's Avatar
kitscuzz kitscuzz is offline
Not alotta posts
AKA: Kit
FRC #1389 (Worst Case Scenario)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Home
Posts: 47
kitscuzz will become famous soon enough
Re: A Neat Victor Fix

Well you don't need to run through ALL the values, calibration just involves hitting a maximum and a minimum as many times as you please, and then when you're finished, you simply stop at 127, and let go of the cal button.

That's another side-note, make sure that you aren't pressing ANY buttons when you stop calibrating. That way 127 is the center, not anything else.

Last edited by kitscuzz : 12-02-2007 at 01:16.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
skype and other neat programs mechanicalbrain Chit-Chat 16 18-07-2005 14:27
Neat & Organised Electric Wiring thoughtful Electrical 30 13-12-2004 22:46
Neat gmail programs Joe Ross Chit-Chat 5 21-07-2004 02:03
Victor 884's not behaving the same as Victor 883's programmer1 Programming 13 10-03-2004 21:51
neat feature not seen here....... Clark Gilbert CD Forum Support 2 21-11-2001 04:53


All times are GMT -5. The time now is 00:22.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi