Announcement

Collapse
No announcement yet.

Motors turning at different speeds

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Motors turning at different speeds

    We got our robot to the driving stage last night. We are using the cool wheels that can go sideways (I can't recall the name). It was not moving how we imagined that it would. In troubleshooting, we noticed that the rear wheels are moving faster than the front wheels. We have a slow movement button on the controller. Using the slow movement, we had a team member on each wheel count the revolutions. We repeated the test a few times to allow for human error in the counting. The rear wheels on average are getting 11 revolutions to 10 revolutions on the front wheels. The motors are all the same type, so they should all theoretically be turning the same RPM's. We are using the REV expansion hub and currently do not have encoders installed. Would encoders help on this issue?

    Have any of you experienced similar issues? One possible solution we came up with is adjusting the power percentage on the faster motors down to match the speed of the slower motors. While that seems to be a workable solution, it seems that there must be a better way that we are missing.

  • #2
    Each gear box and axle/wheel mount are different. If you have things tightened down more on one vs. the other, it makes a difference. A motor power of 0.5 may be able to spin one wheel really freely, but may not be able to spin a wheel that has more tightly squeezed gears and wheel spacers. Encoders can definitely help. I am not where I have access to the code or API right now, but there is a way (setSpeed maybe??) to set a wheel speed instead of a power. This may have been added last year. It needs encoders to work, but it could help as well.

    Comment


    • #3
      Hook up the encoders then set the runMode to run using encoders. This mode sets a speed, not a power level when you issue setPower. The controller will automatically adjust power to the motor as needed to maintain a set constant speed.

      robot.LF.setMode(DcMotor.RunMode.RUN_USING_ENCODER );

      Comment


      • #4
        Awesome! Thanks for the advice! We'll try these out on Saturday, our next build day.

        Comment

        Working...
        X