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

    Using Additional PWM outputs on Duet WiFi

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    9
    1.2k
    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.
    • TKWARDundefined
      TKWARD
      last edited by

      HI,

      I'm adding a Duet to an existing machine, and all the std connections are fine.

      Im running on 24v, but the machine also has some RGB LED leds running from the 12v PSU. I Don't want to uninstall these. In fact I want to use them to signify differing phase of the printer cycle. White for load / unload, orange, for heating, red for error, etc etc etc.

      My plan id to use 3 small mosfet pcbs to drive each of R, G, and B from 3 PWM outputs on the Duet.

      I assume I can use any of these listed pins as PWM outputs ?

      So M42 P61 S128 gives me 50% duty cycle PWM on pin 9 of the header ?

      and M42 P61 S0 turns it off ?

      P Signal Name Expansion Connector Label Expansion Pin
      60 CS5 CS5 50
      61 CS6 E3_STOP 9
      62 CS7 E4_STOP 14
      63 CS8 E5_STOP 19

      Thanks for any help
      Keith

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

        The pins you list are not PWM-capable. Use the Heater3 to Heater7 (aka E2_Heater to E6_Heater) pins to drive your mosfets instead. Note, these pins are active low by default.

        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
        • TKWARDundefined
          TKWARD
          last edited by

          Thanks for the prompt response David.

          I can't find the 'internal' pin number for those. I can see the heaters on the header drawing ( 8,13,18,23,31)

          Unless its an M42 E2/3/4/5/6 S0 - 255 command ?

          Keith

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

            See https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins for the M42 pin numbers.

            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
            • TKWARDundefined
              TKWARD
              last edited by

              Excellent. Thanks!!

              If I needed additional logical switches I assume I can use the original ones I listed with no additional preamble ?

              .............and as per your suggestion, and to make sure I get this right,

              I need to use :

              M307 H3 A-1 C-1 D-1 Frees up the E2 pin on header ( pin 8 )

              Then I can use :

              M42 P3 S128 to give me 50% duty cycle PWM on pin 8

              and M42 P3 S0 to turn it off.

              ( it's going to be an allnighter I think )

              Keith

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

                Correct, except that if you drive the MOSFETs directly from the heater signals on the expansion connector, you will need to add the i1 parameter to the M42 commands to invert the output.

                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
                • TKWARDundefined
                  TKWARD
                  last edited by

                  Thanks David ....All working correctly now!

                  1 Reply Last reply Reply Quote 0
                  • Thumperprints3dundefined
                    Thumperprints3d @TKWARD
                    last edited by

                    @tkward I'd like to know more about how your led upgrade went? Any pictures?

                    TKWARDundefined 1 Reply Last reply Reply Quote 0
                    • TKWARDundefined
                      TKWARD @Thumperprints3d
                      last edited by TKWARD

                      @Thumperprints3d

                      I don’t have access to that printer now. But I did the same thing on my newly designed printer. It works well.

                      I’ll find a link to a facebook video I did.

                      https://share.icloud.com/photos/0r_c5pXsyEkLXms1RtpnTJ0Lg#East_Petersburg

                      https://share.icloud.com/photos/0fsVizVvVhX7C6ozDleqotlGQ#East_Petersburg

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