View unanswered posts | View active topics It is currently Thu Dec 13, 2018 10:11 am

Reply to topic  [ 3 posts ] 
1 Encoder for 2 different motors 
Author Message

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

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
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post 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
Profile WWW
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Post 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  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

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.