Drivetrain does not run at full speed with gear ratio

My students experimented with a drivetrain which has a high gear ratio (2:1) and noticed that it does not run at full speed when using VEXCode IQ but the motors work when run individually. This is when mapping the controller to the drivetrain by clicking on the controller joysticks.

We reduced the gear ratio setting in vexcode to 1:1 and the drivetrain now works correctly.

I played with this on a test drivetrain and I noticed that the drivetrain does noticeably slow down when I set a 2:1 gear ratio. If I add a print statement to the drivetrain it reports 100 rpm when at 1:1 and 120 rpm when at 2:1. I would expect it to report 200 rpm.

Is this a math bug in the arcade drive code?

1 Like

Wouldn’t changing the gear ratio only change the maths around how far the robot moves per x turns of the motor since the internal gear ratio stays the same? So it should be the same number of RPM displayed either way because that would be taken from the motor encoder?

Since I’m using the Drivetrain construct and reading the rpm of that, I assume the speed read is multiplied by the gear ratio.

It seems like the arcade drive output is set to the motor target rpm, but corrected for gear ratio, so a gear ratio other than 1:1 causes the math to be incorrect.

yes, I think there may be a bug. Not so much with the math but more a mixup in the use of units, percent/rpm.

1 Like