View Single Post
  #1   Spotlight this post!  
Unread 19-02-2011, 22:45
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 357
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Encoder resolution to PidController, tuning

Using an encoder with the PidController class (for the first time) to control our arm position. We are using a gearbox from previous year's that has the US Digital encoder on the output shaft of the gearbox. That means that we aren't getting very many counts, only 360 per revolution. I set it to 4x mode when creating the encoder object and GetRaw() gives me the 4x count, but it looks like it uses the "regular" count to calcuate distance. Yes, I know I can set the distance per pulse to any scaling I want, but it's calculating it off the reguar not the 4x count, giving me less resolution. The encoder is passed to the PidController class with its source type set to "distance". My question is does this sound like I'm getting as much resolution as I can"?

I don't think its enough resolution because we can't seem to get it tuned to be very stable. Any tuning advice / tips? We are using the analog inputs on the driver's station to set Kp and KI (with scaling of course)

Also, the jaguar controlling it will fault if our full arm assembly is installed. That means its going over current right? Tomorrow we are going to change sprockets to gear it down some.

Thanks,
Brian
__________________
Brian K
Team 1225 Robotics Mentor

Last edited by SuperBK : 20-02-2011 at 10:58. Reason: Meant to say "tuning" in the title.
Reply With Quote