View unanswered posts | View active topics It is currently Thu Apr 26, 2018 3:21 pm

 Page 1 of 1 [ 2 posts ]
 Print view Previous topic | Next topic
Motor Arm, Encoders, and Braking Help Please
Author Message
Rookie

Joined: Sun Nov 30, 2008 7:34 pm
Posts: 2
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;
}
}

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

Sun Nov 30, 2008 8:12 pm
Rookie

Joined: Sat Nov 29, 2008 4:21 am
Posts: 4
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
Display posts from previous:  Sort by
 Page 1 of 1 [ 2 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning