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

    How can I control addressable RGB LEDS?

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    11
    35
    4.4k
    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.
    • matej1006undefined
      matej1006 @wkellyo
      last edited by

      @wkellyo Awesome thanks i will look at this closly today and maybe i will have more
      question

      1 Reply Last reply Reply Quote 0
      • appjawsundefined
        appjaws
        last edited by

        I have an LED RGB strip connected directly to fan outputs on the duex5.
        The colours are controlled by macros depending on the state of the machine.
        Red for startup, bed levelling etc
        Green for printer ready but idle
        Blue for printing.
        Of course other colours could be used for other states.

        I also have Red, Green and Blue sliders that can be adjusted in real time if I want to display them.

        I'm just waiting now for the object model to include variables so I can change the LED from 1 colour to another gradually.

        Hope that helps

        appjaws - Core XYUV Duet Ethernet Duex5
        firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
        Ormerod 1-converted to laser engraver, Duet wifi
        OpenSCAD version 2024.03.18
        Simplify3D 5.1.2

        matej1006undefined 1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal
          last edited by

          Thanks folks! That helps.

          Dotstar on Duet3, with various macros that Duet/RepRap firmware auto-invokes, like start.g, pause.g, etc. that will be one of the "cleanest" ways to have events on a Duet change lighting, with everything direct attached to the Duet itself.

          Having said that, it will also be VERY easy to produce a device that polls a printer for status, and has menu choices that tie printing, heating, idle, etc, etc. to colors or other states on one or more NeoPixel or Dotstar strips.

          This opens the door to the lights being on the printer, or being in another room. As long as the printer is network reachable.

          Would there be interest in this? As a free download that runs on off-the-shelf hardware costing $20 to $40 USD? I want to orient it toward a couple of hardware options that are not going to require soldering (or very little). Not just a collection of boards...

          Delta / Kossel printer fanatic

          1 Reply Last reply Reply Quote 0
          • matej1006undefined
            matej1006 @appjaws
            last edited by

            @appjaws Nice even better can you share how you connected them to duex5 and the code please ?
            What kind of RGB did you use i have WS2818?

            matej1006undefined 1 Reply Last reply Reply Quote 0
            • matej1006undefined
              matej1006 @matej1006
              last edited by

              @appjaws what pin's did you use gpio or which one's

              1 Reply Last reply Reply Quote 0
              • appjawsundefined
                appjaws
                last edited by

                @matej1006 I connected the RGB wires to the fan outputs negative pins for fan 3,4 and 5 and the common wire to the positive .
                the LED settings were then added to config.g:-

                ; LED Lighting
                M950 F3 C"duex.fan3" Q500 ; create fan 3 on pin duex.fan3 and set its frequency for LED Red
                M106 P3 C"RGB Red" ; set RGB Red to P3
                M950 F4 C"duex.fan4" Q500 ; create fan 4 on pin duex.fan4 and set its frequency for LED Green
                M106 P4 C"RGB Green" ; set RGB Green to P4
                M950 F5 C"duex.fan5" Q500 ; create fan 5 on pin duex.fan5 and set its frequency for LED Blue
                M106 P5 C"RGB Blue" ; set RGB Blue to P5

                I just bought a strip from amazon, my system is 24V so I bought a 5 meter reel of DC24V LED Ribbon.
                Hope this helps

                appjaws - Core XYUV Duet Ethernet Duex5
                firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
                Ormerod 1-converted to laser engraver, Duet wifi
                OpenSCAD version 2024.03.18
                Simplify3D 5.1.2

                matej1006undefined 1 Reply Last reply Reply Quote 0
                • matej1006undefined
                  matej1006 @appjaws
                  last edited by

                  @appjaws mm ok thenyour strip isn't same as my, i have only 3 cabel to connect i have 2 wire for supply voltage and one for digital input.

                  So i guess i will need to add arduino anyway . thanks 😉

                  Greetings Matej

                  1 Reply Last reply Reply Quote 0
                  • appjawsundefined
                    appjaws
                    last edited by

                    This is a link for the 12V version at £8.50
                    JOYLAND 12V Flexible RGB LED Strip Lights 300 Units 5050 LEDs, Non-Waterproof LED Tape Multi-Colors LED Strips Light Pack of 16.4ft/5m
                    by Joyled

                    appjaws - Core XYUV Duet Ethernet Duex5
                    firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
                    Ormerod 1-converted to laser engraver, Duet wifi
                    OpenSCAD version 2024.03.18
                    Simplify3D 5.1.2

                    matej1006undefined 1 Reply Last reply Reply Quote 0
                    • matej1006undefined
                      matej1006 @appjaws
                      last edited by

                      @appjaws Link don't work

                      1 Reply Last reply Reply Quote 0
                      • appjawsundefined
                        appjaws
                        last edited by

                        @appjaws said in How can I control addressable RGB LEDS?:

                        JOYLAND 12V Flexible RGB LED Strip Lights

                        just do a search in amazon for JOYLAND 12V Flexible RGB LED Strip Lights

                        appjaws - Core XYUV Duet Ethernet Duex5
                        firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
                        Ormerod 1-converted to laser engraver, Duet wifi
                        OpenSCAD version 2024.03.18
                        Simplify3D 5.1.2

                        1 Reply Last reply Reply Quote 0
                        • hersheycjundefined
                          hersheycj
                          last edited by

                          I have recently setup the E3D Toolchanger with a Duet2 Wifi and Duex5 boards. I also upgraded to the RRF3 firmware and had a question regarding setup of Neopixel lights with these boards. I am wondering, what is it about the Duex5 board which requires an additional Arduino to control the LED lights. From first inspection, I would have thought the PWM pins on the Duex5 along with M950 and M150 gcode would have been enough to control the LED lights. What is it about the arduino board that makes it a necessary component?

                          1 Reply Last reply Reply Quote 0
                          • whopping pochardundefined
                            whopping pochard
                            last edited by

                            For normal non-addressable RGB LEDs, you’re exactly right. However, if you want to use fancy individually-addressable LEDs like Neopixels, an Arduino offers a convenient way of controlling them via existing libraries.

                            hersheycjundefined 1 Reply Last reply Reply Quote 1
                            • hersheycjundefined
                              hersheycj @whopping pochard
                              last edited by

                              @whopping-pochard said in How can I control addressable RGB LEDS?:

                              For normal non-addressable RGB LEDs, you’re exactly right. However, if you want to use fancy individually-addressable LEDs like Neopixels, an Arduino offers a convenient way of controlling them via existing libraries.

                              That makes sense. Thanks for clearing it up. I'll play around with both.

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

                                Neopixels have tricky timing requirements, which means that unless you use DMA to SPI, you have to stop all other processing while writing to them.

                                The Duet 3 main board supports Neopixel strips directly, because the CPU on that board had a spare SPI channels that we could dedicate to Neopixel support, and enough RAM that we were able to dedicate some to a Neopixel DMA buffer. Duet 2 doesn't have a spare SPI channel.

                                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
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA