So Left Motor is running slower than our Right Motor. The Left is running at 50 rpm and our Right is at 200 rpm, both motors are green motors in code and on the robot. Everything on the wheels are the same there’s no metal on metal, the axles are straight, and our code is the same. We also have replace the motor with a brand new one, So is there anything we can do to fix this. Our code is below
void usercontrol(void) {
// User control code here, inside the loop
while (1) {
if(Controller1.ButtonR2.pressing()){
RightWheels.spin(forward,100, pct);
}
if(Controller1.ButtonR1.pressing()){
RightWheels.spin(reverse,100, pct);
}
}
if(Controller1.ButtonL2.pressing()){
LeftWheels.spin(forward,100, pct);
}
if(Controller1.ButtonL1.pressing()){
LeftWheels.spin(reverse,100, pct);
}
else{
RightWheels.stop(brake);
LeftWheels.stop(brake);
}
Well we have replaced the motor so its not that and we’ve have increased the rpm to 300 for the left and it still ran at 50 and we have tested all the wires.
Try assigning all your drivetrain movements to the joysticks as then you can increase and decrease the throttle because on buttons that is quite difficult or impossible to do
//int to start the code
int main() {
// A while true statement so our soccerbot only runs when a joystick is held
while(true){
// The integers to declare what side of the robot a joystick controlles
int leftDriveSpeed = Controller1.Axis3.position();
int rightDriveSpeed = Controller1.Axis2.position();
// Makes the motors spin forward when told to
frontLeft.spin(forward,leftDriveSpeed,pct);
backLeft.spin(forward,leftDriveSpeed,pct);
frontRight.spin(forward,rightDriveSpeed,pct);
backRight.spin(forward,rightDriveSpeed,pct);
This is often bad practice and patches a problem as compared to going to the root of the problem, which is likely friction. This does not seem like a programming issue but a mechanical one.
I feel like unless there is something electrical with V5 that causes this, I believe this is a mechanical issue. I highly doubt this is a programming issue. Would it be possible to post some pictures of your drivetrain wheels and axles?
that might be your problem, that c-channel is bent (this could just look bent because of the picture). you can get a lot of friction if the two c-channels are not parallel with each other
(a bit off topic, but, I love the look of the colored screws. did you color them yourself, or did you buy them that way?)
The easiest way to figure out with 100% certainty if it is a mechanical issue, is to swap the ports the motors are plugged into. By swapping the brain ports that the motors are plugged into, you can see if the left side is still spinning slower (meaning it is a mechanical issue) or the right side slows down (meaning it is a programming issue).
you can also unplug the motors and spin them manually, if one has a lot more resistance then the other, it is mechanical, if they both spin with out a problem, it is programming.
THe pictures indicate a fair amount of build quality issues - warped c-channels, no bracing on top part of drive train… So if sides are not parallel with one another, you are going to have shafts rubbing against one another. One side is out of alignment with other - so looking at two dimension problem with alignment. It will all add up. So quick check is to see if wheels spin freely and equally when axle detached from motor. If one comes to sudden stop compared to others, a good indication excess friction is the problem. There should be very little resistance when spinning wheel and axle.