Go to Post Did Dean by any chance mention red herrings? ;) - Cory [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 10-01-2008, 08:14
Abrakadabra Abrakadabra is offline
Here We Go !!!
AKA: Scott Kukshtel, Mr. K
FRC #3467 (The Windham Windup!)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Windham, New Hampshire
Posts: 160
Abrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant future
Question AndyMark SuperShifter Encoders

Has anyone actually tested the encoders that come shipped on the AndyMark SuperShifters? They're made by US Digital (US Digital E4P-250-250 ). They have a rate of 250 cycles per revolution, or because they're quad encoders, 1000 pulses (interrupts?) per revolution.

Everything I've read says that this interrupt rate is pushing the upper limits of the RC, especially if you are using multiple encoders (we're planning to use two). The trick is that since they are mounted to the final output drive shaft, there is no opportunity to reduce this rate. On the other hand, knowing that AndyMark always optimally engineers their products for use in FIRST competitions, I would think that they picked this particular encoder for a reason.

Should I be concerned? Do I need to look into some kind of divider card as well?

Thanks for any info.

Last edited by Abrakadabra : 10-01-2008 at 08:16. Reason: fixed link URL
  #2   Spotlight this post!  
Unread 10-01-2008, 08:52
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: AndyMark SuperShifter Encoders

Only one phase of the encoder output causes an interrupt, so you're off by a factor of two at the start. Digital inputs 1 and 2 trigger on only one edge of the signal, so there's another factor of two.

We used those encoders on our 2007 drivetrain. Even at top speed, interrupts were not an issue.
  #3   Spotlight this post!  
Unread 10-01-2008, 09:23
Phalanx's Avatar
Phalanx Phalanx is offline
Formerly Team 1089 (Mercury)
AKA: Michael Reffler
FRC #5431 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 1999
Location: Lewisville, TX (previously NJ)
Posts: 384
Phalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond repute
Re: AndyMark SuperShifter Encoders

Quote:
Originally Posted by Abrakadabra View Post
They have a rate of 250 cycles per revolution, or because they're quad encoders, 1000 pulses (interrupts?) per revolution.

Everything I've read says that this interrupt rate is pushing the upper limits of the RC, especially if you are using multiple encoders (we're planning to use two). The trick is that since they are mounted to the final output drive shaft, there is no opportunity to reduce this rate. On the other hand, knowing that AndyMark always optimally engineers their products for use in FIRST competitions, I would think that they picked this particular encoder for a reason.

Should I be concerned? Do I need to look into some kind of divider card as well?

Thanks for any info.
The answer is it depends on which implementation for counting and for interrupt handling you plan to use.

If you use and follow the methods by this white paper:
http://www.chiefdelphi.com/media/papers/1490
(we've done this in the past for lower count encoders ex.. H1-50 from USDigital)

Then yes your are going to be "pushing" the limits" and a line/signal divider might be wise. That is because your code will be interrupting on both the rising and falling edges of both the "A" and "B" phase, so you will get 1024 interrupts per revolution per encoder, yielding 2048 interrupts for two encoders per a single revolution.

If you use "Kevin Watson's" encoder code, the caveat is (as I understand it) that if the encoder is spinning at a high enough rate of speed it is possible for his routines to incorrectly interpret the direction and thereby mis count. (See his FAQ). Which is why we don't use it. But this method will give you only 256 interrupts per revolution and under those conditions there shouldn't be any issue. 512 is significantly lower than 2048.


I do hope this helps.
__________________
Don't just ask the experts, become one!
Leadership is not about ability. It's about responsibility!
Diagonally Parked in a Parallel Universe. It's okay we do Quantum Physics


  #4   Spotlight this post!  
Unread 10-01-2008, 13:51
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: AndyMark SuperShifter Encoders

Quote:
Originally Posted by Phalanx View Post
If you use "Kevin Watson's" encoder code, the caveat is (as I understand it) that if the encoder is spinning at a high enough rate of speed it is possible for his routines to incorrectly interpret the direction and thereby mis count.
Actually, this has little to do with my code. The problems really are interrupt latency and line capacitance. The latency is due to having to manually save a lot of contextual informaton before the actual ISR gets to execute (this much less of a problem with the 3.1 compiler). Capacitance is a problem because encoders generally have fairly weak drive capabilities, which makes it hard for them to drive the capacitance of the cabling and that 0.01uF capacitor IFI hangs off of the upper twelve digital inputs. This has the effect delaying the arrival of the phase b logic state to the PIC. I haven't done the calculation, but I imagine if you spin an encoder fast enough, the phase b signal will never settle to a valid logic voltage level because it spends all of its time transitioning between the two! I'm not sure which is the dominant effect, but I do know that the flip-flop solution mentioned in the FAQ goes a long way to negating these effects because it captures the state of phase b before it can transition to the other state and it provides much more drive current to drive the line capacitance. I should point out that the flip-flop should only be used with interrupts 1 and 2 of my code as it will cause ploblems with ISRs that use a state machine to track the encoder state, like the upper four inputs of my code or Dan's code that you mentioned. In these cases, a good alternative to the flip-flop is a 74xxx244 line driver, where xxx can be ACT, LS, etc.

-"Kevin"
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org

Last edited by Kevin Watson : 10-01-2008 at 13:54.
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
AM SuperShifter in Inventor ADZDEBLICK Inventor 17 02-01-2008 05:25
pic: AM Supershifter mount / cntr axle saddle rev 3 Andrew Schuetze Extra Discussion 7 28-12-2007 18:41
Mounting encoders to the AndyMark Joel J Technical Discussion 11 31-01-2007 21:32
andymark? Ian_Xodus General Forum 9 18-01-2007 22:08
3 Encoders stephenthe1 Programming 5 17-11-2005 19:21


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

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