Announcement

Collapse
No announcement yet.

Servo Function driving me nuts

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

  • Servo Function driving me nuts

    I mentor two teams. Team 1 has a functioning machine with servos. Team 2 has a function machine but the servis will not function. Programming in blocks.

    Before each of you think one of the following:
    servo bad - tried several in several ports and the same servos with the programmer - Servos good
    servo plugged in backwards - tried that several ports
    bad program - if gamepad1-x set Servo position 1 else Servo position 0 - no joy - tried several buttons and verified position with telemetry
    tried seversl different buttons different ports
    tried configuration copied and edited without servos and ran motors. Added back in servos in new configuration - servos stroll inop
    bad expansion hub - tried the two hubs I have both with the same noop servos
    restarted robot seversl times
    redtarted phones
    restarted laptop
    restarted chrome

    basically I cant think of anything else to do.

    Help......

    mike


  • #2
    With the caveat that I'm NOT the programming mentor...

    Have you tried setting the servo positions at decimal numbers? i.e. set Servo position 0.9 else Servo position 0.1

    We don't use blocks, however, in looking at what code I have available during school hours, all our servo positions are in decimal numbers.

    If that's not it, please post your full code and I'll have one of the students take a look.

    Michael P Clark
    Founding Mentor, FTC 9958
    http://www.redfishrobotics.com
    "We're Hooked on FIRST"

    Comment


    • #3
      I'll get code posted later today and try a decimal input. We whittled the code down to nothing except the wait until start, while op-mode active, controller button input, servo set position, and telemetry so I would be surprised if it was code. In fact we got appropriate button state and servo position out through the telemetry even though the servo was not operating. It seems there is no power to the servo...

      Comment


      • #4
        At this point I'll try just about anything...

        Comment


        • #5
          Depending on the servo and the Rev controller it is possible that a 1.0 or a 0.0 may not get a response from the servo. Just ran into it this week with my team that driving the tetrix motors thru a servo port can't go past 0.87.

          So it is entirely possible that a 0.1 and 0.9 will help.

          Comment


          • #6
            The REV Hub spans servo pulses from 500μs (micro seconds) for Java position 0.0 to 2500μs for position 1.0. Many servos have narrower ranges of accepted signal inputs. For example, the popular Hitec HS-485HB has a standard range of only 553-2425μsec (see https://www.servocity.com/hs-485hb-servo for reference).
            Thus setting the hub to 0.0 or 1.0 would provide a signal just outside of the control range and the servo may not do anything, or in the case of a digital signal may hold the last known "good" position, or even a fail-safe position depending on the servo.
            In the case of the HS-485HB, the range you supply should be clipped. To calculate this, the formula is java_setting=(setpoint-500)/2000 (where 500 is the REV base and 2000 is the REV span). Thus the lowest setting for this specific servo is (553-500)/2000=0.0265 and the max setting would be (2425-500)/2000=0.9625. Settings outside this range are not advised (but may work depending on hardware variations).
            Hope that clears it up.
            Technical Coach, Newton Busters FTC 10138, FLL 3077
            Chicago 'burbs, IL

            Comment


            • #7
              I suggest teams use Servo.scaleRange(). Invoking scaleRange() on all your servos can allow your servos to have the same [0.0, 1.0] logical range in the main body of your code. Makes your code easier to understand and maintain. The min/max parameters can be determined pragmatically or through trial and error.

              Comment


              • #8
                Here is the inop Servo code

                Comment


                • #9
                  Sorry about the quality. I substituted another expansion hub this afternoon. Still inop

                  Comment


                  • #10
                    Originally posted by DanOelkeFTA View Post
                    Depending on the servo and the Rev controller it is possible that a 1.0 or a 0.0 may not get a response from the servo. Just ran into it this week with my team that driving the tetrix motors thru a servo port can't go past 0.87.

                    So it is entirely possible that a 0.1 and 0.9 will help.
                    Thanks. Tried .25/.75 this afternoon. Still inop.

                    Comment


                    • #11
                      Originally posted by Alec View Post
                      I suggest teams use Servo.scaleRange(). Invoking scaleRange() on all your servos can allow your servos to have the same [0.0, 1.0] logical range in the main body of your code. Makes your code easier to understand and maintain. The min/max parameters can be determined pragmatically or through trial and error.
                      Good idea. I

                      Comment


                      • #12
                        Dang apostrophes..... i would like any response from a Servo. I lean towards changing from java to blocks. Don

                        Comment


                        • #13
                          Arrrggg...... do not know why but I

                          Comment


                          • #14
                            I think I will shoot auto correct.....

                            Comment


                            • #15
                              ... will accept ANY reason if it fixes the servos

                              Comment

                              Working...
                              X