View Single Post
  #9   Spotlight this post!  
Unread 26-01-2010, 23:56
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Position Control using potentiometer?

Quote:
Originally Posted by dyanoshak View Post

Some things to look at and/or try:

How do you have your potentiometer wired to the Jaguar? The Jaguar's analog port is designed with an internal 1K resistor in series with the '+' connection so that when using an external 10K potentiometer, the voltage range is between 0V and 3.0V instead of 0V and 3.3V. Check out the wiring diagram on page 22 of the Getting Started Guide (linked to on the Jaguar site).

Are you setting the number of turns correctly in the Configuration tab?
The possible set positions range from 0 to <POT Turns>

Are you setting the desired position at a position that is actually obtainable? Move the potentiometer by hand and see what values are read by the Jaguar. You might be trying to hold a position that will never happen.
Ok, here is the current set up. I have a potentiometer hooked up to the output shaft of a toughbox.
It is a 1 turn potentiometer, but the output shaft only turns ~200 degrees before hitting hard physical stops.

When the shaft is at the reverse physical stop, the position reported is 0.
When the shaft is at the forward physical stop, the position reported is ~1.

when i try a setpoint of 0.5, directly in the middle of rotation, from the forward limit, the shaft turns further towards the forward limit until it activates the limit switch.

So, I try negating the pid constants, it turns way past the setpoint (0.5) until it hits the reverse limit.

What should the PID values approximately be to get the jag to slowly apply power to turn the shaft?
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote