Announcement

Collapse
No announcement yet.

Continuous Rotation Servos with Rev hub

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

  • Continuous Rotation Servos with Rev hub

    We're having an issue with continuous rotation servos and the Rev hub.
    The servo is a HiTec HSR-2645CR. When connected to Modern Robotics electronics, it works fine. When connected to Rev, it does nothing. All our other servos work properly with Rev, so we know how to configure them. We've also tried using the continuous servos as regular servos and assigning powers of 0 or 1, with .5 to stop. Still, nothing moves with the Rev.
    Any help or advice would be appreciated. The program we're using for testing purposes is below. By the way, we've flashed the Rev firmware to the latest.
    Thanks!

    package org.firstinspires.ftc.teamcode;
    import com.qualcomm.robotcore.eventloop.opmode.Autonomous ;
    import com.qualcomm.robotcore.eventloop.opmode.LinearOpMo de;
    import com.qualcomm.robotcore.hardware.Servo;
    import com.qualcomm.robotcore.hardware.CRServo;
    @Autonomous(name = "Concept Scan Servo", group = "Concept")
    public class ConceptScanServo extends LinearOpMode {
    CRServo servo;
    public void runOpMode() {
    servo = hardwareMap.get(CRServo.class, "servo");
    waitForStart();
    while(opModeIsActive()){
    servo.setPower(1);
    sleep(1000);
    servo.setPower(-1);
    sleep(1000);
    servo.setPower(0);
    sleep(1000);
    }
    }
    }

  • #2
    Have you tried something that is not at the extreme end of the PWM spectrum? Such as 0.7?

    Comment


    • #3
      Any chance you're only powering your REV unit with the phone and not the 12V battery? That's the mistake I made when I tried to run your code. No error messages, but the CR servo didn't run. Turned on the main power supply, and it worked as expected.

      Comment


      • #4
        Good suggestions. Originally we tried it with the sample opmode that "sweeps" the servo, so it should have gone through all the values, but it never twitched. We can try it again and slow down the sweeping to see if there is any point where it works.

        We also tried multiple versions of the same servo on different bots on different days, and the battery was on, so I don't think that's the issue.

        I'm wondering if it's related to the fact that it's a "digital" servo. Not sure why that would matter, or exactly how they are different. We've ordered some analog CR servos to try.

        Comment


        • #5
          Some digital servo gristle to chew on -

          https://ftcforum.usfirst.org/forum/f...ervos-heads-up

          https://ftcforum.usfirst.org/forum/f...o-power-module

          Comment


          • #6
            Thanks to everyone for your help. The solution ended up being as simple as using smaller values (from -0.79 to +0.79 in our case). Rev also replied just today and suggested the same thing.

            Comment

            Working...
            X