Go to Post FIRST is kind of like charity work... you are, even if only in some small way, helping our future just a little bit, and you get a great feeling from it. Even if you are just ringing a bell (or clapping MOE sticks together), you're helping. - Amanda Morrison [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-07-2010, 20:39
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Wheel encoder to Jaguar Wiring

Hi Gang,

Has anyone had success wiring a US Digital quadrature encoder to the PID input on a Jaguar? If so, what wiring did you use? The Jag has 5 lines, +5, A, B, I, Gnd. Are the A & B the same A & B from the US Digital? And, do you just ignore the I input on the Jaguar? Once that was done, what PID values did you use to close the loop?

TIA,

Mike
Reply With Quote
  #2   Spotlight this post!  
Unread 12-07-2010, 20:56
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,064
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: Wheel encoder to Jaguar Wiring

Quote:
Originally Posted by taichichuan View Post
Hi Gang,

Has anyone had success wiring a US Digital quadrature encoder to the PID input on a Jaguar? If so, what wiring did you use? The Jag has 5 lines, +5, A, B, I, Gnd. Are the A & B the same A & B from the US Digital? And, do you just ignore the I input on the Jaguar? Once that was done, what PID values did you use to close the loop?

TIA,

Mike
"I" on the Jaguar refers to Index, a feature of some encoders that helps to "home" the system to a consistent zero location. You can safely ignore it. A->A and B->B. The PID values usually require a bit of experimentation to get right; they depend on the specific motor, the load attached to it, and the gearing between the motor and the sensor.
Reply With Quote
  #3   Spotlight this post!  
Unread 13-07-2010, 15:58
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Wheel encoder to Jaguar Wiring

Thanks, that's what I thought. But, I've been completely unsuccessful at closing the loop with the Jaguars and a Mechanum drive. It seems to work OK at very high speed, but I get a lot of backlash at low RPMs. I've tried tinkering with the PID values, but I just can't seem to get a set that even comes close. I'm having better luck with running the encoders to the DS. But, they eat up my DIOs something fierce with 2 DIOs/wheel. I was just trying to see if I'd missed something obvious.

Thanks,

Mike
Reply With Quote
  #4   Spotlight this post!  
Unread 13-07-2010, 16:08
Jon Stratis's Avatar
Jon Stratis Jon Stratis is online now
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,706
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Wheel encoder to Jaguar Wiring

You can use the BDC-COMM application to quickly and easily make sure the encoders are hooked up correctly. Simply hook your computer up to the Jaguar, connect the program to it, and spin the wheel by hand - you should see the encoder counts change. We did that when we were trying to figure out our PID loop a while back.

Or you can get your code to periodically report the speed/distance of the wheels to show how it's working.
Reply With Quote
  #5   Spotlight this post!  
Unread 13-07-2010, 16:33
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Wheel encoder to Jaguar Wiring

We did that too. Everything looked good. But, when you tried to get it to actually work in motion, the wheels started to chatter terribly. It's possible that there was some issue with a couple of the gear boxes. But, there was just no joy :-(. Even when we tried just a P with not I or D, we couldn't get the system to stabilize.

Thanks,

Mike
Reply With Quote
  #6   Spotlight this post!  
Unread 13-07-2010, 16:34
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Wheel encoder to Jaguar Wiring

kP/gain/Proportional: This does most of the work. The output is proportional to the difference between what you want and what you have. output = (setpoint - process_variable)*kP, also known as gain

