Announcement

Collapse
No announcement yet.

Help Needed with Continuous Rotation Servo

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

  • TacoGamer3000
    replied
    Originally posted by warriers View Post
    We are trying get a continuous rotation servo to move forward and backward to extend and retract an arm. Even though we are setting power values from -.045 to 0.45, the servo seems to only want to move in just one direction

    Servo Make and model - Hi-Tec HS-755HB Continuous rotation.
    The servo is connected to a Rev Robotics expansion hub

    Here is a snippet of the code: The negative value seems to have no impact


    CRServo contServo;

    float leftY, rightY;
    double cntPower;

    @Override
    public void runOpMode() throws InterruptedException
    {
    contServo = hardwareMap.crservo.get("armServo");

    contServo.resetDeviceConfigurationForOpMode();

    waitForStart();


    while(opModeIsActive())
    {


    if(gamepad1.dpad_up)
    {
    cntPower = -0.45;
    telemetry.addData("Keypad" , "dpad_up clicked. power = " + cntPower);
    }
    else if(gamepad1.dpad_down)
    {
    cntPower = 0.45;
    telemetry.addData("Keypad" , "dpad_down clicked. power = " + cntPower);
    }
    else
    {
    cntPower = 0.0;
    telemetry.addData("Keypad" , "Nothing pressed. power = " + cntPower);

    }

    contServo.setPower(cntPower);

    telemetry.update();


    }

    Thanks in advance!
    Is the servo going in one direction, but slowing down after a period of time? We've had a couple of REV servos that were broken that acted that way.

    Leave a comment:


  • 3805Mentor
    replied
    Try defining it as a regular servo and test with 0, 0.5 and 1. If it behaves like a regular servo maybe they didn't modify it and sent you the original version.

    I don't remember seeing if the rules have changed, but they used to say the servo couldn't be modified even by sellers like ServoCity. The versions had to be from the factory.

    Leave a comment:


  • Alec
    replied
    Originally posted by warriers View Post
    Thanks for the suggestions. I tried them and various other things, but it didnt help.

    We ordered the continuous rotation version of the 755,

    https://www.servocity.com/hs-755hb-servo#259=27

    I am wondering if this one has any issues with the Rev Robotics hub.
    The continuous rotation version of the 755HB is a stock 755HB that has been modified internally; thus it is not legal per <RE15>.

    Leave a comment:


  • warriers
    replied
    Thanks for the suggestions. I tried them and various other things, but it didnt help.

    We ordered the continuous rotation version of the 755,

    https://www.servocity.com/hs-755hb-servo#259=27

    I am wondering if this one has any issues with the Rev Robotics hub.

    Leave a comment:


  • 3805Mentor
    replied
    I can't find that the 755 is sold as a continuous rotation servo, the specs state that it can be modified to CR, but last I checked you aren't allowed to modify servos.
    The 785 is also not really a CR, it's a multi rotation servo with feedback like a regular servo.
    I haven't tried to define a regular servo as a CR so I don't know how it would behave.

    When using setPower() with a continuous rotation servo it is correct to use zero to stop, with a range of -1 to 1.

    Leave a comment:


  • RedfishRobotics
    replied
    While we expect you'll get a more detailed explanation, we think we see the problem..

    Most CRs (or at least the ones we have) operate in a range similar to non CR servos, i.e. 0.0 to 1.0.

    The main difference with CRs, is that in the range the middle (i.e. 0.5 (or something very close to that)) would be stopped, a number greater than 0.5 would move in one direction, and a number less than 0.5 would move in the other.

    The further you get a way from the middle, the faster the servo will turn, so, 0.75 would be faster than 0.55.

    So, from your example, the servo is likely only moving when you give it positive numbers, but depending on which side of 0.5 you are, the servo will turn in one direction or the other.

    In case we didn't explain it well (which is likely), this article does a pretty good job: https://www.reddit.com/r/FTC/comment..._a_continuous/

    Hope this helps, and best of luck with the rest of your season!

    #NoSleepTillHouston

    Leave a comment:


  • warriers
    started a topic Help Needed with Continuous Rotation Servo

    Help Needed with Continuous Rotation Servo

    We are trying get a continuous rotation servo to move forward and backward to extend and retract an arm. Even though we are setting power values from -.045 to 0.45, the servo seems to only want to move in just one direction

    Servo Make and model - Hi-Tec HS-755HB Continuous rotation.
    The servo is connected to a Rev Robotics expansion hub

    Here is a snippet of the code: The negative value seems to have no impact


    CRServo contServo;

    float leftY, rightY;
    double cntPower;

    @Override
    public void runOpMode() throws InterruptedException
    {
    contServo = hardwareMap.crservo.get("armServo");

    contServo.resetDeviceConfigurationForOpMode();

    waitForStart();


    while(opModeIsActive())
    {


    if(gamepad1.dpad_up)
    {
    cntPower = -0.45;
    telemetry.addData("Keypad" , "dpad_up clicked. power = " + cntPower);
    }
    else if(gamepad1.dpad_down)
    {
    cntPower = 0.45;
    telemetry.addData("Keypad" , "dpad_down clicked. power = " + cntPower);
    }
    else
    {
    cntPower = 0.0;
    telemetry.addData("Keypad" , "Nothing pressed. power = " + cntPower);

    }

    contServo.setPower(cntPower);

    telemetry.update();


    }

    Thanks in advance!
Working...
X