Go to Post Afterall, there's a thread for everything and everything in it's thread. - Molten [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 23-01-2006, 01:09
duane's Avatar
duane duane is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Vacaville
Posts: 95
duane is an unknown quantity at this point
Send a message via AIM to duane
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   Spotlight this post!  
Unread 23-01-2006, 01:42
Matt Adams's Avatar
Matt Adams Matt Adams is offline
b(o_o)d
FRC #1525 (Warbots)
Team Role: Engineer
 
Join Date: Dec 2003
Rookie Year: 2000
Location: Arlington Hts. IL
Posts: 375
Matt Adams has a reputation beyond reputeMatt Adams has a reputation beyond reputeMatt Adams has a reputation beyond reputeMatt Adams has a reputation beyond reputeMatt Adams has a reputation beyond reputeMatt Adams has a reputation beyond reputeMatt Adams has a reputation beyond reputeMatt Adams has a reputation beyond reputeMatt Adams has a reputation beyond reputeMatt Adams has a reputation beyond reputeMatt Adams has a reputation beyond repute
Send a message via AIM to Matt Adams
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   Spotlight this post!  
Unread 23-01-2006, 02:09
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: Max Encoder/Interrupt Frequency?

Quote:
Originally Posted by duane
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
Why do you need 64 PPR encoders on the shooting wheel? Just use a disk with a couple of holes drilled in it and a break-beam detector.

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...
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL

Last edited by Eldarion : 23-01-2006 at 02:11.
  #4   Spotlight this post!  
Unread 23-01-2006, 09:00
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,757
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 23-01-2006 at 09:12.
  #5   Spotlight this post!  
Unread 23-01-2006, 10:18
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Max Encoder/Interrupt Frequency?

Quote:
Originally Posted by duane
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
This should work fine. I decided to torture-test our current software setup: Camera, Gyro, and six encoders (we won't use all of them), and some reasonably intensive trig functions. Wiring up one encoder to all six encoder channels and spinning it with a high-speed drill, the code could keep up with it until just under 1600 pulses per second. Dropping this to just the first two encoders (which don't share an interrupt line), it can do at least 6000 pulses second (as fast as my drill went). So I don't think you'll have problems.
  #6   Spotlight this post!  
Unread 23-01-2006, 20:43
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
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.
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
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


All times are GMT -5. The time now is 11:22.

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