View unanswered posts | View active topics It is currently Sun Jul 23, 2017 3:34 am

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
1 Encoder for 2 different motors
Author Message
Rookie

Joined: Mon Nov 08, 2010 2:00 pm
Posts: 6
1 Encoder for 2 different motors
Hi

Is there anyway possible that i could have 1 motor (the left drive motor) and 1 motor (the right drive motor) sync with the use of just one encoder on one of the motors? I don't want to have to use 2 different encoders for each motor. Is this possible? When i tried.... the side with the encoder would actually go at the speed i wanted but the other motor would not imitate it.
would it be something like this?

nMotorEncoder[motorA] = 0;
while(nMotorEncoder[motorA] < 1440) //turn one revolution only
{
motor[motorA] = 15;
motor[motorB] = motor[motorA];
}

Wed Nov 17, 2010 11:58 pm

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Re: 1 Encoder for 2 different motors
How can you be sure that at X amount of power, both motors turn at the exact same speed? What if motorA turns 10% faster than motorB? Unless you like your robot to go around in a wide circle, I think you may want to reconsider this approach

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]

Thu Nov 18, 2010 1:07 am
Guru

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Re: 1 Encoder for 2 different motors
In order to sync the speed of two motors, you must have the ability of monitoring the speed of both motors so you can adjust their relative speeds. This means you must have two encoders, one for each motor. However, if your goal is to have the robot drive straight, you could have a directional sensor such as the compass or gyro as your guiding sensor although I still think the encoder is more accurate.

Thu Nov 18, 2010 1:48 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 3 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