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