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

    Duet 2 Wifi use exp.heater7 for fan (LED strip)

    Scheduled Pinned Locked Moved
    General Discussion
    4
    11
    715
    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.
    • orbajosbrotherundefined
      orbajosbrother
      last edited by

      I've been running my Duet 2 Wifi on RRF 2.x for a while. I had an LED strip connected directly to the FAN2 header, which worked fine. Fan speed directly equated to brightness, it was glorious. This past weekend my E0_TEMP sensor started reading about 30C too high. I moved it to E1_TEMP and it read a good temp but long story short I ended up upgrading to RRF 3.0 for the extra flexibility. Now that I am on RRF 3.0 I figured I could finally use my FAN2 header for an actual fan (board cooler) and move the LED strip to the heater 7 pin on the expansion pins. I have the board cooler working with thermostatic control driven by the MCU and driver temps as explained in the wiki. I cannot make the LED strip work at all, using heater7 as a fan or heater 7 as an M42 controlled pin. I'm currently trying it as a fan. Here's the relevant parts of my config:

      M950 H7 C"nil"						; disable heater 7 to make LED strip fan output
      M950 F3 C"exp.heater7"				; make fan3 on heater 7 (LED strip)
      ...
      M106 P3 C"LEDs" S64 H-1				; Fan 3 (defined above) is LEDs, 64 is the fan speed (brightness). no thermostatic control
      

      I've tried playing with PWM frequency with no success. I don't know what I am doing when it comes to that. I have found that measuring with a multimeter, my heater7 pin is outputting 0.7v when the "fan" is off with M106 P3 S0 and about 3.1v when fully on with M106 P3 S255. I would have expected 24v, this is a 24v LED strip and the Duet is powered by a 24v PSU.

      Am I missing something? Thanks!!

      PaulHewundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • PaulHewundefined
        PaulHew @orbajosbrother
        last edited by PaulHew

        @orbajosbrother This is my working config for LEDs, I have a Duex so you will need to tweak.
        EDIT: On RRF3-RC11

        ;Lighting in Config.g
        M950 F8 C"duex.fan8"
        M106 P8 S0 H-1 C"Front Lights"
        M950 F7 C"duex.fan7"
        M106 P7 S0 H-1 C"Red RGB"
        M950 F6 C"duex.fan6"
        M106 P6 S0 H-1 C"Blue RGB"
        M950 F5 C"duex.fan5"
        M106 P5 S0 H-1 C"Green RGB"
        

        Control

        M106 P6 S1.0;Blue On
        M106 P6 S0.0;Blue Off
        

        HTH Paul.

        RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
        Voron 2.4 disassembled..... Waiting for the RailCore Mini....

        1 Reply Last reply Reply Quote 0
        • orbajosbrotherundefined
          orbajosbrother
          last edited by orbajosbrother

          Thanks for the reply. I took out the M950 H7 C"nil"line as you did not have to do that on the duex. I'm not sure if that is necessary or not for plugging stuff into the expansion header directly. I'm thinking it isn't, but it is part of the bltouch config for heater3, which works. I also noticed that your speed parameter is from 0.0 to 1.0 instead of 0 - 255. The documentation states that either 0.0 - 1.0 or 0 - 255 will work. I tried this decimal approach as well but unfortunately my LED strip remains off. Are you able to measure the voltage on your led strip pin when it's at full "speed"? mine is 3.2v after M106 P3 S1.0. I'm thinking I have it connected properly (it's just 2 wires) since the voltage does change when I turn the "fan" on or off, just not nearly enough.

          EDIT: as a quick sanity check I plugged my LED Strip into one of my "always on" fan outputs, and it lights up immediately. On this fan output, it's 23.9V when measured. Painfully bright though, as expected. I like to run it at 25% :).

          1 Reply Last reply Reply Quote 0
          • PaulHewundefined
            PaulHew
            last edited by PaulHew

            @orbajosbrother Please post the config you are currently using for the LEDs on Fan ports in your config.g and the commands you are issuing to turn them on / off. I am curious and would like to help you fix it!

            I used 0.0 and 1.0 as that is enough and did not see the need to use 0 - 255, so 25% would be 0.2 /0.3, or 64.

            Regards
            Paul

            RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
            Voron 2.4 disassembled..... Waiting for the RailCore Mini....

            1 Reply Last reply Reply Quote 0
            • PaulHewundefined
              PaulHew
              last edited by

              @orbajosbrother Please post the result of M115.

              Do you have a Duex connected? If not which pins are you trying to use for your LEDs, a picture would be nice please.

              If you are not running a Duex, if I understand correctly, the fan pins are not presented on the connector, you will have to use the heater outputs, which is where I think you are connected to, hence asking for a M115 and a picture of where you are plugged into.

              Regards,
              Paul.

              RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
              Voron 2.4 disassembled..... Waiting for the RailCore Mini....

              1 Reply Last reply Reply Quote 0
              • orbajosbrotherundefined
                orbajosbrother
                last edited by orbajosbrother

                No Duex. Plugging into expansion pins directly.

                M115 output:

                FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.0 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2020-01-03b3
                

                entire config.g:

                ; Configuration file for Duet WiFi (firmware version 1.21)
                ; executed by the firmware on start-up
                ;
                ; generated by RepRapFirmware Configuration Tool v2 on Wed Mar 20 2019 11:55:35 GMT-0600 (Mountain Daylight Time)
                
                ; General preferences
                G90                                                                   ; Send absolute coordinates...
                M83                                                                   ; ...but relative extruder moves
                
                ; define pins 
                M950 H3 C"nil"						; disable heater 3 for bltouch
                M950 S0 C"exp.heater3"                         		; create servo pin 0 for BLTouch, using old heater3 pin
                M950 H0 C"BED_HEAT" T0					; heater 0 uses BED_HEAT pin
                M950 H1 C"E1_HEAT" T1 					; heater 1 uses E1_HEAT 
                M950 F2 C"FAN2" Q100					; create fan2 on fan2 pin (board cooler)
                ;M950 H7 C"nil"						; disable heater 7 to make LED strip fan output
                M950 F3 C"exp.heater7"					; make fan3 on heater 7 (LED strip)
                
                ; Network
                M550 P"Mean Green"                                                    ; Set machine name
                M551 P"reprap"                                                        ; Set password
                M552 S1                                                               ; Enable network
                
                M586 P0 S1                                                            ; Enable HTTP
                M586 P1 S0                                                            ; Disable FTP
                M586 P2 S0                                                            ; Disable Telnet
                
                ; Drives
                M569 P0 S0; was 1 before redup                       		; X Drive 0 goes backwards
                M569 P1 S0                                                            		; Y Drive 1 goes backwards
                M569 P2 S1                                                            		; Z Drive 2 goes forwards
                M569 P3 S1                                                            		; E Drive 3 goes forwards
                M350 X16 Y16 Z16 E16 I1                                               	; x16 microstepping with interpolation
                M92 X80.00 Y80.00 Z400.00 E837                                     ; Steps per mm
                M566 X800.00 Y800.00 Z48.00 E3600.00                      	; Set maximum instantaneous speed changes (mm/min)
                M203 X12000.00 Y12000.00 Z1200.00 E12000.00       	; Set maximum speeds (mm/min)
                M201 X800.00 Y800.00 Z800.00 E800.00                        	; Set accelerations (mm/s^2)
                M906 X1100.00 Y1100.00 Z275.00 E1050.00 I30          	; Set motor currents (mA) and motor idle factor in percent
                M84 S30                                                               			; Set idle timeout
                
                ; Axis Limits
                M208 X0 Y0 Z0 S1                                                      		; Set axis minimal
                M208 X215 Y215 Z205 S0                                               	; Set axis maximal
                
                ; Endstops
                M574 X1 S1 P"!xstop"   ; x at low end, use endstop switch
                M574 Z1 S2	; z at low end, use z probe
                M574 Y1 S1 P"!ystop"	; y at low end, use endstop switch                                                  
                
                ; Z-Probe - BLTouch
                M558 P9 C"^zprobe.in" H4 F120 T120000                   ; Set Z probe type to bltouch and the dive height + speeds                                       
                M557 X10:200 Y5:210 S20:20				; Define mesh grid
                G31 P500 X-16 Y-42 Z3.515				; offsets for reduplicator aero bltouch mount
                
                ; define temperature sensors
                M308 S0 A"Bed" P"BED_TEMP" Y"thermistor" T100000 B4092 R4700
                M308 S1 A"HotEnd" P"E1_TEMP" Y"thermistor" T100000 B4725 C7.060000e-8 R4700
                
                ; temperature sensors drivers and MCU
                M308 S2 Y"drivers" A"DRIVERS"  ; configure sensor 2 as temperature warning and overheat flags on the TMC2660 on Duet
                M308 S3 Y"mcu-temp" A"MCU" ; configure sensor 3 as MCU temp
                
                ; max temps 
                M143 H0 S120                                                                                     
                M143 H1 S286   
                
                ; Fans
                M106 P0 C"Part Cooler" S0 I0 F500 H-1                          ; Set fan 0 (part cooler)value, PWM signal inversion and frequency. Thermostatic control is turned off
                M106 P1 C"Cold End" S255 I0 F500 H1 T60                        ; Set fan 1 (heatsink fan) value, PWM signal inversion and frequency. Thermostatic control is turned on
                
                ; board cooler fan
                M106 P2 C"Board Cooler" H2:3 L0.75 X1 B0.3 T35:70 	; board cooler - thermostatic control for drivers and MCU temp
                
                
                ; LED strip on heater 7 (technically a fan)
                M106 P3 S0.25 H-1 C"LEDs"
                
                
                ; Tools
                ;M563 P0 S"Broken" D0 H1                                                  ; Define tool 0
                ;G10 P0 X0 Y0 Z0                                                       ; Set tool 0 axis offsets
                ;G10 P0 R0 S0                                                          ; Set initial tool 0 active and standby temperatures to 0C
                
                M563 P"E1_HEAT" S"E3D" D0 H1                                                  ; Define tool 1
                G10 P0 X0 Y0 Z0                                                       ; Set tool 1 axis offsets
                G10 P0 R0 S0                                                          ; Set initial tool 1 active and standby temperatures to 0C
                
                ; Automatic saving after power loss is not enabled
                
                ; Custom settings are not configured
                
                ; set up bed screw positions & pitch
                M671 X4:4:212:212 Y2:213:213:2 P0.5
                
                
                ; default pressure advance - disable
                M572 D0 S0
                
                ; jerk & accel
                M566 X720.00 Y720.00 Z200 E1600.00 ; jerk
                M201 X2500.00 Y2500.00 Z400.00 E400.00 ; accel
                
                ; MCU temp
                M912 P0 S-3.8
                -
                ;config-override
                M501
                

                Using M106 P3 S0.25 for 25%, but M106 P3 S1.0 does nothing either.

                IMG_20200506_140225.jpg

                Edit: photo

                1 Reply Last reply Reply Quote 0
                • PaulHewundefined
                  PaulHew
                  last edited by

                  I have done some testing this morning, made up a lead to connect to Heater7 on my duex, (3pin PWM), which is what I think is passed from the Duet2 board, so if I understand correctly this is only a PWM signal, as I was getting 5v also.

                  I also connected to the heater7, 2pin output on my Duex5 and get 24v, which is expected.

                  My Conclusion, heater output on Duet2 board connector are IOs or can be used for PWM.
                  The Duex because it has its own power input from a PSU can output V_IN on the dedicated heater port

                  So in answer to your question now that I understand myself, I do not think you will be able to run your LEDs from the expansion connector.

                  HTH

                  Paul.

                  RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
                  Voron 2.4 disassembled..... Waiting for the RailCore Mini....

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

                    @orbajosbrother said in Duet 2 Wifi use exp.heater7 for fan (LED strip):

                    Now that I am on RRF 3.0 I figured I could finally use my FAN2 header for an actual fan (board cooler) and move the LED strip to the heater 7 pin on the expansion pins.

                    The pins on the expansion header provide low-current outputs with 3.3v signal level. You cannot drive an LED strip directly from these pins.

                    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
                    • orbajosbrotherundefined
                      orbajosbrother
                      last edited by

                      Thanks @PaulHew @dc42! Makes sense now. It should be possible to use an actual heater though? Can I use M950 to do this?

                      M950 F3 C"E1_HEAT" ; make fan 3 on e1 heat
                      

                      On RRF 2 I don't think this would have been possible, and I would have had to had a temperature sensor linked to it, then probably make it a tool. RRF 3 is flexible enough to just take a heater output and make it a fan, right? I would still need to ground the LED strip on the expansion port.

                      Are these assumptions correct? I don't want to break anything! Thanks!

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

                        @orbajosbrother said in Duet 2 Wifi use exp.heater7 for fan (LED strip):

                        Thanks @PaulHew @dc42! Makes sense now. It should be possible to use an actual heater though? Can I use M950 to do this?

                        M950 F3 C"E1_HEAT" ; make fan 3 on e1 heat
                        

                        On RRF 2 I don't think this would have been possible, and I would have had to had a temperature sensor linked to it, then probably make it a tool. RRF 3 is flexible enough to just take a heater output and make it a fan, right? I would still need to ground the LED strip on the expansion port.

                        Are these assumptions correct? I don't want to break anything! Thanks!

                        I think that should work. In RRF2 you'd have to use M307 A-1 C-1 D-1 to unbind the heater port to open it for use with other things.

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

                        Z-Bot CoreXY Build | Thingiverse Profile

                        1 Reply Last reply Reply Quote 0
                        • orbajosbrotherundefined
                          orbajosbrother
                          last edited by orbajosbrother

                          Just wanted to let you guys know that I did put my LED strip into my unused heater output. I found that I had to use the E0 VIN and E0- pins on the board. I defined the "fan" using M950 F3 C"E0_HEAT" and I can now control it with M106 P3 Sx where is 0.0 - 1.0. I like mine at 25% so I have M106 P3 S0.25 in my config.g.

                          Thanks for the help!

                          Photos:
                          IMG_20200507_153704.jpg

                          and just because I really love how my printer looks, here it is in all its well-lit glory!
                          IMG_20200507_154220.jpg
                          (I broke my bltouch pin seating my nozzle... The BLShield will be the first thing I print when the new pin arrives)

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