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

    duet 2 wifi web control of E1 for 24v LEDs

    Scheduled Pinned Locked Moved Solved
    General Discussion
    3
    10
    632
    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.
    • JTBrownundefined
      JTBrown
      last edited by

      Hi guys, I'm converting an Ultimaker 2+ and want to control the 24v LED strip from the web control using the E1 heater pin. I'd like to use this as all my fan pins are taken or is there a better way? Just to warn you I'm new to this so need a bit more help. Many thanks

      droftartsundefined 1 Reply Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @JTBrown
        last edited by droftarts

        @JTBrown Not sure why you deleted this thread, thought it was quite a useful one! I've reinstated it. If you have resolved this, better to post your method for others to follow.

        Yes, you should be able to do this, if the LED strip is 24V. But it will depend on your firmware version how you do this. Send M115 to the Duet and post the reply.

        If you're using RepRapFirmware 3 it's pretty easy; use M950 to configure E1 as a Fan or GPIO pin, then use M106 (if defined as a fan) or M42 (if defined as a GPIO). The advantage of defining as a fan is that you get a slider for the LEDs (in the fan section) in DWC.

        If you're using RepRapFirmware 2, you need to disable the E1 heater with M307, eg M307 H2 A-1 C-1 D-1, then use M42 P2 to control the lighting. See https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins#Section_Logical_pin_numbers if you want to use a different pin.

        Finally, you can use macros to change the lighting, or just turn it on in config.g if you want the LEDs on all the time (but then you may as well have connected the LEDs to an 'always on' fan pin, or direct to VIN!)

        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

        JTBrownundefined 1 Reply Last reply Reply Quote 0
        • JTBrownundefined
          JTBrown @droftarts
          last edited by

          @droftarts Many thanks, I will give it a go.

          1 Reply Last reply Reply Quote 0
          • JTBrownundefined
            JTBrown
            last edited by

            That is after I have sorted out another problem! lol

            1 Reply Last reply Reply Quote 0
            • JTBrownundefined
              JTBrown
              last edited by

              Other problem sorted!
              I'm using RepRapFirmware 2.05.1. So would I be putting the M307 H2 A-1 C-1 D-1 and M42 P2 in the config.g file?

              1 Reply Last reply Reply Quote 0
              • JTBrownundefined
                JTBrown
                last edited by

                Yay I now have lights!
                They didn't work with just M42 P2 though. I added S255 to it and away we go.
                Just got to learn how to "use macros to change the lighting" now. Thanks @droftarts!

                1 Reply Last reply Reply Quote 0
                • JTBrownundefined
                  JTBrown
                  last edited by

                  Is there a way to add a slider, like the fans sliders, to the DWC to control a dimmer for the LED's?

                  droftartsundefined 1 Reply Last reply Reply Quote 0
                  • Phaedruxundefined
                    Phaedrux Moderator
                    last edited by Phaedrux

                    It might if you defined them as a fan. I think I've seen people do that before, but that may have been when using a fan header. Might be more doable with RRF3.

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 0
                    • droftartsundefined
                      droftarts administrators @JTBrown
                      last edited by droftarts

                      @JTBrown said in duet 2 wifi web control of E1 for 24v LEDs:

                      Is there a way to add a slider, like the fans sliders, to the DWC to control a dimmer for the LED's?

                      For RRF2, try:

                      ; LEDs
                      M307 H2 A-1 C-1 D-1 ; disable heater on E1 HEATER
                      M106 P2 A2 S0 T-1 C"LEDs" ; define fan 2 as LEDs on H2
                      

                      'P2' sets this as a third fan (assuming you already have P0 and P1), A2 maps it to the E1 HEATER pins. This should show up in the fan sliders. You can control it with M106 P2 Snn, where nn = 0 to 255 or 0.0 to 1.0. See https://duet3d.dozuki.com/Wiki/Gcode#Section_M106_Fan_On for more settings.

                      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 2
                      • JTBrownundefined
                        JTBrown
                        last edited by

                        Works a treat, Thanks again @droftarts

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