Duet3D Logo

    Duet3D

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

    LED on Fan Output

    Duet Hardware and wiring
    3
    9
    558
    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.
    • MacNite
      MacNite last edited by

      Hey guys,

      I have a question regarding LEDs. I want to use two short pieces of white LEDs to Illuminaten the Inside of my printer.
      I habe "calculated" the approximate current draw. The real current draw (tested) is 250ma - so the fan output will work in theory.

      But I can't set it up properly.
      I have wired the 24v strips directly to the fan1 output (I already read I should wire positive directly to the PSU and will do that later).

      I configured the output with this Gcode in Firmware:

      M106 P1 I1 F500 H-1

      The Problem is: the Lights neither turn on nor off. They Are only "glimming".

      Any suggestion in that?

      Greets
      Max

      CorEssentials on GitHub | Instructables Profile | Thingiverse Profile

      DocTrucker dc42 2 Replies Last reply Reply Quote 0
      • DocTrucker
        DocTrucker @MacNite last edited by DocTrucker

        @macnite Try changing from I1 to I0 and add S1.

        Any reason why you inverted the PWM?

        https://duet3d.dozuki.com/Wiki/Gcode#Section_M106_Fan_On

        Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

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

          Try
          M106 P1 I-1 H-1 ; Free up fan output for general IO
          M42 Px S255 ; Turn digital pin x on to 100%.

          But you will need the digital pin number for the fan output to replace x.

          https://duet3d.dozuki.com/Wiki/Gcode#Section_M42_Switch_I_O_pin

          Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

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

            According to:

            https://github.com/T3P3/Duet/blob/master/Duet2/Duet2v1.04/DuetWifiv1.04a_Schematic.pdf

            I think FAN1 is digital pin number 13, which is TIOA4 on the chip.

            The following may still work fine and give you the slider on DWC to control the LED. If the previous post method is preferred you could always just write macros to set the LEDs to specific values.

            M106 P1 I0 F500 H-1 S1

            Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

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

              Thank you for your help!
              I'll definitly test this within the next days and Report.

              CorEssentials on GitHub | Instructables Profile | Thingiverse Profile

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

                @macnite said in LED on Fan Output:

                Hey guys,

                I have a question regarding LEDs. I want to use two short pieces of white LEDs to Illuminaten the Inside of my printer.
                I habe "calculated" the approximate current draw. The real current draw (tested) is 250ma - so the fan output will work in theory.

                Sounds good.

                But I can't set it up properly.
                I have wired the 24v strips directly to the fan1 output (I already read I should wire positive directly to the PSU and will do that later).

                No need to wire positive direct t the PSU, you can just connect the LED strip to the fan output if the voltage needed by the LED strip matches the VFAN voltage.

                I configured the output with this Gcode in Firmware:

                M106 P1 I1 F500 H-1

                The Problem is: the Lights neither turn on nor off. They Are only "glimming".

                You don't need the I1. You will need to send M106 commands with an appropriate S parameter to turn the LED on, off, or on but dim.

                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 1
                • MacNite
                  MacNite last edited by

                  I have tried what you told me, but it did not work. (The I1 was from my bad memory - I actually used I0 already)

                  The LED just stays dim.

                  If configured it like this in firmware:

                  M106 P1 I0 F500 H-1 S1

                  And use the "FAN Slider" to alter the brightness. This does not work. On some percentages it does vary the brighness a little bit, but the LEDS can't be turned of or to full brightness.

                  0_1558548092024_20190520_195925.jpg

                  Any suggestions on mistakes I made?

                  CorEssentials on GitHub | Instructables Profile | Thingiverse Profile

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

                    Does that fan output work correctly if you connect a fan to it?

                    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

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

                      @dc42 That was the problem. I got this machine for testing purposes and the fan output I used was defect for some reason....

                      CorEssentials on GitHub | Instructables Profile | Thingiverse Profile

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