Go to Post This is a risk. Life is full of risks. FIRST is life... therefore, FIRST is full of risks. - Andy Baker [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 Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 29-01-2010, 16:25
ChristopherBuck's Avatar
ChristopherBuck ChristopherBuck is offline
Registered User
FRC #0612
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: United States
Posts: 38
ChristopherBuck is a jewel in the roughChristopherBuck is a jewel in the roughChristopherBuck is a jewel in the rough
Problem using encoders on Jaguar

We have a quadrature encoder wired to the encoder inputs on the Jaguar, yet niether the TI utility, bdc-comm nor labview can use the jaguars in speed mode. In the bdc-comm utility, the option to use encoders is grayed out (see picture attached). Controling the jaguar and motor via Voltage mode works perfectly, but controling it via speed or position mode does not. does anyone have any ideas on how to fix this problem?
Attached Images
File Type: bmp pic.bmp (89.8 KB, 247 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2010, 16:52
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 189
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Problem using encoders on Jaguar

I couldn't see in your picture, but I assume you switched over to speed mode.

What this sounds like to me, if everything is hooked up correctly, is that you did not set your P, I, and D constants. With them at the default 0, your motor won't turn no matter what speed you tell it to go.

Start by setting a P value of a few hundred (P is the proportion correction to the error between the desired speed and actual speed) and see if that gets your motor spinning. Be careful, while tuning your PID constants the motor can sometimes move erratically. Leave I and D at zero for now.

Make sure you set the number of encoder lines (ticks per revolution) in the configuration tab.

The encoder/potentiometer radio buttons are grayed out in speed mode because speed mode only supports encoders at this time.

Whether this works or not, also be sure you're running the latest firmware on the Jaguars and the latest BDC-COMM (all version 87). They can be found here: www.luminarymicro.com/jaguar

If you are still having trouble, post some more info about your setup, and a full screen shot of the BDC-COMM screen.

-David

Last edited by dyanoshak : 29-01-2010 at 16:55.
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2010, 11:34
jskene jskene is offline
Registered User
None #0612
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Chantilly Virginia
Posts: 153
jskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to behold
Re: Problem using encoders on Jaguar

Thanks for the tip. We updated the Jaguar, and it now works.

There are still a few problems, though.

The motor jerks on-off at low speed (50 rpm or so and lower), and runs at much higher than the target speed in reverse. We set P=100, I=0, D=0, and set the encoder to 360 segments, as that's how many it has and it is on the output shaft of the KOP transmission.
__________________
Jerry Skene, mentor OOO OOO 2010 - Chairman's Award- DC OOOOOOOOOOOOOOOOOOOOOOOOOOO
Chantilly Academy, Team 612 - 2009 - Engineering Inspiration Award; Finalist - New Jersey
-----------------------------------2008 - Chairman's Award; Kleiner Perkins Award -Buckeye ---| ---Team Spirit Award - NASA/VCU
-----------------------------------2007 - Chairman's Award - NASA/VCU ---| ---Finalist; Kleiner Perkins Award - Chesapeake
-----------------------------------2006 - Chairman's Award - Chesapeake ---| --- Engineering Inspiration Award - NASA/VCU --
Reply With Quote
  #4   Spotlight this post!  
Unread 31-01-2010, 11:45
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 189
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Problem using encoders on Jaguar

Now that you've got it spinning, it is just a matter of tuning your constants.

I saw the same behavior when I was playing with a kit encoder, CIM, and a toughbox on our robot. I found that a much lower P with a little bit of I seemed to work well. I was using P = 0.3 and I = 0.001. It just takes time to find the perfect values for your system.

Good luck with tuning!

-David
Reply With Quote
  #5   Spotlight this post!  
Unread 31-01-2010, 23:48
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: Problem using encoders on Jaguar

Quote:
Thanks for the tip. We updated the Jaguar, and it now works.
Is this running on the cRio, or through BDC-COMM?
If it is on the cRIO, then which language are you using C++, Java, or Labview?

The reason that I am asking is because, in a few days, I will be wiring up the robot.
On the 1 jag that I used with the potentiometer, the position couldn't be read by the jag, but the position set-point could be sent.

If the encoder can be read in by the cRIO,
then I will use the speed control of the jaguar,
otherwise I will wire the encoders to the digital sidecar as I need them for autonomous.
__________________
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
  #6   Spotlight this post!  
Unread 01-02-2010, 07:49
jskene jskene is offline
Registered User
None #0612
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Chantilly Virginia
Posts: 153
jskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to behold
Re: Problem using encoders on Jaguar

So far we are running the Jag only through BDC-COMM, but today we will try it on the cRio and see if we can read the encoder. If not, we may wire the encoder both to the Jag and the cRio, as we also will need it for autonomous.

We'll update our progress on this forum.
__________________
Jerry Skene, mentor OOO OOO 2010 - Chairman's Award- DC OOOOOOOOOOOOOOOOOOOOOOOOOOO
Chantilly Academy, Team 612 - 2009 - Engineering Inspiration Award; Finalist - New Jersey
-----------------------------------2008 - Chairman's Award; Kleiner Perkins Award -Buckeye ---| ---Team Spirit Award - NASA/VCU
-----------------------------------2007 - Chairman's Award - NASA/VCU ---| ---Finalist; Kleiner Perkins Award - Chesapeake
-----------------------------------2006 - Chairman's Award - Chesapeake ---| --- Engineering Inspiration Award - NASA/VCU --
Reply With Quote
  #7   Spotlight this post!  
Unread 01-02-2010, 19:06
jskene jskene is offline
Registered User
None #0612
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Chantilly Virginia
Posts: 153
jskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to beholdjskene is a splendid one to behold
Re: Problem using encoders on Jaguar

e tweaked the PID values and it now works perfectly.

Here's a screenshot of what we used on the Toughbox:



We tried getting it to work on the cRio, and made some progress, but aren't there yet.

More tomorrow.
__________________
Jerry Skene, mentor OOO OOO 2010 - Chairman's Award- DC OOOOOOOOOOOOOOOOOOOOOOOOOOO
Chantilly Academy, Team 612 - 2009 - Engineering Inspiration Award; Finalist - New Jersey
-----------------------------------2008 - Chairman's Award; Kleiner Perkins Award -Buckeye ---| ---Team Spirit Award - NASA/VCU
-----------------------------------2007 - Chairman's Award - NASA/VCU ---| ---Finalist; Kleiner Perkins Award - Chesapeake
-----------------------------------2006 - Chairman's Award - Chesapeake ---| --- Engineering Inspiration Award - NASA/VCU --
Reply With Quote
  #8   Spotlight this post!  
Unread 04-02-2010, 23:00
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: Problem using encoders on Jaguar

Quote:
Originally Posted by jskene View Post

We tried getting it to work on the cRio, and made some progress, but aren't there yet.

More tomorrow.
Has there been any more progress made?

Luckily for me, I haven't fully wired the robot yet, so I still have time to wire it to the cRio if needed.

Which programming language are you using?
__________________
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
  #9   Spotlight this post!  
Unread 04-02-2010, 23:12
simpsonboy77 simpsonboy77 is offline
Registered User
AKA: Garrett Dicken
FRC #0041 (RoboWarriors)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: New Jersey
Posts: 87
simpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond repute
Re: Problem using encoders on Jaguar

Has anyone gotten the speed control to work without using the BDC utility, or Labview? I tried writing my own speed driver, but it doesn't work at all. I cannot use the utility because we don't have a black jaguar (yet, just ordered it).

If you have gotten the speed control, could you kindly post the code, or point me in the direction of a repository? The first forge hasn't been updated in a while, and only works for percent voltage. We are using C++.
__________________
2013 - Present MAR Control System Adviser and FTAA
2009 - Present Programming an Electrical Mentor Team 41
2005 - 2008 Team 41 Programmer
2008 NYC Regional Winner

Last edited by simpsonboy77 : 04-02-2010 at 23:13. Reason: typos
Reply With Quote
  #10   Spotlight this post!  
Unread 04-02-2010, 23:30
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,560
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: Problem using encoders on Jaguar

Quote:
Originally Posted by simpsonboy77 View Post
If you have gotten the speed control, could you kindly post the code, or point me in the direction of a repository? The first forge hasn't been updated in a while, and only works for percent voltage. We are using C++.
Have you looked at the subversion repository on FIRST Forge? It looks to me like it's been updated in the last 2 weeks and does have speed control.
Reply With Quote
  #11   Spotlight this post!  
Unread 05-02-2010, 00:23
simpsonboy77 simpsonboy77 is offline
Registered User
AKA: Garrett Dicken
FRC #0041 (RoboWarriors)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: New Jersey
Posts: 87
simpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond reputesimpsonboy77 has a reputation beyond repute
Re: Problem using encoders on Jaguar

I was looking at 'File releases'.

I setup an account (wow I hate those password restrictions) and I downloaded the current versions. I'm shocked at how close my code was to this. It gives me the (false) impression that I know what im doing haha.

Can't wait to test this tomorrow, (well technically today :0)

Thanks Joe.
__________________
2013 - Present MAR Control System Adviser and FTAA
2009 - Present Programming an Electrical Mentor Team 41
2005 - 2008 Team 41 Programmer
2008 NYC Regional Winner
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
Using Encoders svenw C/C++ 2 14-01-2010 16:43
Benchmark Test Jaguar Problem xxsumz Motors 3 13-02-2009 21:48
Jaguar Problem Sauce Electrical 7 10-01-2009 14:28
Jaguar Motor Controller Problem prashil27 Electrical 5 07-01-2009 21:21
Autonomous using encoders Mr.G Programming 11 17-01-2006 03:34


All times are GMT -5. The time now is 02:44.

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