Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Servos not working correctly

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    4
    233
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • illyundefined
      illy
      last edited by

      Hi everyone!

      I have 2 servos (Savöx Mini-Servo SH-0264MG) that connected to my Duex 2 (PWM4 and PWM5). These servos are used to pick and put the extruder back. In RRF2 (2.05.1) they work correctly, but in RRF (3.0) they do not. They can pick the extruder correctly, but unable to put it back. I think there is something wrong with the angle or maybe a changed behaviour in RRF3.

      The board is Duet 2 WiFi.

      config.g:
      ; SERVOS SETUP
      ;M307 H6 A-1 C-1 D-1 ; not supported in RRF3*
      ;M307 H7 A-1 C-1 D-1 ; not supported in RRF3*
      M950 P6 C"!duex.pwm4"
      M42 P6 S0
      M950 P7 C"!duex.pwm5"
      M42 P7 S0

      tpre0.g:
      M400

      G91
      G1 Z2
      G90

      G1 X-30 F12000
      G1 X-39.5 F1000
      G4 P300
      M280 P6 S155
      G4 P300
      G1 X-30 F12000

      G91
      G1 Z-2
      G90

      tfree0.g:
      G91
      G1 Z2
      G90

      G53 G1 X-30 F12000
      G53 G1 X-39.5 F1000
      G4 P300
      M280 P6 S60
      G4 P300
      G53 G1 X-30 F12000

      G91
      G1 Z-2
      G90

      I look forward to your help. Thanks!

      droftartsundefined 1 Reply Last reply Reply Quote 0
      • Vetiundefined
        Veti
        last edited by Veti

        the servo commands are different in rrf3 change the P to S and start at 0

        M950 S0 C"!duex.pwm4"
        M950 S1 C"!duex.pwm5"

        And change the number in the M280 command

        M280 P0 S60

        illyundefined 1 Reply Last reply Reply Quote 0
        • droftartsundefined
          droftarts administrators @illy
          last edited by

          @sykb What was the M280 command in tpre0.g and tfree0.g in RRF2? Or has it not changed?

          I think this is an issue with the servo PWM frequency. Try M950 using S parameter instead of P, as S default PWM frequency is 50Hz (usual for most hobby servos), while P is 500Hz and probably too fast. Or use Q to set the PWM frequency.

          If the M280 command in RRF2 had I1 in it, try without inversion, eg:

          M950 S6 C"duex.pwm4"
          M950 S7 C"duex.pwm5"
          

          I don't think you need the M42 commands either, as I think it is set at 0 when defined.

          Ian

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

          1 Reply Last reply Reply Quote 0
          • illyundefined
            illy @Veti
            last edited by

            @Veti @droftarts thank you for your help. It's working now.

            No, the M280 commands have not changed and did not have I1 in RRF2.

            I use S in the M950 command, started at 0 and without "!" for the C parameter. Somehow the servos are working correctly right now.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA