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

    How to put LED control on the web interface and touch screen

    Scheduled Pinned Locked Moved
    Duet Web Control
    6
    12
    1.3k
    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.
    • jay_s_ukundefined
      jay_s_uk
      last edited by

      You could set the LED's up as a fan.
      That way you could use a fan slider on DWC.

      In terms of getting the value to revert after X seconds, I'm not sure that will be possible until variables are available as part of 3.02

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      fxsteinundefined 1 Reply Last reply Reply Quote 0
      • fxsteinundefined
        fxstein @jay_s_uk
        last edited by fxstein

        @jay_s_uk Can a heater output be turned into a fan? The reason I had to hook it up to heater 5 was because I am drawing some 4A for all the combined LEDs, whereas fan outputs only support 1.5A

        M950 does not seem to allow both heater and fan to be specified at the same time.

        Thanks!

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

          Yes with RRF 3.1 you can configure a heater output to support a fan.

          The timeout can probably be done using the daemon.g file.

          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

          fxsteinundefined 1 Reply Last reply Reply Quote 1
          • jay_s_ukundefined
            jay_s_uk
            last edited by

            You can certainly use a heater output has a fan.

            Your M307 command is disabling heater 6 from being a heater so you're halfway there.
            You can then use M106 to assign P6 as a fan and control it that way.

            In RRF3, its much easier to assign pins as nothing has a default use

            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

            fxsteinundefined 1 Reply Last reply Reply Quote 1
            • fxsteinundefined
              fxstein @dc42
              last edited by fxstein

              @dc42 Upgrading to 3.1 is on my roadmap. As soon as we get the next printer put together I will go there.

              Thanks a lot for the suggestion!

              1 Reply Last reply Reply Quote 0
              • fxsteinundefined
                fxstein @jay_s_uk
                last edited by fxstein

                @jay_s_uk said in How to put LED control on the web interface and touch screen:

                You can certainly use a heater output has a fan.

                Your M307 command is disabling heater 6 from being a heater so you're halfway there.
                You can then use M106 to assign P6 as a fan and control it that way.

                In RRF3, its much easier to assign pins as nothing has a default use

                Ah - just what I was looking for.

                Here is the new config.g snippet in case others are looking to control LEDs with the Duet/Duex through the web interface:

                ; LED Lights - Duex5
                M307 H6 A-1 C-1 D-1				; Use heater 5 for LED lights on Duex5
                M106 P6 S1.0 C"LEDs" A6				; Map to fan control, name and set to full bright
                
                

                Now with a web frontend slider:

                Screen Shot 2020-06-09 at 11.45.20 PM.png

                Thank you very much!

                1 Reply Last reply Reply Quote 2
                • fxsteinundefined
                  fxstein
                  last edited by

                  And found a way to lower the light level after 30 mins. A bit of a hack but uses the fan controls blip timer:

                  ; LED Lights - Duex5
                  M307 H6 A-1 C-1 D-1				; Use heater 5 for LED lights on Duex5
                  M106 P6 B1800 C"LEDs" A6			; Map to fan control, name and set to full bright for 30 min
                  M106 P6 S0.01					; Trigger burst of 1800 sec 30 min full bright than go to 1%
                  

                  This will turn on the LEDs to full bright on startup or whenever coming off 0%, then go to the selected percentage.

                  Only downside is that you cannot dim the LEDs during those 30 min, but you can turn them off.

                  Phaedruxundefined 1 Reply Last reply Reply Quote 2
                  • Phaedruxundefined
                    Phaedrux Moderator @fxstein
                    last edited by

                    @fxstein That's clever.

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 1
                    • RODOKASundefined
                      RODOKAS
                      last edited by

                      hello friends, I tried to turn on my lighting in this way on rrf3 and was unsuccessful, could my code be wrong?
                      ; Iluminação
                      M950 F3 C"exp.heater5"
                      M106 P3 B300 C"LUZ" S1
                      M106 P3 S0.2
                      the slider appears to me, but I don’t have the lighting that used to be connected directly to the 12v

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

                        How have you connected the lighting to the Duet? exp.heater5 is a 3.3V level control signal, not suitable for driving LEDs directly.

                        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

                        RODOKASundefined 1 Reply Last reply Reply Quote 0
                        • RODOKASundefined
                          RODOKAS @dc42
                          last edited by

                          @dc42 thanks david, i totally forgot that it is 3.3v, i connect to exp.heater5 and gnd, that was my mistake. is there a pin on the expansion post to turn on the leds without the use of expansion?

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