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

    PWM output for LEDs?

    Scheduled Pinned Locked Moved
    General Discussion
    2
    10
    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.
    • RGN01undefined
      RGN01
      last edited by

      I have a dimmable LED driver that I want to drive from the Duet if this is possible. It requires a 5V PWM signal of ideally 200Hz (but up to 1KHz if necessary).

      Is it possible to drive this from the Duet? If so, I'd really appreciate some help on how to do it.

      Thanks.

      Richard

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

        If you have a DueX2 or DueX5 in your system, use one of the servo outputs.

        If you don't then use one of the inverters in a 74HCT04 hex inverter IC to level shift one of the heater pins on the expansion connector to 5V.

        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
        • RGN01undefined
          RGN01
          last edited by

          Unfortunately I don't have either a DueX2 or DueX5 so will look at the option you suggest on the expansion connector. Thanks, David.

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

            It's also possible that your lighting driver will accept a 3.3V PWM signal.

            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
            • RGN01undefined
              RGN01
              last edited by

              It looks like it might - it seems that 2.9V is the threshold from 0 to 1. What is the best way to do it if 3.3.V is suitable, please?

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

                Pick one of the heater pins on the expansion connector, use a M307 command to disable the corresponding heater, then you can use M42 to control the pin. See https://duet3d.com/wiki/Using_servos_and_controlling_unused_I/O_pins.

                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
                • RGN01undefined
                  RGN01
                  last edited by

                  Fantasic, thanks, David, I'll give that a go!

                  1 Reply Last reply Reply Quote 0
                  • RGN01undefined
                    RGN01
                    last edited by

                    Am I reading it all correctly? Pin 31 on the expansion board header is Heater 7 and I could use that?

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

                      Yes, that looks correct.

                      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
                      • RGN01undefined
                        RGN01
                        last edited by

                        Thanks, David, that works perfectly.

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