kI/Integral: This integrates the error over time, multiplies it by kI, and adds it to the output. Be very careful with this one, you should need a very tiny bit (a decimal with at least 2 0's in front of the digit seems about right). Too much and you will overshoot. Because of how it is designed, it will not stop applying power until it overshoots and unwinds the integral.

kD/Derivative: This takes the curve of the past action and accounts for momentum. The faster you have gone, the more this works to slow you down. This is always working against proportional.

you might not be "tinkering" with the PID values enough. Try setting kI and kD to 0 and then tuning kP. If it overshoots too much or oscillates, then turn it down. If it dosen't, increase it till it does and dial it in to the perfect number. You probably don't need kI and kD.

To give you an idea of scale, my inputs are all scaled to inches/second and the gain is 0.01. I did my math on the cRio (using Victors for output).
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #7   Spotlight this post!  
Unread 13-07-2010, 17:32
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Wheel encoder to Jaguar Wiring

Hmm... OK, we tried that. Setting kI & kD to 0 and then trying kP at anything > than .8 caused really bad results (back chatter of wheels) at low RPMs. I have to admit that I'm at a bit of a loss as to what's going on. If I have the kP at .35 and kI=0, kD=.003, it runs well at higher RPMs, but doesn't even come close to max voltage according to BD_COMM. Maybe at IRI I can find someone who's using Jaguars to close the loop and they can enlighten me as to what's going wrong.

Some folks are just saying that the Jags just suck. I'm inclined to give the Jags the benefit of the doubt until I talk with others.

Thanks,

Mike
Reply With Quote
  #8   Spotlight this post!  
Unread 13-07-2010, 19:16
s1900ahon s1900ahon is offline
Registered User
AKA: Scott McMahon
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 154
s1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant future
Re: Wheel encoder to Jaguar Wiring

What is the Jaguar firmware. Since you indicated you used BDC-COMM, this should be available to you.
Reply With Quote
  #9   Spotlight this post!  
Unread 13-07-2010, 22:47
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Wheel encoder to Jaguar Wiring

We were using Rev 89 firmware. I just updated them to Rev 91. Where there problems related to the encoders in Rev 89?

Thanks,

Mike
Reply With Quote
  #10   Spotlight this post!  
Unread 13-07-2010, 23:14
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,543
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Wheel encoder to Jaguar Wiring

Quote:
Originally Posted by taichichuan View Post
We were using Rev 89 firmware. I just updated them to Rev 91. Where there problems related to the encoders in Rev 89?
There was a problem with speed PID. See http://www.chiefdelphi.com/forums/sh...ad.php?t=84371
Reply With Quote
  #11   Spotlight this post!  
Unread 14-07-2010, 00:27
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Wheel encoder to Jaguar Wiring

It figures... That's what we get for not paying much attention to CD lately. I'll give the Jags another try after IRI.

Thanks,

Mike
Reply With Quote
  #12   Spotlight this post!  
Unread 14-07-2010, 13:54
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Wheel encoder to Jaguar Wiring

If you still have access to the robot, can you tell us what BDC COMM says for speed when you apply +12v (or +100%) to the motor?

Also, have you set in BDC COMM the number of lines per rotation (360 for this year's encoder, I believe.) ?
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #13   Spotlight this post!  
Unread 14-07-2010, 14:05
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,064
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: Wheel encoder to Jaguar Wiring

Quote:
Originally Posted by biojae View Post
Also, have you set in BDC COMM the number of lines per rotation (360 for this year's encoder, I believe.) ?
250 for the kit encoder from 2009, 360 for 2010.

Last edited by Jared Russell : 14-07-2010 at 14:09.
Reply With Quote
  #14   Spotlight this post!  
Unread 15-07-2010, 16:03
s1900ahon s1900ahon is offline
Registered User
AKA: Scott McMahon
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 154
s1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant future
Re: Wheel encoder to Jaguar Wiring

It probably doesn't hurt to suggest that you probably also want to get the latest BDC-COMM.
Reply With Quote
Reply


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
Quadrature Encoder Wiring to Digital Sidecar CrashOverride Electrical 7 23-06-2010 15:32
CAN Jaguar Enable Control .vi Initial Encoder Position TonyP CAN 0 26-02-2010 19:23
Encoder Wiring! RKElectricalman Electrical 2 10-02-2007 23:15
encoder wiring karin l. Motors 3 07-02-2007 00:14
Encoder Wiring Quesiton evileye917 Electrical 2 15-06-2005 15:14


All times are GMT -5. The time now is 08:45.

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