View Single Post
  #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.