Go to Post ...Of course, all the scales in the world won't help you if your robot is 135lb two nights before the ship date... - J Flex 188 [more]
Home
Go Back   Chief Delphi > Technical > Motors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-12-2007, 12:43
Japper's Avatar
Japper Japper is offline
Registered User
FRC #3692 (RocknRobots)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Rutland Wisconsin
Posts: 147
Japper has a spectacular aura aboutJapper has a spectacular aura about
How do you sync multiple motors?

Our team is playing around with parts from last years robot and have been experimenting with multiple motors and 4 wheel drive but we need to synchronize the motors.

Is there an easy way to do this so that the motors on each side are running at the same speed?

We have one victor per motor and the victors per each side are sent the same PWM data. Is this just a matter of calibrating the victors?

Please advise

Thanks
  #2   Spotlight this post!  
Unread 06-12-2007, 12:46
T3_1565 T3_1565 is offline
Registered User
AKA: Twitch Drive Designer
FRC #1360
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Burlington, Ontario
Posts: 855
T3_1565 has a brilliant futureT3_1565 has a brilliant futureT3_1565 has a brilliant futureT3_1565 has a brilliant futureT3_1565 has a brilliant futureT3_1565 has a brilliant futureT3_1565 has a brilliant futureT3_1565 has a brilliant futureT3_1565 has a brilliant futureT3_1565 has a brilliant futureT3_1565 has a brilliant future
Send a message via MSN to T3_1565
Re: How do you sync multiple motors?

Well if your willing to get more parts, encoders work wonders on syncing motors to run the same speed. As far as I know, if you don't buy any more parts, I don't think you can get them EXACTLY the same. because no motor is exactly the same.

Someone correct me if I'm wrong though
  #3   Spotlight this post!  
Unread 06-12-2007, 13:23
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: How do you sync multiple motors?

You could use encoders or a gyro to solve this problem and ensure that your drive straight.
  #4   Spotlight this post!  
Unread 06-12-2007, 13:34
Richard Wallace's Avatar
Richard Wallace Richard Wallace is offline
I live for the details.
FRC #3620 (Average Joes)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1996
Location: Southwestern Michigan
Posts: 3,674
Richard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond repute
Re: How do you sync multiple motors?

Quote:
Originally Posted by chris31 View Post
You could use encoders or a gyro to solve this problem and ensure that your drive straight.
The gyro approach might be simpler, if you have access to parts from last year's kit.

This whitepaper from Team 33 provides an excellent guide to setting up a gyro.
__________________
Richard Wallace

Mentor since 2011 for FRC 3620 Average Joes (St. Joseph, Michigan)
Mentor 2002-10 for FRC 931 Perpetual Chaos (St. Louis, Missouri)
since 2003

I believe in intuition and inspiration. Imagination is more important than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution. It is, strictly speaking, a real factor in scientific research.
(Cosmic Religion : With Other Opinions and Aphorisms (1931) by Albert Einstein, p. 97)
  #5   Spotlight this post!  
Unread 06-12-2007, 14:24
Alex.Norton's Avatar
Alex.Norton Alex.Norton is offline
Fidgetting
no team
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Ft. Collins, Colorado
Posts: 190
Alex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud of
Send a message via AIM to Alex.Norton Send a message via MSN to Alex.Norton
Re: How do you sync multiple motors?

I would definitally suggest the gryo. It is quite a bit easier to use becuase you don't need to use interupts in the programing.

However, either route will take a lot of programing to get to work correctly.

Alex
  #6   Spotlight this post!  
Unread 06-12-2007, 14:27
Madison's Avatar
Madison Madison is offline
Dancing through life...
FRC #0488 (Xbot)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1999
Location: Seattle, WA
Posts: 5,244
Madison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond repute
Re: How do you sync multiple motors?

Quote:
Originally Posted by Japper View Post
Our team is playing around with parts from last years robot and have been experimenting with multiple motors and 4 wheel drive but we need to synchronize the motors.

Is there an easy way to do this so that the motors on each side are running at the same speed?

We have one victor per motor and the victors per each side are sent the same PWM data. Is this just a matter of calibrating the victors?

Please advise

Thanks
Can you please clarify what you're trying to achieve? Particularly, in my mind, your description of "each side" is ambiguous and I'm not sure if you're trying to make the right and left side of your drive train go forward at the same speed or if you're combining two motors on one side and trying to ensure those motors turn at the same speed.
__________________
--Madison--

...down at the Ozdust!

Like a grand and miraculous spaceship, our planet has sailed through the universe of time. And for a brief moment, we have been among its many passengers.
  #7   Spotlight this post!  
Unread 06-12-2007, 14:31
Pat Fairbank's Avatar
Pat Fairbank Pat Fairbank is offline
Circuit Breaker
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2001
Location: San Jose, CA
Posts: 2,132
Pat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond repute
Send a message via MSN to Pat Fairbank
Re: How do you sync multiple motors?

If the motors that are on the same side are of the same type, and you are feeding them the same PWM values (you could use a Y-cable from a single PWM output to make sure of this), and your Victors are both calibrated properly, then any difference between the speeds of the motors can be considered negligible and won't have an impact on performance.

Clarification edit: This answer is assuming the original question is about synchronizing the speeds two motors on the same side of the robot.
__________________
Patrick Fairbank
Team 254 | Mentor (2012-)
Team 1503 | Mentor (2007-2011)
Team 296 | Alumnus (2001-2004) | Mentor (2005-2006)

patfairbank.com

Last edited by Pat Fairbank : 06-12-2007 at 15:55.
  #8   Spotlight this post!  
Unread 06-12-2007, 15:42
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: How do you sync multiple motors?

Quote:
Originally Posted by Pat Fairbank View Post
If the motors that are on the same side are of the same type, and you are feeding them the same PWM values (you could use a Y-cable from a single PWM output to make sure of this), and your Victors are both calibrated properly, then any difference between the speeds of the motors can be considered negligible and won't have an impact on performance.
Actually, as most new teams can attest to, if you send the same pwm signal, and your Victors are calibrated and outputing the same voltages to both sides, the final drive speed for each side will almost ALWAYS be different. That's why every team is dismayed the first time they turn their robot on and it drives in circles. The reason, as pointed out in previous posts, is that every motor is slightly different. The difference is compounded when you factor in varying amounts of friction from additional drive train components. Also, motors tend to have a bias so that they turn different speeds in different directions when the same voltage is applied. I bring this up because your motors on the left and right sides are likely spinning in opposite directions.

The solutions presented previously work great. Whether you use encoders or a gyro, they essentially provide feedback to your program on the speed each wheel is turning so that your program can dynamically adjust the pwm values to maintain a desired setting. In the case of going straight, your program would make sure that each wheel is turning the same speed which ultimately ensures you drive straight when you want to drive straight.

Another sort of wacky way we've played with works, but is more useful as an exercise than a practical way of controlling your robot. After we put our robot together, we used a strobelight tachometer and got the wheel speed of each wheel at each PWM value. We input this data into a spread sheet and plotted the results to visualize the curve. These data form the power curve for each wheel and includes losses to the power train. From this you can calculate an equation for each side that coverts pwm value to speed so that each wheel recieves the appropriate pwm input for a desired wheel speed.

While this worked and was interesting academically, it isn't likely to last for long. Changes in the drive train would eventually invalidate the curves.

Feedback mechanisms (Gyro/encoders) coupled with PID code work the best because regardless of wear and tear on your drivetrain, or even replacing entire components, your program will still compensate dynamically.
  #9   Spotlight this post!  
Unread 06-12-2007, 15:50
Alex.Norton's Avatar
Alex.Norton Alex.Norton is offline
Fidgetting
no team
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Ft. Collins, Colorado
Posts: 190
Alex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud of
Send a message via AIM to Alex.Norton Send a message via MSN to Alex.Norton
Re: How do you sync multiple motors?

Quote:
Originally Posted by TubaMorg View Post

Another sort of wacky way we've played with works, but is more useful as an exercise than a practical way of controlling your robot. After we put our robot together, we used a strobelight tachometer and got the wheel speed of each wheel at each PWM value. We input this data into a spread sheet and plotted the results to visualize the curve. These data form the power curve for each wheel and includes losses to the power train. From this you can calculate an equation for each side that coverts pwm value to speed so that each wheel recieves the appropriate pwm input for a desired wheel speed.
This only works if the surface your driving on is consistent. If there are any variation such as from free spinning, to carpet, to concrete you will see large differences. There can even be large difference between on spot on a carpt and another. Say something sticky was spilled, the wheel that passes over it will drive at a different speed compared to the same wheel on non sticky carpet. Of course first fields are fairly consistent but if someone drops a part on the field this will affect a drivetrain that doesn't have feed back.

