View Single Post
  #2   Spotlight this post!  
Unread 31-01-2010, 09:38
Doc Wu's Avatar
Doc Wu Doc Wu is offline
Registered User
AKA: Al Gritzmacher
FRC #1507 (Warlocks)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Lockport NY
Posts: 207
Doc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant futureDoc Wu has a brilliant future
Re: Motor to work like a servo...what's the best method?

Quote:
Originally Posted by grosh View Post
When we push a joystick button we would like a motor to spin forward 90deg, reverse direction, and stop when it returns to home.
That's the difference between a motor and a servo motor. A motor just rotates as long as power is applied. A Servo motor turns to a specific angle.

Quote:
Currently we have limit switches to reverse the direction of the motor and indicated when it is back to home poisition, but with the code we wrote only operates when the button is pushed. If we take our finger of the button the motor stops and does not return home. Should we set up a State Machine?
That would be a good way to do it. Ben Zimmer has a good tutorial on that at his FRCMastery site.

Quote:
Can we use the limit switches on the Jaguars to make this happen?
You could. I believe that is allowed if you are using CAN. It's not allowed in the rules for PWM driven motor controllers.

One thing about limit switches in general, a switch is not a positive stop. I've replaced hundreds - if not thousands - of limit switches in industry because they were destroyed when a machine overtravelled. A switch can only tell a controller that something is at a position. If the processor gets hung up in a loop, or the motor coasts, something needs to stop the mechanical motion besides the switch until the processor catches up.

For that reason, always have a mechanical stop and always put the switch out of the path of the motion!

Quote:
Where do we get good basic information on CAN? CAN looks interesting but we don't understand what the advantages and uses of CAN are.
There were a couple good presentations on CAN bus but since my team is not using it, I don't have the links. You'll probably be able to find them with the search, though.
__________________
-= Mentor Lockport Warlocks -=- Team 1507 =-
Amateur Radio Callsign: AE2T

2016 Robot Inspector - Fingerlakes, Pittsburgh
2015 Robot Inspector - Pittsburgh, Champs. Judge Observer - Champs
2014 Robot Inspector - Tech Valley, Fingerlakes, Buckeye, Championship
2013 Robot Inspector - Fingerlakes, Buckeye, Championship
2012 Robot Inspector - Fingerlakes, Buckeye, Championship - Website Evaluator - Fingerlakes, Buckeye, Championship
2011 Robot Inspector - Fingerlakes 2011 Safety Advisor - Fingerlakes

Reply With Quote