Go to Post This forum is a really great tool to get people connected to the rest of FIRST communities, as well as a great place to learn from other people and share a little part of yourself. - Ken Leung [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 06-03-2011, 13:33
Tomker's Avatar
Tomker Tomker is offline
Registered User
AKA: Tom Kertesz
FRC #1690 (Orbit)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 54
Tomker will become famous soon enough
Question: how many encoders can be used on the robot?

We want to use 5 Encoders on the robot but we were not sure if the CRio will let us do so...
if anyone knows the answer please help us!!!
  #2   Spotlight this post!  
Unread 06-03-2011, 13:35
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Question: how many encoders can be used on the robot?

Quote:
Originally Posted by Tomker View Post
We want to use 5 Encoders on the robot but we were not sure if the CRio will let us do so...
if anyone knows the answer please help us!!!
I tried making 5 different encoders in java but I got an error telling me too many encoders.
  #3   Spotlight this post!  
Unread 06-03-2011, 13:37
Trevor1743 Trevor1743 is offline
Registered User
FRC #1743
 
Join Date: Jan 2011
Location: pittsburgh
Posts: 22
Trevor1743 is an unknown quantity at this point
Re: Question: how many encoders can be used on the robot?

I believe that each encoders uses 2 digital input on the digital side card. So theoretically you could use 5 with 1 side card, and 10 with 2 side cards.
  #4   Spotlight this post!  
Unread 06-03-2011, 13:39
AllenGregoryIV's Avatar
AllenGregoryIV AllenGregoryIV is offline
Engineering Coach
AKA: Allen "JAG" Gregory
FRC #3847 (Spectrum)
Team Role: Coach
 
Join Date: Jul 2008
Rookie Year: 2003
Location: Texas
Posts: 2,557
AllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond repute
Send a message via AIM to AllenGregoryIV
Re: Question: how many encoders can be used on the robot?

The FPGA will only let you declare 8 encoders. We are currently using 5 on our robot with out problems.

However there is a bug in the encoder code that won't let you return rate values for all 8 of those encoders.
__________________

Team 647 | Cyber Wolf Corps | Alumni | 2003-2006 | Shoemaker HS
Team 2587 | DiscoBots | Mentor | 2008-2011 | Rice University / Houston Food Bank
Team 3847 | Spectrum | Coach | 2012-20... | St Agnes Academy
LRI | Alamo Regional | 2014-20...
"Competition has been shown to be useful up to a certain point and no further, but cooperation, which is the thing we must strive for today, begins where competition leaves off." - Franklin D. Roosevelt
  #5   Spotlight this post!  
Unread 06-03-2011, 13:47
Tomker's Avatar
Tomker Tomker is offline
Registered User
AKA: Tom Kertesz
FRC #1690 (Orbit)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 54
Tomker will become famous soon enough
Re: Question: how many encoders can be used on the robot?

if i declare 3 encoders in the autonomous period and i declare 4 encoders in the teleop it will be fine?
(by declaring i meen using its value while 2/3 encoder from the autonomous period also used in the teleop)
  #6   Spotlight this post!  
Unread 06-03-2011, 13:50
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,580
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: Question: how many encoders can be used on the robot?

Quote:
Originally Posted by AllenGregoryIV View Post
The FPGA will only let you declare 8 encoders. We are currently using 5 on our robot with out problems.
Quote:
Originally Posted by MagiChau View Post
I tried making 5 different encoders in java but I got an error telling me too many encoders.
Both of you are right.

You can use 4 encoders in 4x decoding, and 8 more in 1x or 2x. This is described in the WPI Robotics Library User's Guide.

Quote:
Originally Posted by Trevor1743 View Post
I believe that each encoders uses 2 digital input on the digital side card. So theoretically you could use 5 with 1 side card, and 10 with 2 side cards.
There are 14 DIO lines on the digital sidecar, not 10.

Last edited by Joe Ross : 06-03-2011 at 13:53.
  #7   Spotlight this post!  
Unread 06-03-2011, 20:17
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: Question: how many encoders can be used on the robot?

Quote:
Originally Posted by AllenGregoryIV View Post
The FPGA will only let you declare 8 encoders. We are currently using 5 on our robot with out problems.

However there is a bug in the encoder code that won't let you return rate values for all 8 of those encoders.
What language does this rate bug occur in, and will it occur if you're only using two encoders?
__________________
Attending: MN Duluth Regional
  #8   Spotlight this post!  
Unread 06-03-2011, 20:23
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: Question: how many encoders can be used on the robot?

The rate bug is in the FPGA image, so it affects all languages.
It affects every other encoder, so any number of encoders will have a few which do not return rate (the first one will be affected, the second will not).

If you only need distance, you can use the broken FPGA encoder modules for distance only, and not use Rate.
__________________
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
  #9   Spotlight this post!  
Unread 06-03-2011, 21:39
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 947
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Question: how many encoders can be used on the robot?

Quote:
Originally Posted by apalrd View Post
The rate bug is in the FPGA image, so it affects all languages.
It affects every other encoder, so any number of encoders will have a few which do not return rate (the first one will be affected, the second will not).

If you only need distance, you can use the broken FPGA encoder modules for distance only, and not use Rate.
I have some questions for you experienced encoder-folk. This year 1675 has finally made its way into the world of motor feedback loops (at least on our test benchtop system).

We are using the rate on the encoder, and setting the distance per pulse to scale to -1.0 to 1.0 for the PIDController that goes to the motor controller.

I was perusing the WPILib users guide, at first because we were planning on using 5 encoders (4 drive, 1 lift) and assumed they could all be 4x (thankfully, I saw this thread!). I am under the assumption from reading the Guide that a 2x Encoder can still determine direction (our lift encoder would be a simple counter, it does need to count up and down though).

If a 2x Encoder can indeed tell direction, is the reduction in accuracy enough to make it a bad choice for drive? We'd need 4 encoders that can do rate for our current desired drive code system.
  #10   Spotlight this post!  
Unread 06-03-2011, 22:02
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: Question: how many encoders can be used on the robot?

Quote:
Originally Posted by apalrd View Post
The rate bug is in the FPGA image, so it affects all languages.
It affects every other encoder, so any number of encoders will have a few which do not return rate (the first one will be affected, the second will not).

If you only need distance, you can use the broken FPGA encoder modules for distance only, and not use Rate.
Do you believe an easy work around would be to create twice the number of encoder objects, and stagger the "fake" ones on inputs we don't with the "real" ones, as to only let the fake ones have the broken code, and the real ones get the rates? We do need the rates.
__________________
Attending: MN Duluth Regional
  #11   Spotlight this post!  
Unread 06-03-2011, 22:07
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: Question: how many encoders can be used on the robot?

We are using all 1x decoding on our drive, with AndyMark 250-count encoders, and chain slack is a larger cause of innacuracy then the encoders themselves.

For a 250-count encoder, you will get 250 pulses (rising edge of one phase) per rotation. This is A LOT. For 2x, you will get 500 pulses (rising and falling edge of one phase) per rotation. This is still A LOT. With both of these, the B-phase will only be used to determine direction (but you still have direction). For 4x, you will get 1000 pulses (rising and falling edge of both phases). This is a serious ton of pulses.

Our drive is 1:1 from the encoder to 6" wheels (that's what happens with SuperShifter and live-axle drives), so we get about 1.4 degrees of accuracy, which translates into about 1/8" of movement. Far more than we actually need.

On PID:
You can scale the input to whatever you like. IT dosen't matter. As long as the setpoint and sensor are of the same units, the output scale does not matter (it will when you tune it, but it will only change the magnitude of the gains).

Also - If you need 4 encoders with rate, you will have to use FPGA counters (1x or 2x) because there are not 4 working rate encoders. jhersh posted a fix for LabVIEW here, which just disables all of the non-working encoders. http://www.chiefdelphi.com/forums/sh...4&postcount=54
__________________
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
  #12   Spotlight this post!  
Unread 07-03-2011, 12:38
AllenGregoryIV's Avatar
AllenGregoryIV AllenGregoryIV is offline
Engineering Coach
AKA: Allen "JAG" Gregory
FRC #3847 (Spectrum)
Team Role: Coach
 
Join Date: Jul 2008
Rookie Year: 2003
Location: Texas
Posts: 2,557
AllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond repute
Send a message via AIM to AllenGregoryIV
Re: Question: how many encoders can be used on the robot?

Thanks for the clarification about the number of encoders you can declare with the different scale factors.

As far as getting rates from the encoders. We were able to get 4 rates by declaring 8 encoders 1,3,5 and 8 seemed to work for us. These were all declared at 2x. Encoders 2,4, and 6 were fake encoders that were assigned the digital inputs of limit switches that we were using for other things. Encoder 7 was used for our lift but we didn't need the rate from it. You may be able to get more rates by using the 4x encoders, but I am not sure. The best way is to just test them, when you get NaN as a rate you know that encoder declaration position won't work and just move on to the next one.
__________________

Team 647 | Cyber Wolf Corps | Alumni | 2003-2006 | Shoemaker HS
Team 2587 | DiscoBots | Mentor | 2008-2011 | Rice University / Houston Food Bank
Team 3847 | Spectrum | Coach | 2012-20... | St Agnes Academy
LRI | Alamo Regional | 2014-20...
"Competition has been shown to be useful up to a certain point and no further, but cooperation, which is the thing we must strive for today, begins where competition leaves off." - Franklin D. Roosevelt
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


All times are GMT -5. The time now is 05:23.

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