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

    Replicating fan speed as a servo signal on custom PWM pin

    Scheduled Pinned Locked Moved
    General Discussion
    2
    3
    501
    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.
    • Captain_squndefined
      Captain_sq
      last edited by

      Hello,
      I posted this question under Hardware and Wiring and that might have been a little off topic, so I'm trying here in the general part instead.

      Is it possible to set up a custom output on the Duet Wifi that will generate a servo signal (1-2 mS) that follow/is proportional to the value of FAN0?
      f ex
      0% = 1.0mS
      100% = 2.0 mS

      If that's not possible, tweaking the FAN0 PWM output itself to produce a 22mS period pulse train with 1-2 mS duty cycle would yield a valid servo signal between 5...9 % in its entire span. Not much to play around with.

      I could solve this in the Slicer (S3D) if math in the G-code was possible with a REPLACE macro that would produce something like this.
      ; Before
      .
      .
      M106 S127
      .

      ; After
      .
      .
      M280 P1 S(([fan_speed_pwm]/255)*1000 +1000) ; S127 "Imaginary" expression


      Any thoughts ? Did I miss something?

      Regards /Thom

      Custom made Kossel Mini - Duet WiFi / Modded Tronxy X5S - Duet WiFi / Prusa i3 MKIII


      Embedded systems designer, RC Pilot, maker and Gadget-o-holic

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by dc42

        That will be possible when the RepRapFirmware object model is implemented (which I hope will be in firmware 2.03), because at that time maths in GCode commands will be supported. Or you could modify the firmware to set the servo output automatically.

        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
        • Captain_squndefined
          Captain_sq
          last edited by

          OK, Great! In the mean time I'll just filter the output from S3D through a AutoIt serial editor filter that will perform the conversion.

          Thanks /Thom

          Custom made Kossel Mini - Duet WiFi / Modded Tronxy X5S - Duet WiFi / Prusa i3 MKIII


          Embedded systems designer, RC Pilot, maker and Gadget-o-holic

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