Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Repurpose unused pin for WS2812 Duet2

    Duet Hardware and wiring
    4
    9
    77
    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.
    • LeckieTech
      LeckieTech last edited by

      I see there is support for addressable LEDs for duet 3 using its dedicated LED port. Is it possible to use an empty pin from the Duet2 and repurpose it for a dotstar data pin?

      Thanks in advance

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

        I think you mean Neopixel, not DotStar. To drive a Neopixel string efficiently, you need to use an unused SPI channel. I think all the ones available on Duet 2 are already in use.

        1 Reply Last reply Reply Quote 0
        • LeckieTech
          LeckieTech last edited by

          Oh yes, sorry, I meant NeoPixel/DotStar pin I saw it can be configured for either. So there is no possibility to reassign a digital or pwm pin? Similar to how it could be done with marlin?

          droftarts 1 Reply Last reply Reply Quote 0
          • droftarts
            droftarts Moderator @LeckieTech last edited by

            @LeckieTech see this thread, which has a number of different ways to set them up: https://forum.duet3d.com/topic/13600/how-can-i-control-addressable-rgb-leds/

            Ian

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

              My guess is that Marlin suspends everything else when you write to Neopixel LEDs. I think you will find that if you command the LEDs while printing, it pauses the print briefly.

              On Duet 3 and 3 Mini we use a dedicated SPI channel with DMA to drive Neopixel LED strips.

              There are threads on this forum about using an Arduino connected to the Duet to control Neopixel strips.

              zapta 1 Reply Last reply Reply Quote 0
              • LeckieTech
                LeckieTech last edited by

                Oh yes, I have searched before posting this and did see it could be done with an Arduino but I was hoping for a more efficient wiring solution for my project since I have 60 printers to upgrade. The printer pausing wouldn't be a problem for me as I would only be sending data to the LED strip via M150 when the operations change (filament change, heating/cooling hot end/bed, printer ready/print in progress, etc). The whole purpose of the lights would be to have different color codes so they stand out on the rack at a glance when they need attention. Too many times I've walked by printers that have not been printing for hours because they'd finished or run out of filament and paused! I would still be interested if it is possible!

                droftarts 1 Reply Last reply Reply Quote 0
                • droftarts
                  droftarts Moderator @LeckieTech last edited by

                  @LeckieTech Do you need to use NeoPixels? Do you need more than one status light on at a time, showing different colours? If not, you can use a 4-wire RGB LED strip (or just one LED), wire the three LED PWM channels to spare heater pins (eg on the expansion connector if you don't have Duex5 board) and control the PWM to each fan channel to control the colour. See @appjaws post here: https://forum.duet3d.com/post/134969

                  Not sure how to do it using SPI. However, there are accessible SPI pins on the temperature daughterboard connector, PanelDue ribbon cable connector and expansion pins, so if you're not using one of those, maybe look to use one of those? See wiring diagram for location: https://duet3d.dozuki.com/Wiki/Duet_Wiring_Diagrams

                  Ian

                  1 Reply Last reply Reply Quote 0
                  • LeckieTech
                    LeckieTech last edited by

                    I really wanted to use addressable LEDs, mainly because we already have many of our printers fixed with them running 8bit marlin boards. Were trying to roll out a wifi2 board upgrade with the least amount of labor/parts

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

                      @dc42 said in Repurpose unused pin for WS2812 Duet2:

                      My guess is that Marlin suspends everything else when you write to Neopixel LEDs. I think you will find that if you command the LEDs while printing, it pauses the print briefly.

                      @dc42, what is your estimation of the pause necessary to change the color of N WS2812 LEDS connected in serial?

                      According to the link below, 100 serial LEDs require less than 5ms, shorter than a retraction, and most users may still prefer it over having to attach an Arduino. (I would).

                      https://blog.ja-ke.tech/2019/06/02/neopixel-performance.html

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