View unanswered posts | View active topics It is currently Fri Sep 19, 2014 5:50 am






Reply to topic  [ 3 posts ] 
Motor Power Manipulation, too sensitive. Top hat procedure? 
Author Message
Rookie

Joined: Wed Jan 21, 2009 4:51 pm
Posts: 2
Post Motor Power Manipulation, too sensitive. Top hat procedure?
Our team has the joystick controlling the motor, but as it is right now, it is too sensitive. The slightest touch of the joystick will turn the motor at too high of a power. it is worth noting that these motors are for an arm, not the drive train.

Also, prior to using the joystick, we wanted to use Tophat (the arrow buttons) but at every attempt we got an error, stating that it was not a procedure, Any help would be appreciated.


Wed Jan 21, 2009 5:02 pm
Profile
Rookie

Joined: Sun Nov 16, 2008 3:07 pm
Posts: 45
Post Re: Motor Power Manipulation, too sensitive. Top hat procedure?
We are using the top hat to tell the robot which direction to turn, like this:
else if(joystick.joy1_TopHat != -1)
{
// the top hat buttons say "turn to that compass point".
int desiRightWallHeading = joystick.joy1_TopHat * (360/8);
turn(desiRightWallHeading);
}

This exploits the fact that the tophat value will be a number between 0 and 7 (unless it isn't being pushed, in which case it is -1).

To attempt the other half of your question, you might want to make any joystick value near zero the same as being at zero by putting in a "deadband".

Our team (1001) did it like this:
if(joystick.joy1_y1 > deadband || joystick.joy1_y1 <-deadband)
{
motor[motorD] = joystick.joy1_y1;
}
else
{
motor[motorD] = 0;
}
if(joystick.joy1_y2 > deadband || joystick.joy1_y2 <-deadband)
{
motor[motorE] = joystick.joy1_y2;
}
else
{
motor[motorE] = 0;
}

and if you aren't having a zeroing problem, but rather a "too darn fast at any position" problem, then you can just divide the joystick value by some number before assigning it to a motor, like this:
motor[motorE] = joystick.joy1_y2 / 4;

That makes a joystick value, that will range from -128 to +127 or so map to motor commands from -30 to +30%.

If you are good with a joystick, but want fine slow speed control but not lose the max power options that the above system does, you can map them through an exponential system so the farther you push the joystick, the more effect (per degree of push) is has on the motor.


Wed Jan 21, 2009 10:33 pm
Profile
Rookie

Joined: Wed Jan 21, 2009 4:51 pm
Posts: 2
Post Re: Motor Power Manipulation, too sensitive. Top hat procedure?
incredible ideas. thank you so much. We will be trying it tomorrow.
Thanks again!


Wed Jan 21, 2009 11:43 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.