Annoying motor problems...

With the default code, the polarity of the motors needed to be reversed, so I scripted a function that reverses the value of the PWM’s. After I did this, I ran it on the bot and I encountered the most curious problem… one set of wheels moves faster than the other. This is my first year with FIRST, and I’m doing about 95% of the coding, so I’m a little lost… I have an idea of how to fix it, but any ideas from the rest of civilization would be appreciated…

First of all, if you just want to reverse the polarity of the motors, you can just switch the output wires on the victor.

The motors spinning at different speeds is likely unrelated to your code. How do you know they are spinning at different speeds? Are your joysticks calibrated correctly? Have you checked both drivetrains for unequal sources of loss?

instead of reversing the PWM signals in the code, you could just reverse the polarity on the motors.

[edit] ahh ya beat me [/edit]

Also, you may want to read up on motor controller calibration. Here is the link

Ok, so the motors spinning at different speeds is utterly unrelated to programming, and almost definitely has nothing to do with the Victor calibration. The real issue is that all the motors FIRST gives us are wound with a lead angle of some amount. What it boils down to is that they have a preferred direction of rototation. So a given motor will run faster clockwise than counterclockwise. See this for ideas to compensate:
Robot Drifting

Before we get too far into this, WHICH MOTOR are you talking about?

Pages 8 and 9 of the FIRST Guidelines, tips, & good practices cover Motor Bias. There it states that there is no inherant bias in the windings of the CIM motor.

There will always be a few % difference between different motors. There can be a few more % in the gearbox and more from the chain tension. Weight distribution can cause the robot to be biased to one side as well. Poor wire connections can cause it as well. You should check all these. Even in the best case, it won’t go perfectly straight (although the longer the wheelbase, the straighter). You can play with all of the above things to try and make it better, though.

thanks guys, I got the problem fixed… it was electrical, the speed controllers were different, 1 new and 3 old, and the team didn’t calibrate them together… I’m about ready to smack them…

thanks guys, I got the problem fixed… it was electrical, the speed controllers were different, 1 new and 3 old, and the team didn’t calibrate them together… I’m about ready to smack them…