View Single Post
  #3   Spotlight this post!  
Unread 09-04-2013, 22:47
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Question about encoders to control motor

We use a bang-bang controller very successfully. It is very simple:

1) decide on the RPM you want for your shooter. Let's call it DesiredRPM.

2) You have the RPM from your encoder. Call it ActualRPM.

3) Implement your LabVIEW code as follows:

if (ActualRPM < DesiredRPM)
MotorOutput = 1.0;
else
MotorOutput = 0;

The keys to this working well are:

1) Do NOT filter or use averaging of your RPM reading from your encoder.

2) Run it in the fast loop. We do it in a 30 ms loop and we get good results.

If you have any questions or want any help with setting it up or testing, come find me in our pit on Wednesday evening. I won't be at the competition during the day on Thursday and Friday (I'll be at work).
__________________
-
An ounce of perception is worth a pound of obscure.