Announcement

Collapse
No announcement yet.

Cutting Signal and/or Power to Servo(s)

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

  • Cutting Signal and/or Power to Servo(s)

    Evening,

    We have a scoring arm on our robot that's servo powered and we'd like to release the power, and or stop the PWM signal when the arm is in certain positions.

    Basic example...

    Driver pushes the X button and the arm rotates upward 180
    Michael P Clark
    Founding Mentor, FTC 9958
    http://www.redfishrobotics.com
    "We're Hooked on FIRST"

  • #2
    Hi Michael, try myServo.getController().pwmDisable() and/or myServo.getController().close()

    Comment


    • #3
      If you're using a REV hub, you can cast the servo to a PwmControl, and call pwmDisable on it directly, which will disable just the one servo, instead of all of the servos on the controller.

      Comment


      • #4
        Originally posted by NoahAndrews View Post
        If you're using a REV hub, you can cast the servo to a PwmControl, and call pwmDisable on it directly, which will disable just the one servo, instead of all of the servos on the controller.
        Thanks NoahAndrews (and Alec ) I think Noah's solution is closer to what we're trying to do, do you know where we can find more documentation on how to implement that?
        Michael P Clark
        Founding Mentor, FTC 9958
        http://www.redfishrobotics.com
        "We're Hooked on FIRST"

        Comment


        • #5
          There isn't really documentation beyond the Javadoc, it's one of the many things the SDK offers that you just sort of have to discover on your own. Maybe there's a sample, but I don't remember one. We could definitely do a better job on documentation.

          Google how to cast an object in Java, which should get you the rest of the way from here.

          Another note. Depending on the Servo type, it may not turn off when you do this if it is connected to a Servo Power Module

          Comment


          • #6
            Originally posted by NoahAndrews View Post
            There isn't really documentation beyond the Javadoc, it's one of the many things the SDK offers that you just sort of have to discover on your own. Maybe there's a sample, but I don't remember one. We could definitely do a better job on documentation.

            Google how to cast an object in Java, which should get you the rest of the way from here.

            Another note. Depending on the Servo type, it may not turn off when you do this if it is connected to a Servo Power Module
            Has ServoImplEx been replaced with PwmControl?

            Comment


            • #7
              Originally posted by NoahAndrews View Post
              Another note. Depending on the Servo type, it may not turn off when you do this if it is connected to a Servo Power Module
              If it's a digital servo, it will almost assuredly not turn off. Post #18 may be of interest: https://ftcforum.usfirst.org/forum/t...7210#post67210

              Comment


              • #8
                Except for the Rev Smart Servo. That's a digital servo that I'm told will turn off even when connected to the SPM

                Comment


                • #9
                  The turn off feature with digital servos has to do with how it handles a loss of signal (LOS). Most digital servos will either hold the last known good position (last signal that had valid position data), or will move to a programmed signal loss position (a so-called "failsafe" position). You can look at a specific servo spec sheet to determine which LOS behavior the servo will follow.
                  The reason this is of concern is that when using the SPM, it continues to supply power to the servo regardless of the PWM input.
                  Technical Coach, Newton Busters FTC 10138, FLL 3077
                  Chicago 'burbs, IL

                  Comment

                  Working...
                  X