Announcement

Collapse
No announcement yet.

REV HUB Motor braking

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

  • REV HUB Motor braking

    It seeing that with the REV Hub, when motors are set to DcMotor.zeroPowerBehavior.BRAKE, braking does not occur and motors coast to a stop and don't resist being turned. Anyone else seen this?

  • #2
    Hi, please try this and let us know if it works. Please use the BRAKE command every time you set power to 0, not just once during initialization.
    Thanks.
    Team 11089

    Comment


    • #3
      Originally posted by Crossle86 View Post
      It seeing that with the REV Hub, when motors are set to DcMotor.zeroPowerBehavior.BRAKE, braking does not occur and motors coast to a stop and don't resist being turned. Anyone else seen this?
      Hi Crossle86,

      By default, the REV Hub sets the motors to float mode. Does your op mode set the motors to BRAKE mode when it initializes the motor? I have been running various bots with the Expansion Hub this season and have not noticed the motors being in float mode, if I set them to BRAKE mode in my op mode.

      Tom

      Comment


      • #4
        Yes, with motors are set to BRAKE mode, I see coasting.

        Comment


        • #5
          Testing this morning I am seeing coasting with BRAKE mode set before each call to setpower(0) (as suggested by shivsaxena). Moving in a straight line it coasts but it can be missed but the program is doing a 90 degree rotation and it just keeps slewing around after 90 degrees is reached and power is set to zero. It practically ends up turning 180. Note I have the power at 50% to easily see braking or coasting. I have telemetry displaying the brake mode in my loop and it confirms BRAKE is returned by getZeroPowerBehavior(). I am mystified if there is no known issue with the REV board.

          Comment


          • #6
            I have always wondered how BRAKE is set to the motor. Is it basically similar to RUN_TO_POSITION with target as current position and the controller tries to keep encoder counts near the target?
            The only thing the controller can send to the motor is PWM voltages. No smarts in the motor - right?
            Can it be done if you are not using encoders? If so, how does the controller know what to do?

            Comment


            • #7
              Tom should respond to this but I have seen doc on other controllers that indicate brake mode is accomplished by connecting the two lines to the motor together.

              Comment


              • #8
                This has been tested in the past, and proven to be working as expected, but it's possible something has changed... I'll test this out.

                But just to stop incorrect information... the setZeroPowerBehavor() method is used to indicate how you want a motor to act when you give it zero power.
                There is NO need to send this command over and over again. Once is all it should take.

                If it's not working, that's another problem.

                However, the strength of breaking depends largely on the speed the motor is turning, so even if set to "break" an arm may drift down.

                To hold an arm in position, you would need to use RUN_TO_POSITION with a specific setpoint.

                Comment


                • #9
                  I have been testing and using a duplicate chassis with MR control modules. I have to duplicate bots, one MR and one REV and test programs that differ only as needed for REV differences. The problem I am seeing is present with both robots, gyro or imu. I have to conclude that while I am expecting more braking than I am seeing it, I'm not getting it and its due to the gearing and not a controller problem. I have to admit my experience with FTC motors is limited (I'm an FRC mentor helping out with FTC) but I'm surprised at how little braking effect I am seeing.

                  Comment


                  • #10
                    Thanks Philbot, we will change our code to only send the command once. We couldn't get it to work before but that was about a month back.

                    Comment


                    • #11
                      Well, maybe this is a false alarm. But even with my gear ratio, I was expect more braking effect. After a number of tests I can't prove any braking effect is happening.

                      Stopping the motors while the program is still running and then turning the wheels by hand, I can't feel any difference between coast and brake mode.

                      Doing the 90 degree turn (brake mode) with just enough power for the bot to complete the turn, it still overshoots (though less).

                      Comment


                      • #12
                        Note that 'brake' is not 'brake'. That is, there is no 'brake' per se in these motors. The effect of shorting the motor power leads defined here as 'brake mode' has no 'active' braking power, it merely causes the motor to slow down more quickly than it would otherwise if the motor leads had not been shorted. You would not detect any difference in turning the wheels by hand, as the degree of 'braking' is proportional to the speed of the motor, and will be insignificant at slow speeds. If you look up 'back-EMF' or 'counter-EMF' you can read more about this effect.

                        Comment


                        • #13
                          So based on that, when I turned up the power, I should have observed more braking effect than at low power. That makes sense. However, what I observed was that increasing the power greatly exaggerated the overshoot on my 90 degree turn.

                          I am using a NR 40 motor with an 80 tooth gear and the wheel shaft has a 40 tooth gear. Wheels are std tetrix kit wheel. So the wheel has a 2:1 advantage over the motor which would diminish any braking effect by the motor and motor is not turning that fast. Perhaps that explains it. But the robot is not heavy and when you watch it in action the overshoot looks like it is free wheeling.

                          Comment


                          • #14
                            Originally posted by Crossle86 View Post
                            Tom should respond to this but I have seen doc on other controllers that indicate brake mode is accomplished by connecting the two lines to the motor together.
                            The REV Expansion Hub uses inductive braking when the motor channel is set to BRAKE mode. In this mode, the H bridge chips short the motor terminals and an induced current caused by the motion of the shaft provides some braking torque to counteract movement of the shaft.

                            If you take an unmounted, unconnected 12V motor (like an AndyMark or Tetrix motor) that has a wheel mounted to the motor shaft and short its input terminals (for example using a wire with alligator clips on its ends) you can get a feel for how much braking force is induced when you try to turn the wheel.

                            Comment


                            • #15
                              Tom Eng : Thanks for the excellent descriptive response. It helps us understand something that has been a bit of a mystery.

                              Comment

                              Working...
                              X