Go to Post Lose a year of bumper making and everyone's a rookie again. - mrnoble [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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 05-02-2007, 19:12
Torboticsmember's Avatar
Torboticsmember Torboticsmember is offline
Registered User
AKA: Alan Bartow
FRC #2080 (Torbotics)
Team Role: Driver
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Hammond
Posts: 82
Torboticsmember is a name known to allTorboticsmember is a name known to allTorboticsmember is a name known to allTorboticsmember is a name known to allTorboticsmember is a name known to allTorboticsmember is a name known to all
Victor 884 calibration

How do you calibrate a victor 884 so when using an xbox 360 controller the motors do not turn when not moving the joysticks.
  #2   Spotlight this post!  
Unread 05-02-2007, 23:31
Guru's Avatar
Guru Guru is offline
Executive Programmer
FRC #0912 (Iron Lyons)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Etobicoke (North York)
Posts: 12
Guru is an unknown quantity at this point
Re: Victor 884 calibration

That should be changed in your program. Output the values you receive from your joysticks to screen and when your joysticks are centered set that value to neutral.
__________________
\/\__Under Construction__/\/
  #3   Spotlight this post!  
Unread 06-02-2007, 00:02
Pavan Dave's Avatar
Pavan Dave Pavan Dave is offline
Busy in College
AKA: I am John Gault.
FRC #1745 (P-51 Mustangs) FRC #118 (Robonauts)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Richardson, Texas
Posts: 1,387
Pavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond reputePavan Dave has a reputation beyond repute
Send a message via AIM to Pavan Dave
Re: Victor 884 calibration

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.
Located Here.

Pavan.
__________________
Times change. People change. Teams change.
---
2008-Present: FRC1745, P51-Mustangs - Mentor
2005-2008: FRC118, Robonauts - Alumni
National Director of Philanthropy - Delta Epsilon Psi Fraternity, Inc.
1745 - 118 - ΔΕΨ
  #4   Spotlight this post!  
Unread 06-02-2007, 08:03
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,795
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Victor 884 calibration

All teams should be calibrating speed controllers to their control system. It is the only way to insure that you have full range in both directions and insuring that the joystick will cause a 127 when released (center position). Although the Victors come calibrated to known joystick values they have not been matched to your joysticks. Do your drivers a favor and calibrate.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #5   Spotlight this post!  
Unread 06-02-2007, 08:10
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Victor 884 calibration

In this case, the first thing I would do is calibrate the Chicklet. Follow the directions in the manual here. If you calibrate your robot code or Victors to match whatever the joystick is outputting now you could create a dangerous situation. Consider this: if your Chicklet is outputting a value of 110 when the joystick is centered, and you calibrate to this, then if the Chicklet gets unplugged (setting the joystick value to 127), your robot will drive forward. As a rule of thumb, you always want to start by calibrating your joystick such that it outputs 127 when it is centered.
  #6   Spotlight this post!  
Unread 06-02-2007, 08:12
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Victor 884 calibration

Quote:
Originally Posted by Al Skierkiewicz View Post
All teams should be calibrating speed controllers to their control system...
...or calibrating their control system to their joysticks. Doing it in software is not as convenient as using the built-in feature of the Victor, but it helps keep autonomous control values consistent.
  #7   Spotlight this post!  
Unread 06-02-2007, 08:32
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Victor 884 calibration

Quote:
Originally Posted by Alan Anderson View Post
...or calibrating their control system to their joysticks. Doing it in software is not as convenient as using the built-in feature of the Victor, but it helps keep autonomous control values consistent.
Yes, this is quite important for autonomous. I would not recommend doing what Al said (calibrating the Victors to the joysticks). This is what we do:
  • First, calibrate the joysticks such that the OI reads 127 when the joystick is centered. The IFI Dashboard makes this really easy.
  • Next, determine the minimum and maximum values that each joystick axis will output - they'll usually all be different (again, IFI Dashboard comes in handy).
  • Write scaling code that scales each joystick axis to the full 0-254 range.
  • Use this scaled value everywhere in code for driving. This allows your autonomous routines to send in a 0-254 value and look just like the joysticks.
  • Finally, we have special software that we use to calibrate the Victors. It does not output raw joystick values, but rather ensures that the PWM outputs are driven through their full range from 0 to 254.
After all this is done, from that point on the only thing that needs to be done is to adjust the joystick "min" and "max" values if a joystick is replaced, or to recalibrate a Victor only if it is replaced. Like Alan said, doing this ensures that your autonomous behaves correctly.
  #8   Spotlight this post!  
Unread 06-02-2007, 09:07
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,320
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme
Re: Victor 884 calibration

On my Xbox controller, My return-to-center values are 110 to 140, depending on from which way its returning to the center. I just put an input deadband in that covers these values.

Jacob
  #9   Spotlight this post!  
Unread 06-02-2007, 10:50
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Victor 884 calibration

Here is some code that can be used to scale the joysticks:
Code:
/* Typedefs so that compiler-independent types can be used.  These should be
 * defined in a single header file somewhere and included in all of your code.
 * While not strictly necessary, it is a good habit to get into. */
typedef char  s8;
typedef short s16;
typedef long  s32;

typedef unsigned char  u8;
typedef unsigned short u16;
typedef unsigned long  u32;

/* Always calibrate your joysticks so that they output 127 when in their
 * resting position.  Use the IFI Dashboard if necessary to help with this. */
#define JOYSTICK_MID 127

/* This function takes in a joystick value from the OI as well as a known
 * minimum and maximum value for this stick and scales it such that the value
 * is in the full 0-254 range.  The return value from the function is the new,
 * scaled value. */
