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

    Adding a second strips of neo pixels?

    Scheduled Pinned Locked Moved
    General Discussion
    5
    17
    736
    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.
    • zaptaundefined
      zapta
      last edited by

      I have an strip of 20 neo pixles that are connected to a Mini5 with three wires and used to illuminate the printer chamber. It works well.

      Now I would like to add a second strip of 3 neopixels on the head (for the upcoming new Voron head design), ideally using only 3 wires going to each strip (that is, no daisy chain).

      Any suggestion on how to do that? Is there a second neopixel port? Adding dummy neo pixels as delay? Anything else?

      Th0mpyundefined o_lampeundefined dc42undefined 3 Replies Last reply Reply Quote 1
      • Th0mpyundefined
        Th0mpy @zapta
        last edited by Th0mpy

        @zapta I don't think there is. I suppose it'd be technically possible, if you changed the code to use another output, the neopixel output is very similar to the other outputs (with an additional resistor) .

        Is that a new afterburner head? Where did you see that?

        Usually the team that scores the most points wins the game.

        zaptaundefined 1 Reply Last reply Reply Quote 1
        • zaptaundefined
          zapta @Th0mpy
          last edited by zapta

          @th0mpy , I was thinking, maybe adding hidden 3 Neo pixels as a delay, achieving a virtual chain of 3 + 20, without having to daisy chain them (see diagram below). Do you think this will work? I don't know what is the fan out of the Duet's output.

          As for new head, I recommend watching this video https://youtu.be/lnMJBdUXuH4 , all coming soon.

          BTW, the two nozzle nozzle pixels should also work well with a nozzle camera like this one https://www.youtube.com/watch?v=GAp23w_dnNc . I already damaged the first cam. Second one arrived today from Amazon 😉

          5a8d6b6c-37b0-4a45-9d8c-6ed3ae572676-IMG-3170 (1).jpg

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

            @zapta That looks cool! Too bad it looks like I won't be able to use my LGX (as it looks). We'll see I guess.

            I suppose your idea about a few dummy LEDs might work, I'm not familiar enough with how they work yet but I have a string of them that I will put into my printer eventually. Let me know if that works for you, I'd be interested to see what you come up with.

            Usually the team that scores the most points wins the game.

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

              @zapta said in Adding a second strips of neo pixels?:

              Is there a second neopixel port?

              On the Mini5+ are two NP-ports: one regular and the other goes to 12864LCDs. Not sure which pin it is or if the LED on the display is controlled by the display itself (the data sent wrapped in the LCD data stream?)

              Nevertheless, the STM-port of RRF allows you to define any pin as NeoPixel port. @gloomyandy @jay_s_uk , please correct me if I'm wrong.
              It would be cool, if that (*) would be implemented into the main-port. *) the whole board.txt thing is worth pulling)

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

                @zapta there are two Neopixel outputs on the Mini. One is the dedicated port and is driven by DMA. The other is intended for the 12864 display and is driven by bit banging. If you don't have a 12864 display connected then you could use that one.

                Another possibility is to use an external gate to switch the main output between the two strings

                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

                o_lampeundefined zaptaundefined 2 Replies Last reply Reply Quote 0
                • o_lampeundefined
                  o_lampe @dc42
                  last edited by

                  @dc42
                  ..what a coincidence, we wrote almost the same. Please comment on the STM-branch pull-request

                  1 Reply Last reply Reply Quote 0
                  • gloomyandyundefined
                    gloomyandy @o_lampe
                    last edited by

                    @o_lampe The board.txt mechanism is not really ideal, it is there mainly to avoid having to have multiple builds for boards that are basically very similar. Although it provides that flexibility it also adds a potential source of error that the Duet boards do not have (it is fairly common for folks to get the board.txt settings wrong).

                    In this case I'd say it is not the best solution. Rather something like an extension of the existing RRF mechanisms would be better, we already have ways to define a pin for something like a heater port or fan control, I would have thought this same system could be used to define an LED port. That way a user can simply use gcode to define the pin(s) to be used.

                    o_lampeundefined 1 Reply Last reply Reply Quote 0
                    • o_lampeundefined
                      o_lampe @gloomyandy
                      last edited by

                      @gloomyandy @dc42
                      I agree that RRF3 has offered a new flexibility regarding pin/port definitions. The NeoPixel implementation doesn't allow that for the benefit of DMA, but the bit banging versions should allow "free" choice of pin(s).
                      And while we are talking about bit banging: why not implement a SW-SPI or SW-UART port?
                      There are so many things happening outside of the actual print-time, where we could use the MCU effectively instead of sitting idle.

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

                        @dc42 said in Adding a second strips of neo pixels?:

                        The other is intended for the 12864 display and is driven by bit banging

                        I set the colors every 10 secs in the daemon.g file. What are the implications of using a bit banging output with 25 neo pixels? Does it occupy the CPU 100% for the duration of the transmission? Will this interfere with normal printing?

                        (Most of my neo pixels updates are no change so I guess I could skip them using some global variable that keeps the last updated state but it's extra complexity and will not recover fast from update errors)

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

                          @zapta said in Adding a second strips of neo pixels?:

                          Does it occupy the CPU 100% for the duration of the transmission? Will this interfere with normal printing?

                          Yes and yes. That's why if you want to update both LED strings during a print, it would be better to use an external gate so that you can drive both strings from the DMA-driven channel. You will need a 74HCT02 IC and a spare IOx_OUT pin.

                          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

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

                            Thanks @dc42, I will stay with DMA only then.

                            What do you think about the topology here https://forum.duet3d.com/topic/26347/adding-a-second-strips-of-neo-pixels/2?_=1639426715611 ? Using three helper neo pixels near the duet to simulate a single 3 + 20 neo pixel string without using a daisy chain?

                            The neo pixel data output seems to drive 50ma so probably good enough to drive a ~150cm wire to the 20 neo pixels string. https://cdn-shop.adafruit.com/product-files/1138/SK6812+LED+datasheet+.pdf

                            dc42undefined 1 Reply Last reply Reply Quote 0
                            • zaptaundefined zapta referenced this topic
                            • dc42undefined
                              dc42 administrators @zapta
                              last edited by

                              @zapta how often will you change the colours on the strip of 3? If it's only occasionally then you could use the bit-bang channel for them.

                              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

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

                                @dc42 said in Adding a second strips of neo pixels?:

                                @zapta how often will you change the colours on the strip of 3? If it's only occasionally then you could use the bit-bang channel for them.

                                I update every 10 secs but the color actually changed when the printer changes state (printing, cooling, idle, etc) so very seldom if I will skip the no change updates.

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

                                  @zapta in that case you should be good to use the bit bang channel for that. The main limitation of the bit bang channel is that if you use M150 on it, it will ask the movement system to come to a stop, then when it does it will halt the system for up to about 200us while it executes the command, then it will restart movement.

                                  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

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

                                    Thans @dc42 , I will give it a try. I presume I need to add a 5v level shifter for the secondary neopixel output I will use.

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

                                      @zapta said in Adding a second strips of neo pixels?:

                                      Thans @dc42 , I will give it a try. I presume I need to add a 5v level shifter for the secondary neopixel output I will use.

                                      Yes, you will.

                                      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