|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Max Encoder/Interrupt Frequency?
We are going to be using three encoders, two for position control (on the drive wheels) and one for speed control. We expect the motor that we need speed control on to be going a max of about 2500 RPM. We are using the 63K encoders that should handle this speed, but I'm concerned about the interrupt speed on the processor.
Are we going to overwhelm the processor? If the processor is at 10MHz, 2000RPM with a 64 PPR encoder is a little over 2100 interrupts per second. That doesn't seem to bad, but we don't have first handle knowledge like some others. Add in some positioning encoders, and is this going to work? Thanks for the advice. ...Duane |
|
#2
|
|||||
|
|||||
|
Re: Max Encoder/Interrupt Frequency?
Have you considered use of a tachometer instead?
It will provide a feedback voltage proportional to the speed. This could eliminate all your worries. Matt Last edited by Matt Adams : 23-01-2006 at 02:05. |
|
#3
|
|||||
|
|||||
|
Re: Max Encoder/Interrupt Frequency?
Quote:
Oh and by the way, the controller will handle a few thousand pulses per second in quadrature; that should be much higher without quadrature, as you just have to increment a counter. And I think the proccessor is running at 40MHz, not 10MHz. Just my 2 cents... ![]() Last edited by Eldarion : 23-01-2006 at 02:11. |
|
#4
|
|||||
|
|||||
|
Re: Max Encoder/Interrupt Frequency?
We usually design for under 10,000 interrupts per second (5K last year), but we have tested with more at free wheeling speeds.
It isn't just the speed of the processor but the efficiency of your fast loop code and what else you attempt to do in there that will determine your limit. In extreme cases if your slow loop is so bloated that it pushes 26ms, then you'll be seriously impacted. I'd measure the time of your fast loop with an internal timer or with a scope attached to a digital output that you reverse every loop. The loop times will vary based on the semi-random combinations of high/low interrupts, etc. I'd take the slowest time measured and cut that by 50% or more as a safety factor to determine your maximum acceptable interrupts per second. If you're real ambitious you can even model the interrupts you will be adding by including some extra processing delay equivalent to the rate you choose to design for. I'd also measure again after you implement to be sure you're still within your self imposed spec. as regards loop time. Last edited by Mark McLeod : 23-01-2006 at 09:12. |
|
#5
|
||||
|
||||
|
Re: Max Encoder/Interrupt Frequency?
Quote:
|
|
#6
|
|||||
|
|||||
|
Re: Max Encoder/Interrupt Frequency?
10MHz = 10,000,000 cycles / second
40MHz * 1 instruction / 4 cycles = 10,000,000 instructions / second I think that may be a little excessive, yes. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lightwave to Max Converter? | Ian Curtis | 3D Animation and Competition | 0 | 16-05-2005 12:33 |
| 3ds max VS Maya VS XSI | DisTurbed | 3D Animation and Competition | 7 | 08-08-2002 22:52 |
| Text effects in 3DS Max... | Ranma | 3D Animation and Competition | 6 | 28-02-2002 21:56 |
| FIRST MAX Animation Tutorials | Robby O | 3D Animation and Competition | 2 | 01-02-2002 22:53 |
| Ahhhh! I've had it with 3dstudio max! | AnnyRob | 3D Animation and Competition | 6 | 29-01-2002 11:23 |