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

    Long time ago installed LEDS have stopped functioning.

    Scheduled Pinned Locked Moved Solved
    Duet Hardware and wiring
    3
    8
    302
    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.
    • zendesignerundefined
      zendesigner
      last edited by

      HI on ly Kossel metal with Duet wifi i installed long time ago 3 rgb led strips where each color was controlled by m106 commands to light up during different stages of the print.

      This is how the slicer 'simplify3d' sets the commands:
      start
      G28 ; home all axes
      G21 ;set millimeters
      G1 F200 E-3 ;retract filament for probing
      M106 P4 s0 ;turn blue leds off
      M106 P3 s255 ;turn leds red
      G32 ;probe bed
      G1 x0 y0 Z75.0 F2000 ;move the platform down 75mm
      G92 E0 ;zero the extruded length
      G1 F200 E13 ;extrude 10mm of feed stock
      G92 E0 ;zero the extruded length again
      G29 S1 ;load height map
      G4 s5 ;pause 5 secs
      G1 F500 ;start print

      this was on firmware 1.2

      now with recent firmware updates i've lost the functionality of these leds. the flicker whne the board restarts so they are still getting power. Just the board or gcode file seems to have forgotten on how to invoke them.
      current gcode

      ; Fans
      M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency
      M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
      M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
      M106 P1 S0 H-1 ; set fan 1 value. Thermostatic control is turned off
      M950 F2 C"led1" ; create led 1 on pin fan3 and set its frequency
      M106 P2 S0 H-1
      M950 F3 C"!led2"
      M106 P3 S0 H-1
      M950 F4 C"led3"
      M106 P4 S0 H-1

      i don't want to open up the hardware underneath if possible to see the pins as it's all tightly packed.

      SO did anything change in the Gcode or m106 command settings the board pins going from 1.2 to this version?

      Board: Duet 2 WiFi (2WiFi)
      Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.4.5 (2022-11-30)
      Duet WiFi Server Version: 1.27

      cheers
      Zen

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

        Take a look here: https://docs.duet3d.com/en/User_manual/Connecting_hardware/IO_Neopixel_DotStar#configuring-and-controlling-led-strips

        Z-Bot CoreXY Build | Thingiverse Profile

        zendesignerundefined 1 Reply Last reply Reply Quote 0
        • zendesignerundefined
          zendesigner @Phaedrux
          last edited by

          @Phaedrux
          thanks, they are not Neopixels though. just simple strip with 4 wires ground, red, blue, green.

          think i probably have to open it up to see how it is connected to the board. I did it in a time where leds where just able to be controlled by the board, so i think they were just coupled to the fan's pins.

          it always worked through the m106 command. i never used the m150 command so they are probably not on that header connected

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

            @zendesigner they seem to be controlled by the fan PWM, which should still work the way you have set it up. Is it 3 separate strips, one each of red, green and blue? What voltage do they run on? If it’s 5V, you don’t have a lot of current available to run a lot of LEDs, only about 1A. If they’re running from VIN, is it 12V or 24V?

            I’d guess either the LEDs have failed, the fan MOSFETs have failed on the board (though it would be strange for all three to fail), or there’s been a change (with a change in firmware versions) to the default fan PWM frequency such that the LEDs can’t read it anymore. Try specifying the PWM frequency in the M950 commands that define the LEDs, with the Q parameter, if you know what frequency the LEDs work at. The default for fans is 250Hz, which should be the same as in earlier firmwares, though. Otherwise, you’re going to have to open it up and take a look.

            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

            zendesignerundefined 1 Reply Last reply Reply Quote 0
            • zendesignerundefined
              zendesigner @droftarts
              last edited by

              @droftarts

              hi Ian, it's 1 strip in a kossel metal side tower with RGB leds. so 3 strips in paralell with maybe 30 leds in each, they always worked at full brightness so it's probably not a power issue. they also flicker briefly when i reset or start the board so they are getting power still. The hardware connections box has not been opened for years.

              So i assume it's firmware change related. i'll play around with the frequency a bit.

              thanks

              1 Reply Last reply Reply Quote 0
              • zendesignerundefined
                zendesigner
                last edited by

                Ok, so i opened up the electronics case.

                so i'm basically running a DUET 2 wifi with an duex5 expansion board.

                The Led strip are attached to FAN 3,4 and 5 on the expansion board.

                What has gone wrong in my config.g somewhere in the past , or did something on the board fail ?

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

                  @zendesigner said in Long time ago installed LEDS have stopped functioning.:

                  Sorry, I probably should have spotted this earlier! From your config.g:

                  M950 F2 C"led1" ; create led 1 on pin fan3 and set its frequency
                  M106 P2 S0 H-1
                  M950 F3 C"!led2"
                  M106 P3 S0 H-1
                  M950 F4 C"led3"
                  M106 P4 S0 H-1
                  

                  The M950 C parameter defines the pin that the leds are connected to, but 'led1', 'led2 and 'led3' aren't valid pin names (only 'led' is, but only in RRF 3.5 and later, and is a specific pin generally used to drive LED backlights for displays); they should be the fan pin names. It looks like you tried to name the leds at some point, but this is done in the M106 C parameter. So, define the pin you connect the led to in M950 first, then name it using M106. Try:

                  M950 F2 C"duex.fan3" ; create led 1 on pin fan3 and set its frequency
                  M106 P2 C"Green LEDs" S0 H-1
                  M950 F3 C"duex.fan4"
                  M106 P3 C"Red LEDs" S0 H-1
                  M950 F4 C"duex.fan5"
                  M106 P4 C"Blue LEDs" S0 H-1
                  

                  I don't think you need to invert the fan pins (with an ! in the pin name, for example M950 C"!duex.fan3"), but you might.

                  Change the LED colour as before, with, for example

                  M106 P2 S255 ; turn green LEDs on
                  M106 P3 S255 ; turn red LEDs on
                  M106 P4 S0 ; turn blue LEDs off
                  

                  I think I've got the LED colour names right! As before, the LEDs will show up in the fan control.

                  For reference, M950, M106, list of pin names on Duex.

                  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

                  zendesignerundefined 1 Reply Last reply Reply Quote 0
                  • zendesignerundefined
                    zendesigner @droftarts
                    last edited by

                    @droftarts

                    Forever in your debt . that indeed did the trick.

                    My config g must have lost the configuration for the DUEX2 (not5 by the way)

                    I uploaded my config with the repraptool and came to the conclusion it didn't have the duex2 in the file.
                    then saw your post

                    IT's back to all working now with this fan config

                    cheers mate

                    1 Reply Last reply Reply Quote 0
                    • dc42undefined dc42 marked this topic as a question
                    • dc42undefined dc42 has marked this topic as solved
                    • First post
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA