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

Clipping Servo Range on Duet 3

Scheduled Pinned Locked Moved
Tuning and tweaking
4
10
429
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.
  • undefined
    KevinMar
    last edited by 16 Apr 2020, 06:22

    I'm modifying my printer to use air pump cooling. A servo will be used to control the pressure of the air flow.
    I have a simple 9g RC servo plugged into the servo port on my Duet 3, with it configured as follows:
    ; Fans for print cooling
    M950 F0 C"0.out9"
    M106 P0 C"PrintCool"

    When I try to adjust the servo angle using the fan slider in DWC, the servo only moves between the values of 20 and 55. Through these 35 points, the servo moves approximately its entire range.
    Is there a way I can clip the range to 20-55? So that at "0" the output is 20, and at "100" the output is 55?

    Thanks for any assistance!

    undefined undefined 2 Replies Last reply 16 Apr 2020, 12:01 Reply Quote 0
    • undefined
      T3P3Tony administrators @KevinMar
      last edited by 16 Apr 2020, 12:01

      @KevinMar not without modifying DWC to send a different M106 Sxx number for a different range, depending on your familiarity with web development this may or may not be simple to od. I think there is a potential argument to make the fan slider %s configurable in DWC though for a more general use case where fans only operate with PWM within a limited range. @chrishamm can you add this to the DWC wishlist please.

      www.duet3d.com

      undefined 1 Reply Last reply 16 Apr 2020, 12:52 Reply Quote 0
      • undefined
        dc42 administrators @KevinMar
        last edited by 16 Apr 2020, 12:23

        @KevinMar said in Clipping Servo Range on Duet 3:

        I'm modifying my printer to use air pump cooling. A servo will be used to control the pressure of the air flow.
        I have a simple 9g RC servo plugged into the servo port on my Duet 3, with it configured as follows:
        ; Fans for print cooling
        M950 F0 C"0.out9"
        M106 P0 C"PrintCool"

        When I try to adjust the servo angle using the fan slider in DWC, the servo only moves between the values of 20 and 55. Through these 35 points, the servo moves approximately its entire range.
        Is there a way I can clip the range to 20-55? So that at "0" the output is 20, and at "100" the output is 55?

        Thanks for any assistance!

        Servos are normally driven using the M280 command, not as fans. If you want to drive a servo as if it is a fan, you will need to adjust the PWM frequency using the Q parameter of the M950 command. Try values in the range 50 to 250Hz.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 1
        • undefined
          KevinMar @T3P3Tony
          last edited by 16 Apr 2020, 12:52

          @T3P3Tony said in Clipping Servo Range on Duet 3:

          @KevinMar not without modifying DWC to send a different M106 Sxx number for a different range, depending on your familiarity with web development this may or may not be simple to od. I think there is a potential argument to make the fan slider %s configurable in DWC though for a more general use case where fans only operate with PWM within a limited range. @chrishamm can you add this to the DWC wishlist please.

          Sorry I wasn't clear about this, but I was only using DWC for testing. I am more concerned with how it would run during a print using normal fan commands.

          undefined 1 Reply Last reply 16 Apr 2020, 13:49 Reply Quote 0
          • undefined
            dc42 administrators @KevinMar
            last edited by 16 Apr 2020, 13:49

            @KevinMar said in Clipping Servo Range on Duet 3:

            Sorry I wasn't clear about this, but I was only using DWC for testing. I am more concerned with how it would run during a print using normal fan commands.

            Servos and fans are completely different devices. M106 controls fans, M280 controls servos.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • undefined
              Danal
              last edited by 16 Apr 2020, 15:12

              @dc42 I've been talking to Kevin in another forum.

              This servo is ultimately going to physically control a fan, so he wants it to be PWM 'speed controlled' like a fan, where that PWM is really setting the position of a servo.

              What is the best way to go about that? We started by defining it very much like a fan, and then trying to adjust the PWM so that it worked for a 1000-2000us hobby servo. We are partway there...

              Delta / Kossel printer fanatic

              undefined 1 Reply Last reply 16 Apr 2020, 18:33 Reply Quote 0
              • undefined
                dc42 administrators @Danal
                last edited by 16 Apr 2020, 18:33

                Have you tried adjusting the PWM frequency?

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                1 Reply Last reply Reply Quote 0
                • undefined
                  KevinMar
                  last edited by KevinMar 16 Apr 2020, 19:47

                  Currently playing with Q values in M950

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    KevinMar
                    last edited by 16 Apr 2020, 20:06

                    I have tried values between 50 and 900, and none of them give me linear control from 0 to 100. Interestingly, though, as the numbers got higher (towards 700-900) the control became much more fine, although the range of motion decreased

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      KevinMar
                      last edited by 16 Apr 2020, 20:08

                      With Q600 I get motion between 45 and 100, although the servo range of motion is only about 60 degrees. This is good enough for me. With this setup I make 45% my "open valve (low pressure)" and 100% my "closed valve (high pressure)"

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