u8 scale_joystick(u8 joystick_orig, u8 joystick_min, u8 joystick_max)
{
    s16 scaled_val = JOYSTICK_MID;

    /* First, make sure the original joystick value falls in between
     * joystick_min and joystick_max, in case it's slightly higher or lower
     * than we expected. */
    if(joystick_orig > joystick_max)
    {
        joystick_orig = joystick_max;
    }
    else if(joystick_orig < joystick_min)
    {
        joystick_orig = joystick_min;
    }

    if(joystick_orig > JOYSTICK_MID)
    {
        /* Formula: ((positive joystick deflection / positive range) * 127) +
         * 127.  Multiply by 127 before dividing by the range in order to
         * avoid floating-point operations. */
        scaled_val = ((s16)JOYSTICK_MID) +
            ((((s16)joystick_orig - ((s16)JOYSTICK_MID)) *
              ((s16)JOYSTICK_MID)) /
            ((s16)joystick_max - ((s16)JOYSTICK_MID)));
    }
    else if(joystick_orig < JOYSTICK_MID)
    {
        /* Formula: 127 - ((negative joystick deflection / negative range) *
         * 127).  Multiply by 127 before dividing by the range in order to
         * avoid floating-point operations. */
        scaled_val = ((s16)JOYSTICK_MID) -
            (((((s16)JOYSTICK_MID) - (s16)joystick_orig) *
              ((s16)JOYSTICK_MID)) /
            (((s16)JOYSTICK_MID) - (s16)joystick_min));
    }
    else
    {
        /* Do nothing - the incoming joystick value was 127, and the scaled
         * value is already defaulted to this. */
    }

    return scaled_val;
}
To use this code, you should determine the minimum and maximum values for each axis of each joystick and store them in your code as #defines. Then, call this function like this:
Code:
    /* #defines as an example */
    #define PORT1_X_MIN 24
    #define PORT1_X_MAX 249
    #define PORT1_Y_MIN 22
    #define PORT1_Y_MAX 250

    ...

    p1_x = scale_joystick(p1_x, PORT1_X_MIN, PORT1_X_MAX);
    p1_y = scale_joystick(p1_y, PORT1_Y_MIN, PORT1_Y_MAX);
You'll want to put that code shortly after the Getdata() call in Process_Data_From_Master_uP(), before p1_x, p1_y, etc. get used by anything else. Don't forget to change your #defines if you change your joysticks.
  #10   Spotlight this post!  
Unread 06-02-2007, 22:35
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 454
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Victor 884 calibration

Quote:
Originally Posted by whytheheckme View Post
On my Xbox controller, My return-to-center values are 110 to 140, depending on from which way its returning to the center. I just put an input deadband in that covers these values.

Jacob

This is why we recommend the Logitech Dual action instead of the X-box controller. The X- box is not as consistent when returning to center.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions
  #11   Spotlight this post!  
Unread 06-02-2007, 22:54
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: Victor 884 calibration

I would actually recommend that new teams with no experience in calibrating the victors avoid doing so at all costs unless you can get a qualified person to help. We tried it in 2005, when we had all rookie team-members, and it caused us nothing but harm. The 'bot would go crazy during autonomous, and we could never get the controls to respond right. Looking back now, we can see that this was all do to the fact that we had zero experience in electrical/programming, and made mistakes... but they were easy ones to make. Try to stick to the trim-tabs on the joystick. In cases like with the Xbox controller, your dead band is an awesome and simple solution to the problem.
__________________
  #12   Spotlight this post!  
Unread 07-02-2007, 00:17
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Victor 884 calibration

This is why I love the USB Chicklet. With the Logitech 3D Pro, full forward is EXACTLY 254, full reverse EXACTLY 0, and neutral EXACTLY 127. You don't need to worry about scaling code, or about calibrating to joysticks and not to software.
  #13   Spotlight this post!  
Unread 07-02-2007, 09:44
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 454
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: Victor 884 calibration

Quote:
Originally Posted by Dave Flowerday View Post
In this case, the first thing I would do is calibrate the Chicklet. Follow the directions in the manual here. If you calibrate your robot code or Victors to match whatever the joystick is outputting now you could create a dangerous situation. Consider this: if your Chicklet is outputting a value of 110 when the joystick is centered, and you calibrate to this, then if the Chicklet gets unplugged (setting the joystick value to 127), your robot will drive forward. As a rule of thumb, you always want to start by calibrating your joystick such that it outputs 127 when it is centered.
I could not agree with this more. Keep neutral 127. The Chicklets are production calibrated with this in mind. This means that when the device(gamepad/joystick) is unplugged from the Chicklet, the Chicklet will set its outputs to 127. This is only valid if your device returns to center. The purpose of the user calibration is to correct for inaccuracies in the device(gamepad/joystick). User calibration should be performed with any new device and that device should be matched and used with the chicklet that it was calibrated with.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions
  #14   Spotlight this post!  
Unread 15-02-2007, 09:33
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Victor 884 calibration

Quote:
Originally Posted by Alan Anderson View Post
...or calibrating their control system to their joysticks. Doing it in software is not as convenient as using the built-in feature of the Victor, but it helps keep autonomous control values consistent.
Exactly. It's been years since Team 95's robots have ever had (except for testing purposes) a joystick axis hooked directly to a PWM in code.
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
Victor Calibration railerobotics Electrical 11 16-01-2006 18:24
Victor 884 Calibration Incorrect Just3D Electrical 4 15-02-2004 15:20
Recalibrating Victor 884 Greg Electrical 8 18-02-2003 14:07
Victor 884 Kevin Ray General Forum 25 28-01-2003 15:02
Victor 884 Gary Bonner Technical Discussion 4 14-01-2002 08:10


All times are GMT -5. The time now is 06:49.

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