View unanswered posts | View active topics It is currently Wed Feb 10, 2016 3:12 am

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
motor inaccuracy
Author Message
Rookie

Joined: Tue Jul 03, 2012 5:16 am
Posts: 43
motor inaccuracy
I am experiencing some difficulty getting precision accuracy with the NXT motors. After using nMotorEncoderTarget for around 40 times, the motor error build upt to around 30 degrees inaccuracy. Aftering looking at the motorEncoder values during the program, I realised that they did not reset the motors. But then why does this large error occur?

Is there a better method of moving motors to a certain angle?

Would "while(nMotorEncoder[motorA] < angle){ motor[motorA] = 20; }" work as well?
 Code:void liftUp(){   nMotorEncoderTarget[motorA]=90;   motor[motorA]=20;   while(nMotorRunState[motorA] != runStateIdle){}   motor[motorA]=0;   }void liftDown(){   nMotorEncoderTarget[motorA]=-90;   motor[motorA]=-20;   while(nMotorRunState[motorA] != runStateIdle){}   motor[motorA]=0;   }

I used the functions above dozens of times in the program.

Tue Sep 25, 2012 8:27 pm
Guru

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Re: motor inaccuracy
When using sensors in the real world, unless the sensor is an absolute sensor (GPS or compass), you will have cumulative error. It may be due to mechanical slipperage or other factors. That's why we need to build in a calibration process. For example, an inkjet printer (or 3D printer) when printing a large image that takes a long time may need to go back to "home position" once in a while to recalibrate zero position. In your case, it looks like you have some sort of arm. You may want to put a touch sensor at 0 degree. Once in a while, you may want to move the arm back to zero position and clear the encoder value.

Tue Sep 25, 2012 8:50 pm
Rookie

Joined: Tue Jul 03, 2012 5:16 am
Posts: 43
Re: motor inaccuracy
I will do that. Thanks.

Thu Sep 27, 2012 5:07 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 3 posts ]

#### Who is online

Users browsing this forum: No registered users and 1 guest

 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    2014 Robotics Academy Summer of Learning    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