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

    M106 precision in S parameter

    Scheduled Pinned Locked Moved
    General Discussion
    3
    3
    60
    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.
    • Seba7890undefined
      Seba7890
      last edited by

      Hi
      I've been working on some modifications to my printer recently and I'm wondering if it's possible to increase the precision for a command like M106 P3 S0.01 to M106 P3 S0.0001
      is it hardware limited or is there a workaround for this? I would need this because I would like to control something other than a fan with the M106. If not, is there another option to control a device via the duet using a command other than M106?

      Thanks for your help

      droftartsundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @Seba7890
        last edited by

        @Seba7890 If you have set up the output as a fan with M950 F#, the pwm frequency is usually set to 250Hz. This may be limiting the resolution you can get when setting the pwm speed. You can change this by setting the M950 Q parameter (see https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m950-create-heater-fan-spindle-led-strip-or-gpioservo-pin) though the maximum pwm frequency is 65535Hz. I doubt the MCU can achieve more precision than this.

        Rather than setting it as a fan, you can set it as an 'output' with M950, and control it with M42 (see https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m42-switch-io-pin). It's much the same as controlling a fan with M106, but may make the distinction between fans and other outputs clearer.

        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
        • dc42undefined
          dc42 administrators @Seba7890
          last edited by

          @Seba7890 the available PWM resolution depends on the PWM frequency, on which Duet you are using, and on which output you are using. You will get higher resolution at lower frequencies. The maximum resolution you will ever get is 16 bits.

          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
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA