View unanswered posts | View active topics It is currently Sun Sep 21, 2014 7:00 am






Reply to topic  [ 2 posts ] 
Motor Arm, Encoders, and Braking Help Please 
Author Message
Rookie

Joined: Sun Nov 30, 2008 7:34 pm
Posts: 2
Post Motor Arm, Encoders, and Braking Help Please
Hi,

We've been having problems programming the DC motors with the encoders. We have a DC motor at a 12:1 gear ratio rotating an 11 in. arm, and we were testing the strength of the motor. On our first test we used a 1 lb weight, because the motor should have been for sure able to handle that weight the way we geared it. Sometimes it worked exactly as it should have, rotating the weight up a little and then holding it there, but sometimes it would coast back down after rotating it up. Is there any reason that the program would work sometimes I ran it, but wouldn't work other times? Here it is:

void runMotor (int degrees)
{
nMotorEncoder[firstPivot] = 0;
while (nMotorEncoder[firstPivot] < degrees)
{
motor[firstPivot] = 100;
}
}

task main()
{
bFloatDuringInactiveMotorPWM = false;
runMotor (50);
while(true)
{
motor[firstPivot] = 0;
}
}

Thank you for your help.


Sun Nov 30, 2008 8:12 pm
Profile
Rookie

Joined: Sat Nov 29, 2008 4:21 am
Posts: 4
Post Re: Motor Arm, Encoders, and Braking Help Please
We also used a motor to power an arm and with only a 3:1 ratio. 50 clicks on the motor encoder is almost noting it seems to take a few thousand counts to a single rotation of the motor. We tested ours by programing the motor to respond to a joystick position. Simply set the motor power to equal the position of one of the axis on one of the sticks and you can test if your arm will hold in any position it can reach. ours does and it has another arm and motor on top of it.

_________________
Ian McBride
Benson Robotics Club


Mon Dec 01, 2008 5:56 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 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.