View Single Post
  #14   Spotlight this post!  
Unread 30-01-2004, 00:35
Mike Rozar's Avatar
Mike Rozar Mike Rozar is offline
Registered User
FRC #0547 (F.E.A.R (Falcon Engineering And Robotics))
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Fayetteville, Tennessee
Posts: 23
Mike Rozar is an unknown quantity at this point
Re: PID control loop/Encoder question

Quote:
Originally Posted by Larry Barello
The local io loop is very fast. I think I clocked it at a mere 29 cycles (doing nothing else, of course) which is many hundred thousand times per second.

HOWEVER, that isn't guarenteed! Once every 26.2 ms the main loop fires off and who knows how long that will take.

So I ran my encoder stuff off the PORTB 4-7 interrupt lines (IFI digital inputs 2-5), enabled the port B change interrupt so it interrupts whever any line changes.

When choosing encoders & such, keep in mind that the IFI CPU can only handle around 5-8 thousand counts/sec each for two encoders. So figure out how many RPM, how many slots (multiply by four for quadrature) and do the math. If you are substantially higher than 10k/sec total, then re-think.

I posted my quadrature code (including interrupt setup) in the thread about Yaw sensors.
Our team has assumed that since we are controlling the direction of the motors, we would not need quadrature for directional counting. Are we missing something?
__________________
Mike Rozar, Engineer & Mentor
Team F.E.A.R. 547
Falcon Engineering And Robotics

2001 VCU Rookie All Star
2001 National Rookie All Star
2002 KSC Delphi Driving Tomorrows Technolgy
2002 Newton Quarter Finalist
2003 St. Louis GM Industrial Design
2003 Archimedes Finalist (47, 201, 547)
2004 St. Louis Chairman's Award
2005 Gret Lakes Judges Award
2006 St. Louis Winner (547, 71, 537)
...and the journey continues