Alex
  #10   Spotlight this post!  
Unread 06-12-2007, 16:00
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,823
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: How do you sync multiple motors?

Quote:
Originally Posted by TubaMorg View Post
Actually, as most new teams can attest to, if you send the same pwm signal, and your Victors are calibrated and outputing the same voltages to both sides, the final drive speed for each side will almost ALWAYS be different. That's why every team is dismayed the first time they turn their robot on and it drives in circles. The reason, as pointed out in previous posts, is that every motor is slightly different. The difference is compounded when you factor in varying amounts of friction from additional drive train components. Also, motors tend to have a bias so that they turn different speeds in different directions when the same voltage is applied. I bring this up because your motors on the left and right sides are likely spinning in opposite directions.
He was talking about the same side, same motor, like you might get for a team running an AndyMark shifter system. And, if we're talking CIMs, I believe that the bias is less than the difference between motors.

Now, if it's two different motors on the same side, you've got about 30 days to start designing a gearbox so they'll be the same speed.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

  #11   Spotlight this post!  
Unread 24-12-2007, 05:27
Japper's Avatar
Japper Japper is offline
Registered User
FRC #3692 (RocknRobots)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Rutland Wisconsin
Posts: 147
Japper has a spectacular aura aboutJapper has a spectacular aura about
Re: How do you sync multiple motors?

Quote:
Originally Posted by M. Krass View Post
Can you please clarify what you're trying to achieve? Particularly, in my mind, your description of "each side" is ambiguous and I'm not sure if you're trying to make the right and left side of your drive train go forward at the same speed or if you're combining two motors on one side and trying to ensure those motors turn at the same speed.
Ok, to clarify...
We have two motors on the right side of the robot and two motors on the left side of the robot. This is a 4 wheel robot and each of the four wheels is driven by it's own motor.

First we would like to make sure that the wheels on each side are operating at the same speed. We have seen that even though both motors operate from the same PWM values, each motor tends to have unique characteristics and can operate at slightly different speeds. This can cause slight binding when both wheels on one side of the robot are not "in sync" speed wise.
We have calibrated the victors to our joysticks and this has helped tremendously.

Second, we would like to ensure that both sides operate at as close to the same speed as possible so that the operator doesn't have to compensate much with relative joystick positioning to make the robot track straight and true...

Hope that the above description is not too ambiguous...

thanks
  #12   Spotlight this post!  
Unread 24-12-2007, 09:48
Leav's Avatar
Leav Leav is offline
Spud Gun Division
AKA: Leav Oz-Ari
FRC #3316 (D-Bug)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Technion, Haifa, Israel
Posts: 774
Leav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond repute
Send a message via ICQ to Leav Send a message via AIM to Leav Send a message via MSN to Leav
Re: How do you sync multiple motors?

Ok so to recap what people more experienced than me said here:

Regarding syncing two wheels on the same side, you can:
  • sync wheels using tachometer (this is a temporary solution, it will only work for a while and the effectiveness will probably fade)
  • sync wheels using a sensor that measures wheel speed in real time. (choose one wheel to be the reference and have the other change so that it is equal)
  • use a gearbox that accepts two motors and drives two wheels (this is food for future thought)

Regarding syncing the left wheel set to the right wheel set, you can:
  • sync wheels using tachometer (see above)
  • sync wheels using a sensor that measures wheel speed in real time. (integrates with the above option, so 4 sensors and a non-negligible amount of coding solves all your problems)
  • use a gyro (you should be able to use the size of the X value of the joystick as a base to compare gyro readings and adjust accordingly)

Good luck and don't hesitate to ask for clarification about anything or for more help!

-Leav
__________________
"We choose to build robots this season and do the other things; Not because they are easy, but because they are hard."
-Paraphrasing JFK

Participated in FIRST as a student: 2005-2006 (But still learning every season!)
Mentor: 2008 - ? (Team 2630 2008-2011, and Team 3316 since 2013)
Engineer: 2011 - ? (B.Sc. and M.Sc. in Mech. Eng. from the Technion IIT)
FIRST Volunteer - 2007 - ? (MC, FTA, FIRST Aid etc.)

Last edited by Leav : 24-12-2007 at 09:49. Reason: forgot BBcode tags
  #13   Spotlight this post!  
Unread 24-12-2007, 11:23
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: How do you sync multiple motors?

Has anyone here tried using the current sensors to do load balancing? If so, did it work well?

