Go to Post This game is all about dealing with the unexpected and making changes on the fly. - Greg Hainsworth [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
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 02-07-2011, 08:38 AM
Talguy Talguy is offline
Registered User
FRC #2168
 
Join Date: Nov 2010
Location: CT
Posts: 8
Talguy is an unknown quantity at this point
Sync Two Jags

How can I get two jaguars to sync together their PIDs when I only have one encoder. Should I have it that the one jag w/ encoder sens their voltage ramp to the jag without an encoder. How are other teams doing it?
Reply With Quote
  #2   Spotlight this post!  
Unread 02-07-2011, 09:23 AM
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,547
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: Sync Two Jags

The following thread has some ideas, but no resolution. http://www.chiefdelphi.com/forums/sh...ad.php?t=89282 When you get it working, be sure to let people know how you did it.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-07-2011, 09:57 AM
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Sync Two Jags

You can try using one in %Vbus, Vcomp, or Current mode, feeding it the value you've gotten from the controlling Jaguar.
For any of these options, you'll want to do some processing to the data to get something acceptable. The trouble is, for low speeds the Jaguars like to return lots of zeros. (though perhaps my PID is tuned a little too high) When you tell a Jaguar in %Vbus or Vcomp to go "0", it doesn't ramp down, it just stops. This leads to very jerky movement. Perhaps a running average of the last 5 samples would work, or perhaps you just want to ignore all the zeros.

In Current Mode, the main issue is simply lack of accuracy. It's +-2 Amps below 8A, and +-1A above. That means you better have a pretty big load in order to use it. However, large loads are usually where the double motor is necessary.

I'm planning on wiring the encoder to both motors, and having the PID independent. Because both Jaguars are subject to the same conditions, I'm hoping I won't get significant integral windup. (Also, the integral is reset when the Jaguar output is "0")
__________________
-- Marshal Horn
Reply With Quote
  #4   Spotlight this post!  
Unread 02-07-2011, 10:33 AM
Talguy Talguy is offline
Registered User
FRC #2168
 
Join Date: Nov 2010
Location: CT
Posts: 8
Talguy is an unknown quantity at this point
Re: Sync Two Jags

Quote:
Originally Posted by kamocat View Post
You can try using one in %Vbus, Vcomp, or Current mode, feeding it the value you've gotten from the controlling Jaguar.
For any of these options, you'll want to do some processing to the data to get something acceptable. The trouble is, for low speeds the Jaguars like to return lots of zeros. (though perhaps my PID is tuned a little too high) When you tell a Jaguar in %Vbus or Vcomp to go "0", it doesn't ramp down, it just stops. This leads to very jerky movement. Perhaps a running average of the last 5 samples would work, or perhaps you just want to ignore all the zeros.

In Current Mode, the main issue is simply lack of accuracy. It's +-2 Amps below 8A, and +-1A above. That means you better have a pretty big load in order to use it. However, large loads are usually where the double motor is necessary.

I'm planning on wiring the encoder to both motors, and having the PID independent. Because both Jaguars are subject to the same conditions, I'm hoping I won't get significant integral windup. (Also, the integral is reset when the Jaguar output is "0")
Is it possible to wire one encoder to two jags?
Reply With Quote
  #5   Spotlight this post!  
Unread 02-07-2011, 10:59 AM
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Sync Two Jags

Yes, but you have to make a splitter for it.
Make sure to not wire the two 3v power supplies together, but connecting just their - terminal should be fine.

The way I was planning on doing it was taking a prototype board (5x3) and vertical 0.1" headers, and soldering across. That way, I could just take the encoder in its current configuration, plug it into the board, and have two adapter cables, one for each Jaguar.
It's also possible to have a board that plugs directly into one of the Jaguars, but that's a little harder to make.
__________________
-- Marshal Horn
Reply With Quote
  #6   Spotlight this post!  
Unread 02-07-2011, 11:18 AM
Talguy Talguy is offline
Registered User
FRC #2168
 
Join Date: Nov 2010
Location: CT
Posts: 8
Talguy is an unknown quantity at this point
Re: Sync Two Jags

ok I could just use an old PWM splitter cable
Reply With Quote
  #7   Spotlight this post!  
Unread 02-07-2011, 11:26 AM
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,112
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: Sync Two Jags

Quote:
Originally Posted by Talguy View Post
ok I could just use an old PWM splitter cable
Not exactly. Quadrature encoders have more than three connections.
Reply With Quote
  #8   Spotlight this post!  
Unread 02-07-2011, 12:08 PM
Talguy Talguy is offline
Registered User
FRC #2168
 
Join Date: Nov 2010
Location: CT
Posts: 8
Talguy is an unknown quantity at this point
Re: Sync Two Jags

Quote:
Originally Posted by Alan Anderson View Post
Not exactly. Quadrature encoders have more than three connections.
yea our's has four connections but I can type them both to a common ground and 5v supply. The A&B channels will be split to the jags
Reply With Quote
  #9   Spotlight this post!  
Unread 02-07-2011, 02:56 PM
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,620
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Sync Two Jags

We split the encoder like this.

A to both.
B to both.
GND to both.
VSupply from only one.

Don't connect the supplies together unless you diode OR them and if you do that use germanium diodes for the low voltage drop across the junction.

We had a little discussion amongst ourselves about how this shouldn't work, but given we've driven the Victor 884s unmatched into CIM gear boxes with a mere gear dividing the 2 output shafts, and given there's reverse protection on both the Jaguars and Victors (in case something turns into a generator) the risks are low.

There is a chance that one Jaguar might drive more of the mechanism load than the other, as they are able to spin each other's armature like this. It shouldn't be too much of a problem and when the load on the mechanism increases they should both start to contribute. This will make tuning them interesting considering that effectively they are both in a state of semi-permanent runaway.

Only thing I will warn you about...we did this for a velocity set point...not position (haven't thought about it the other way) and I strongly advise you to have a single harness handy in case someone thinks the split harness is causing your issues.

Last edited by techhelpbb : 02-07-2011 at 03:00 PM.
Reply With Quote
  #10   Spotlight this post!  
Unread 02-07-2011, 09:12 PM
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Sync Two Jags

Hook up your encoder to you "master" Jags only. Put your "slave" Jags into absolute Voltage mode.

In your TeleOp Continuous loop, do:

slaveJag.setX(masterJag.getVoltage());
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote
  #11   Spotlight this post!  
Unread 02-07-2011, 10:58 PM
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Sync Two Jags

Mr. Lim, have you tried this?
I had little success in LabVIEW.
http://www.chiefdelphi.com/forums/sh...5&postcount=10
__________________
-- Marshal Horn
Reply With Quote
  #12   Spotlight this post!  
Unread 02-08-2011, 10:16 PM
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Sync Two Jags

Quote:
Originally Posted by kamocat View Post
Mr. Lim, have you tried this?
I had little success in LabVIEW.
http://www.chiefdelphi.com/forums/sh...5&postcount=10
We have tried this, and anecdotally we are having success, in that we are able to get our robot to drive at the desired speeds, with what APPEAR to be balanced output from both. I haven't scoped, or otherwise recorded, or graphed the values, and our slave Jags appear to run in virtual lock-step with the master Jags.

We are using Java, and I'm wondering if there could be a difference in the implementation between languages, or the fact that we're passing the output voltage (i.e. -12V to 12V) from the master Jaguars to the slaves, and those output voltage values might be filtered to provide a meaningful value (i.e. not an instantaneous %Vbus).
__________________
In life, what you give, you keep. What you fail to give, you lose forever...

Last edited by Mr. Lim : 02-08-2011 at 10:18 PM.
Reply With Quote
  #13   Spotlight this post!  
Unread 02-10-2011, 10:17 AM
Hugh Meyer's Avatar
Hugh Meyer Hugh Meyer is offline
Registered User
FRC #1741 (Red Alert Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Greenwood Indiana
Posts: 158
Hugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud of
Re: Sync Two Jags

Quote:
Originally Posted by techhelpbb View Post
We split the encoder like this.

A to both.
B to both.
GND to both.
VSupply from only one.

If you connect the two GND wires together you can expect to have ground loop issues. This is only a problem with heavy loads where the motors are drawing significant current. We saw this issue last year in the CAN bus ground wire. We have an opto isolator in the circuit to prevent the ground loop.

So far the motors drive well. We see some unbalance, but not very much. We are still investigating if this unbalance is real, or inherit in our logging scheme.

Attached are two step response graphs from recent testing, one showing current and the other showing speed, both from the same run.

-Hugh
Attached Files
File Type: pdf RA11_PIDtest_Practice_Match5_log_Current.pdf (71.9 KB, 65 views)
File Type: pdf RA11_PIDtest_Practice_Match5_log_Speed.pdf (72.5 KB, 49 views)
Reply With Quote
  #14   Spotlight this post!  
Unread 02-10-2011, 11:07 AM
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,620
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Sync Two Jags

Quote:
Originally Posted by Hugh Meyer View Post
If you connect the two GND wires together you can expect to have ground loop issues. This is only a problem with heavy loads where the motors are drawing significant current. We saw this issue last year in the CAN bus ground wire. We have an opto isolator in the circuit to prevent the ground loop.

So far the motors drive well. We see some unbalance, but not very much. We are still investigating if this unbalance is real, or inherit in our logging scheme.

Attached are two step response graphs from recent testing, one showing current and the other showing speed, both from the same run.

-Hugh
Interesting. We'll keep that in mind.

Thanks.
Reply With Quote
  #15   Spotlight this post!  
Unread 02-10-2011, 11:31 AM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,997
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Sync Two Jags

Quote:
Originally Posted by Hugh Meyer View Post
So far the motors drive well. We see some unbalance, but not very much. We are still investigating if this unbalance is real, or inherit in our logging scheme.

Attached are two step response graphs from recent testing, one showing current and the other showing speed, both from the same run.
I didn't see any previous posts in this thread from Team 1741. Could you please provide some context for your post? (What is your drivetrain; What feedback sensor are you using; How do you have it connected; etc) Thanks.



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


All times are GMT -5. The time now is 03:51 AM.

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