My daughter and I are having problems with drive motors moving at different speeds. She is 10 and has just started taking robotics in school. We use ModkitForVEX and when programming the bot to track through a course, it fails as it will not track straight. I have read that in robotC you write code to compensate. Her school is using ModkitForVEX, so I’m trying to help her figure out how to get both drive motors to move at same speed. Thank you in advance.
Maybe set the motor speed of the faster motor to like 98% and go from there.
I do remember seeing a calibrate thing on the drivetrain module in modkit…
It the calibrate option, all I see is to calibrate the X/Y offset from the center of the robot for turning. I can’t figure out how to adjust speed of single motors in drivetrain.
Sorry… I never messed with that part, simply knew it existed in some form.
Try the gyro. Don’t forget to allow a few COMPLETELY IMMOBILE seconds for it to initialize.
Thank you. I’ll keep digging. I’m going to try and make sure the drag is not causing an issue today.
Yup. Swap wheels and see if it has any effect. Check for binding and rubbing…
The PID on the IQ motors is usually pretty good and not driving straight is more likely to be a symptom of robot design/build than the motors themselves. You can do a rough and dirty check on your motors by creating a really simple little test rig.
Fix 2 motors to a long beam so that they are spaced far enough apart so you can fit a small wheel or gear on a shaft. Put a 1x1 pin in the wheel or gear and manually align them so they are both at the top (12 o’clock)
Create a little program that runs both motors at the same time for 10 revolutions (about as far as you’ll ever need to drive on an IQ field with 200mm travel wheels.
When you run the program, the two pins should track round at exactly the same speed and stop at exactly the same time, right back at the top exactly where they started.
Of course, it’s all a bit different under load but the internal PID of the motors should deal with that.
The standard Clawbot and Stretch are tricky to get to run straight. Some of this is to do with the outside edge of the wheel axles being unsupported. and so the wheels can add a surprising amount of steering. Supporting the wheel axle on the outside edge can really aid stability.
I put washers and spacers behind wheels to try and remove drag. It didn’t appear to work. I then changed the fast motor with a spare and it seems to be the same as the slow side now. I will test the “fast” motor as described by calvc01 suggested and see if it is a difference. I tried to change the slow motor out but the second one was slow in comparison too. I wish I had two of the “fast” motors I could get in time together. Thank you guys for the help.
Some good ideas here. Another thought I had was have you considered using a differential?
Best of luck,
My experience was the motors can drive at the same speed. However, one motor takes longer to reach the speed and power output. In field testing, the indicator is the robot takes a turn at the beginning then drives a straight line. You have to test with a third motor to find it out and replacing that motor is the only solution.
If you are correct and this IS the issue, I have found that eliminating broadcasts and instead having motors listen (from within a forever loop) for a variable change fixes this issue. Just like broadcasts, the brain can switch the variable, or it can be changed when a specific bit of code runs. Furthermore, it streamlines LOTS of commands because the same variable can have many values, triggering many different mutually-exclusive events.
Don’t know why, but multiple motors will “hear” variable changes simultaneously. Broadcasts often have a brief, initial lag.
What actually happened was the robot drived fine with 4 Omni wheels (driven by 2 motors, each pushes two wheels linked with chains). Then the problem started to show when we added a 3rd pair of wheels. The bot takes a predictable turn to one side then kept driving a straight line. Switch the motors, the bot would turn to the other side then straight line. My hypothesis is the extra pair of wheels added additional stress to the motor. In the end, We just tested with a 3rd motor and found out one motor to be the slow-starter. We switched The motor and the problem is solved.
Saw this at competition. Looked like a really good idea to prevent wheel camber problems.