Quote:
Originally Posted by Wildcats1378
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.