View Single Post
  #4   Spotlight this post!  
Unread 20-10-2004, 02:59
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: Choosing an Encoder for the Drive-train

Quote:
Originally Posted by MikeDubreuil
There's a lot of great information here. Thanks a lot.

I'm trying to determine the maximum number of encoder pulses.

If I have a robot with an 8" wheel, the maximum speed being 10 ft/s and 128 Encoder Counts/Revolution. For this example let's pretend the encoder is connected to the same shaft as the wheel.The maximum number of pulses the encoder could generate would be 611. Is my math correct?
Yep.


Quote:
How would this be programmed? As a counter in the fast loop or as an interupt?
At the rate you're generating pulses, you'll do better with interrupts. Ideally, you'd want to dedicate some hardware to keep track of the pulse count. This could be done with a binary up/down counter as an example.


Quote:
Can the controller handle this many interupts per second?
With an efficient Interrupt Service Routine you should be able to do this (I've done it). Be aware that troubleshooting an errent ISR requires a thorough understanding of the underlying hardware and the machine code the compiler has generated for you.

If you have EE leanings, you might consider an FPGA-based prototyping board like this one from Xilinx for your design.

BTW, do you really need 1/5 of an inch worth of resolution?

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