The basic concept would be to pull current information off of each motor, and use it to approximate the torque per motor. Then adjust the voltage sent to the motors so that they are contributing equal torque.

This only syncs the left side with itself and the right side with itself. It does not handle syncing left to right.

For the experts here: Can you please comment on how this balancing scheme might be impacted by motor variation? drive train variation? phase of the moon?
  #14   Spotlight this post!  
Unread 24-12-2007, 11:36
Leav's Avatar
Leav Leav is offline
Spud Gun Division
AKA: Leav Oz-Ari
FRC #3316 (D-Bug)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Technion, Haifa, Israel
Posts: 774
Leav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond repute
Send a message via ICQ to Leav Send a message via AIM to Leav Send a message via MSN to Leav
Re: How do you sync multiple motors?

I think this would fall under the calibration idea, since as time went by the coefficient between the current and the speed would change and the whole system would go out of sync...

but that just off the top of my head.. the whole "breaking in" and "wearing out" effect i'm considering might only be significant to change the whole system by 0.5%, which means that the system would actually stay in sync for a long time...

unless someone did this before and tested in thoroughly there is no real way to know this but checking!

-Leav

p.s.
you would need to check what happens when there is maximum current and zero speed (i.e. the motor stalled [e.g. a pushing match])

p.p.s
don't you love recursive brackets?
__________________
"We choose to build robots this season and do the other things; Not because they are easy, but because they are hard."
-Paraphrasing JFK

Participated in FIRST as a student: 2005-2006 (But still learning every season!)
Mentor: 2008 - ? (Team 2630 2008-2011, and Team 3316 since 2013)
Engineer: 2011 - ? (B.Sc. and M.Sc. in Mech. Eng. from the Technion IIT)
FIRST Volunteer - 2007 - ? (MC, FTA, FIRST Aid etc.)

Last edited by Leav : 24-12-2007 at 11:41.
  #15   Spotlight this post!  
Unread 24-12-2007, 12:05
Richard Wallace's Avatar
Richard Wallace Richard Wallace is offline
I live for the details.
FRC #3620 (Average Joes)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1996
Location: Southwestern Michigan
Posts: 3,674
Richard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond reputeRichard Wallace has a reputation beyond repute
Re: How do you sync multiple motors?

Quote:
Originally Posted by EricVanWyk View Post
...
For the experts here: Can you please comment on how this balancing scheme might be impacted by motor variation? drive train variation? phase of the moon?
In my day job I design electric motors. My designs are not the same type that we use on FRC robots, but their basic physics is similar.

One of the most significant characteristics of any electric motor is its unloaded (free) speed at rated voltage. Let's take the CIM motor as an example: per its manufacturer's data sheet its shaft will spin freely at 5310 RPM when 12V dc is supplied to its electrical terminals. Zoom in to view the table in the lower left corner of the data sheet linked above, and you will see that the manufacturer also states that the variation on the given free speed is +/- 10%. This variation is caused by differing strengths of the motor's permanent magnet material from one batch to the next, and by angular misalignment of the motor's commutation brushes with respect to those magnets.

The graphs shown next to the table on the data sheet linked above indicate that the CIM's current draw is proportional to the torque developed on its shaft. The constant of proportionality (i.e., the slope of the current vs. torque line on that graph) is determined by the same design factors, and the same variations, that determine the motor's free speed. So the stated +/- 10% free-speed variation applies to torque-per-Ampere also.

Because the causes of the variation are the same, using current sensors to 'correct' for free speed variation is probably not going to be very effective.
__________________
Richard Wallace

Mentor since 2011 for FRC 3620 Average Joes (St. Joseph, Michigan)
Mentor 2002-10 for FRC 931 Perpetual Chaos (St. Louis, Missouri)
since 2003

I believe in intuition and inspiration. Imagination is more important than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution. It is, strictly speaking, a real factor in scientific research.
(Cosmic Religion : With Other Opinions and Aphorisms (1931) by Albert Einstein, p. 97)

Last edited by Richard Wallace : 24-12-2007 at 12:10.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Motors out of sync TheAnsweris42 Motors 11 07-02-2006 16:30
How did you use the FP motors? Validius Motors 25 02-03-2005 01:30
Multiple Motors phrontist Motors 12 21-06-2004 23:05
Multiple-Motors echos Motors 8 11-01-2004 17:34
How do you cool your motors? Mercutio Motors 9 09-02-2003 00:21


All times are GMT -5. The time now is 15:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi