View Single Post
  #4   Spotlight this post!  
Unread 22-08-2013, 12:12
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,795
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: Encoder problems

Quote:
Originally Posted by Peleg2230 View Post
Thank you for the explanation and information, but, is there a way to read RPM around the range of 4000-6000?
There are a few simple ways to extend the rpm range of your encoder.
  1. Use an encoder that produces fewer counts per revolution, e.g., pick a 64 count encoder rather than a 256 count encoder.
  2. Use 1x sampling in your code rather than 2x or 4x sampling.
  3. For measuring a shooter wheel that only goes in one direction, you can also leave disconnected the encoder B channel. Since you won't care about determining direction the A channel is all you really need.
  4. Gear down the encoder shaft so it revolves more slowly than the shaft you are measuring.
So do the math:

1) Calculate the maximum samples per second that the encoders must support.
  • For example, an encoder that supports 10,000 samples per second
  • 6000rpm/60 = 100 revs per second
  • 10,000/100=100 counts per revolution maximum (so an encoder that produces 64 counts per revolution (cpr) would work at that speed, but a 128 cpr would not)
  • It's also worth noting that the encoder must be mechanically rated for the 6000 rpm you are proposing, too.
2) Calculate the number of pulses per second that the cRIO will support.
  • The cRIO input limit of ~39,000 pulses per second
  • 39,000/100 revs per second at 6000rpm =390 samples per rev maximum
  • So a 256 encoder at 1x sampling would work (< 390 samples per rev)
  • A 64cpr encoder would work at 4x sampling (64*4=256 < 390 samples per rev)
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 22-08-2013 at 12:57.
Reply With Quote