View Single Post
  #4   Spotlight this post!  
Unread 02-02-2013, 21:23
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,066
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoder for a fly wheel

Quote:
Originally Posted by Wildcats1378 View Post
No, we aren't dead set on using an encoder. I simply thought that was the best way to determine speed.

Since it is a flywheel for our frisbee shooter and it is connected to a minicim, I'd just guess in the area of 2000-4000 rpm? Those kinds of speeds.
You could get a very clean speed signal at those speeds (maybe +/- 2 rpm) with very little phase lag using the GetPeriod() method in the Counter class. Instantiate the counter at 1X. Grab GetPeriod() and divide it into 60 to get RPM (for a one-per-rev counter like we're discussing here). Do not filter the signal.

With a good signal like that you should be able to use the simple bang-bang speed control algorithm. Fastest spinup and recovery time and no tuning required.

Search Chief Delphi. Quite a few teams are doing it this way with good success.