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

    Firmware for 4 Zone Bed Heater

    Scheduled Pinned Locked Moved
    Firmware installation
    3
    10
    444
    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.
    • Feynman137undefined
      Feynman137
      last edited by

      I have a bed plate which has 4 silicone bed heaters. Each heater has its own SSR and thermistor, which are connected to a duet3 mainboard 6HC. There is a expansion board connected to the mainboard, but all connections for the bed heater are being made on the mainboard.

      Here are the actual connections:
      Bed heater 0 relay is out9 and thermistor temp0
      Bed heater 1 relay is out6 and thermistor temp1
      Bed heater 2 relay is out5 and thermistor temp2
      Bed heater 3 relay is out4 and thermistor temp3

      Below is the config I have for the heaters. I am not sure if it is correct. I included the whole config.g but the part I am concerned about is in sections labeled bed heater. I am wondering are the thermistors correctly tied to their respective heater, and if so how is this being done? Are there any problems with this code I have never done a 4 zone bed heater.

      ; Configuration file for Duet 3 (firmware version 3)
      ; executed by the firmware on start-up
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Jun 23 2021 23:47:21 GMT-0400 (Eastern Daylight Time)
      
      ; General preferences
      G90                                             ; send absolute coordinates...
      M83                                             ; ...but relative extruder moves
      M550 P"Duet 3"                                  ; set printer name
      M669 K1                                         ; select CoreXY mode
      
      ; Drives
      M569 P0.0 S1                                    ; physical drive 0.0 goes forwards
      M569 P0.1 S1                                    ; physical drive 0.1 goes forwards
      M569 P0.2 S1									; physical drive 0.2 goes forwards
      M569 P0.3 S1									; physical drive 0.3 goes forwards
      M569 P0.4 S1									; physical drive 0.4 goes forwards
      M569 P0.5 S1									; physical drive 0.5 goes forwards                                			
      M569 P1.1 S1                                    ; physical drive 1.1 goes forwards
      M569 P1.2 S1                                    ; physical drive 1.2 goes forwards
      M584 X0.0 Y0.1 Z0.2:0.3:0.4:0.5 E1.1:1.2        ; set drive mapping
      M350 X16 Y16 Z16 E16:16 I1                      ; configure microstepping with interpolation
      M92 X40.00 Y40.00 Z400.00 E420.00:420.00        ; set steps per mm
      M566 X900.00 Y900.00 Z60.00 E120.00:120.00      ; set maximum instantaneous speed changes (mm/min)
      M203 X6000.00 Y6000.00 Z120.00 E1200.00:1200.00 ; set maximum speeds (mm/min)
      M201 X500.00 Y500.00 Z10.00 E250.00:250.00      ; set accelerations (mm/s^2)
      M906 X1500 Y1500 Z1500 E800:800 I30             ; set motor currents (mA) and motor idle factor in per cent
      M84 S30                                         ; Set idle timeout
      
      ; Axis Limits
      M208 X0 Y0 Z0 S1                              ; set axis minima
      M208 X600 Y540 Z496 S0                          ; set axis maxima
      
      ; Endstops
      M574 X1 S1 P"!io4.in"                           ; configure active-low endstop for low end on X via pin !io1.in
      M574 Y1 S1 P"!io5.in"                           ; configure active-low endstop for low end on Y via pin !io5.in
      M574 Z2 S1 P"!io3.in"                           ; configure active-low endstop for low end on Z via pin !io3.in
      
      ; Z-Probe
      M950 S0 C"io7.out"                              ; create servo pin 0 for BLTouch
      M558 P9 C"^io7.in" H7 F120 T6000                ; set Z probe type to bltouch and the dive height + speeds
      G31 P500 X0 Y0 Z1.67                            ; set Z probe trigger value, offset and trigger height
      M557 X10:600 Y10:540 S100                        ; define mesh grid
      
      ; Heaters
      
      M308 S0 P"1.temp0" Y"thermistor" T100000 B4138  ; configure sensor 0 as thermistor on expansion board pin 1.temp0
      M950 H0 C"1.out0" T0                            ; create nozzle heater output on 1.out0 and map it to sensor 0
      M307 H0 B0 S1.00                                ; disable bang-bang mode for heater  and set PWM limit
      M143 H0 S280                                    ; set temperature limit for heater 0 to 280C
      M308 S1 P"1.temp1" Y"thermistor" T100000 B4138  ; configure sensor 2 as thermistor on expansion board pin 1.temp1
      M950 H1 C"1.out1" T1                            ; create nozzle heater output on 1.out2 and map it to sensor 1
      M307 H1 B0 S1.00                                ; disable bang-bang mode for heater  and set PWM limit
      M143 H1 S280                                    ; set temperature limit for heater 1 to 280C
      
      ; bed heater0
      M308 S2 P"0.temp0" Y"thermistor" T100000 B4138    ; configure sensor 2 as thermistor on mainboard pin temp0
      M950 H2 C"0.out9" T2                            ; create bed heater output on 1.out0 and map it to sensor 2
      M307 H2 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
      M143 H2 S120                                     ;set temperature limit for heater 0 to 120C 
      
      ; bed heater1
      M308 S3 P"0.temp1" Y"thermistor" T100000 B4138    ; configure sensor 3 as thermistor on mainboard pin temp1
      M950 H3 C"0.out6" T3                             ; create bed heater output on 1.out0 and map it to sensor 3
      M307 H3 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
      M143 H3 S120                                     ;set temperature limit for heater 0 to 120C
      
      ; bed heater2
      M308 S4 P"0.temp2" Y"thermistor" T100000 B4138    ; configure sensor 4 as thermistor on mainboard pin temp2
      M950 H4 C"0.out5" T4                             ; create bed heater output on 1.out0 and map it to sensor 4
      M307 H4 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
      M143 H4 S120                                     ;set temperature limit for heater 0 to 120C
      
      ; bed heater3
      M308 S5 P"0.temp3" Y"thermistor" T100000 B4138    ; configure sensor 5 as thermistor on mainboard pin temp3
      M950 H5 C"0.out4" T5                             ; create bed heater output on 1.out0 and map it to sensor 5
      M307 H5 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
      M143 H5 S120                                     ;set temperature limit for heater 0 to 120C
      
      M140 H2:H3:H4:H5                                 ; set temperature limit for heater 0 to 120C   
      
      
      ; Fans
      M950 F0 C"1.out7" Q500                          ; create fan 0 on pin 1.out7 and set its frequency
      M106 P0 S0 H-1                                  ; set fan 0 value. Thermostatic control is turned off
      M950 F1 C"1.out8" Q500                          ; create fan 1 on pin 1.out8 and set its frequency
      M106 P1 S1 H-1                                  ; set fan 1 value. Thermostatic control is turned off
      
      ; Tools
      M563 P0 D1.1 H0 F0                                ; define tool 0
      G10 P0 X23.9 Y-28.21 Z0                          ; set tool 0 axis offsets
      G10 P0 R0 S0                                    ; set initial tool 0 active and standby temperatures to 0C
      M563 P1 D1.2 H1 F1                                ; define tool 1
      G10 P1 X-23.9 Y-28.21 Z0                         ; set tool 1 axis offsets
      G10 P1 R0 S0                                    ; set initial tool 0 active and standby temperatures to 0C
      
      ; Custom settings are not defined
      
      ; Miscellaneous
      M575 P1 S1 B57600                               ; enable support for PanelDue
      
      
      fcwiltundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt @Feynman137
        last edited by fcwilt

        @feynman137

        The T parameter in the M950 command is what "connects" the heater to the temp sensor.

        Regards your M140 command - from the M140 docs:

        In RRF3 a M140 command with H parameter (other than H-1) must come after the M950 command that creates that heater, and before any M143 command that sets a temperature limit for that heater.

        Frederick

        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

        Feynman137undefined 1 Reply Last reply Reply Quote 1
        • Phaedruxundefined
          Phaedrux Moderator @Feynman137
          last edited by

          @feynman137 said in Firmware for 4 Zone Bed Heater:

          M140 H2:H3:H4:H5 ; set temperature limit for heater 0 to 120C

          This is not a valid usage.

          https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M140_Set_Bed_Temperature_Fast_or_Configure_Bed_Heater

          You can also send M98 P"config.g" in the gcode console to check for syntax errors.

          ; Tools
          M563 P0 D1.1 H0 F0                                ; define tool 0
          G10 P0 X23.9 Y-28.21 Z0                          ; set tool 0 axis offsets
          G10 P0 R0 S0                                    ; set initial tool 0 active and standby temperatures to 0C
          M563 P1 D1.2 H1 F1                                ; define tool 1
          G10 P1 X-23.9 Y-28.21 Z0                         ; set tool 1 axis offsets
          G10 P1 R0 S0                                    ; set initial tool 0 active and standby temperatures to 0C
          

          The D values are also not correct. They refer to the the extruder drives as they are defined from 0 onward. They do not use the same prefix digit as the board addresses.

          D0 is the first defined extruder, D1 is the next, and so on.

          https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M563_Define_or_remove_a_tool

          If you're going to edit the config.g commands directly, it's best to read the gcode wiki entry for that command first instead of winging it.

          Z-Bot CoreXY Build | Thingiverse Profile

          Feynman137undefined 1 Reply Last reply Reply Quote 1
          • Feynman137undefined
            Feynman137 @fcwilt
            last edited by

            @fcwilt thanks for telling me this. Does it mean that I have to do an M140 command after every bed heater I create, and what would that look like? My would be that I need to create a block of code like below for each heater:

            ; bed heater0
            M308 S2 P"0.temp0" Y"thermistor" T100000 B4138    ; configure sensor 2 as thermistor on mainboard pin temp0
            M950 H2 C"0.out9" T2                            ; create bed heater output on 1.out0 and map it to sensor 2
            M140 H2                                            ;assign heater to bed
            M307 H2 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
            M143 H2 S120                                     ;set temperature limit for heater 0 to 120C 
            
            Phaedruxundefined 1 Reply Last reply Reply Quote 0
            • Phaedruxundefined
              Phaedrux Moderator @Feynman137
              last edited by

              @feynman137 said in Firmware for 4 Zone Bed Heater:

              Does it mean that I have to do an M140 command after every bed heater I create

              Yes.

              Z-Bot CoreXY Build | Thingiverse Profile

              fcwiltundefined 1 Reply Last reply Reply Quote 1
              • Feynman137undefined
                Feynman137 @Phaedrux
                last edited by

                @phaedrux I see I was thinking it was as they were referred to in the M584 command. What makes something the first extrusion drive though? Is it the one with the lower number in the M584.

                To your comment about the wiki, I will do this going forward. Sometimes I have a little difficulty navigating when the example gets so specific.

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

                  @feynman137 said in Firmware for 4 Zone Bed Heater:

                  What makes something the first extrusion drive though? Is it the one with the lower number in the M584.

                  Yes, starting with the lower driver number onward.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  1 Reply Last reply Reply Quote 0
                  • fcwiltundefined
                    fcwilt @Phaedrux
                    last edited by fcwilt

                    @phaedrux said in Firmware for 4 Zone Bed Heater:

                    @feynman137 said in Firmware for 4 Zone Bed Heater:

                    Does it mean that I have to do an M140 command after every bed heater I create

                    Yes.

                    In this case does he need...

                    M140 P0 H0
                    M140 P1 H1
                    etc

                    or is the P value inferred from the position of the M140 command?

                    The docs mention multiple bed heaters but do not provide an example - perhaps that should be added.

                    Frederick

                    Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

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

                      @fcwilt said in Firmware for 4 Zone Bed Heater:

                      In this case does he need...

                      Yes he would since the default is P0 if not specified.

                      Z-Bot CoreXY Build | Thingiverse Profile

                      Feynman137undefined 1 Reply Last reply Reply Quote 2
                      • Feynman137undefined
                        Feynman137 @Phaedrux
                        last edited by

                        @phaedrux @fcwilt Thanks for the M140 P comment I have added this to the code, and made the other described changes it should be up to date.

                        ; Configuration file for Duet 3 (firmware version 3)
                        ; executed by the firmware on start-up
                        ;
                        ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Jun 23 2021 23:47:21 GMT-0400 (Eastern Daylight Time)
                        
                        ; General preferences
                        G90                                             ; send absolute coordinates...
                        M83                                             ; ...but relative extruder moves
                        M550 P"Duet 3"                                  ; set printer name
                        M669 K1                                         ; select CoreXY mode
                        
                        ; Drives
                        M569 P0.0 S1                                    ; physical drive 0.0 goes forwards
                        M569 P0.1 S1                                    ; physical drive 0.1 goes forwards
                        M569 P0.2 S1									; physical drive 0.2 goes forwards
                        M569 P0.3 S1									; physical drive 0.3 goes forwards
                        M569 P0.4 S1									; physical drive 0.4 goes forwards
                        M569 P0.5 S1									; physical drive 0.5 goes forwards                                			
                        M569 P1.1 S1                                    ; physical drive 1.1 goes forwards
                        M569 P1.2 S1                                    ; physical drive 1.2 goes forwards
                        M584 X0.0 Y0.1 Z0.2:0.3:0.4:0.5 E1.1:1.2        ; set drive mapping
                        M350 X16 Y16 Z16 E16:16 I1                      ; configure microstepping with interpolation
                        M92 X40.00 Y40.00 Z400.00 E420.00:420.00        ; set steps per mm
                        M566 X900.00 Y900.00 Z60.00 E120.00:120.00      ; set maximum instantaneous speed changes (mm/min)
                        M203 X6000.00 Y6000.00 Z120.00 E1200.00:1200.00 ; set maximum speeds (mm/min)
                        M201 X500.00 Y500.00 Z10.00 E250.00:250.00      ; set accelerations (mm/s^2)
                        M906 X1500 Y1500 Z1500 E800:800 I30             ; set motor currents (mA) and motor idle factor in per cent
                        M84 S30                                         ; Set idle timeout
                        
                        ; Axis Limits
                        M208 X0 Y0 Z0 S1                              ; set axis minima
                        M208 X600 Y540 Z496 S0                          ; set axis maxima
                        
                        ; Endstops
                        M574 X1 S1 P"!io4.in"                           ; configure active-low endstop for low end on X via pin !io1.in
                        M574 Y1 S1 P"!io5.in"                           ; configure active-low endstop for low end on Y via pin !io5.in
                        M574 Z2 S1 P"!io3.in"                           ; configure active-low endstop for low end on Z via pin !io3.in
                        
                        ; Z-Probe
                        M950 S0 C"io7.out"                              ; create servo pin 0 for BLTouch
                        M558 P9 C"^io7.in" H7 F120 T6000                ; set Z probe type to bltouch and the dive height + speeds
                        G31 P500 X0 Y0 Z1.67                            ; set Z probe trigger value, offset and trigger height
                        M557 X10:600 Y10:540 S100                        ; define mesh grid
                        
                        ; Heaters
                        
                        M308 S0 P"1.temp0" Y"thermistor" T100000 B4138  ; configure sensor 0 as thermistor on expansion board pin 1.temp0
                        M950 H0 C"1.out0" T0                            ; create nozzle heater output on 1.out0 and map it to sensor 0
                        M307 H0 B0 S1.00                                ; disable bang-bang mode for heater  and set PWM limit
                        M143 H0 S280                                    ; set temperature limit for heater 0 to 280C
                        M308 S1 P"1.temp1" Y"thermistor" T100000 B4138  ; configure sensor 2 as thermistor on expansion board pin 1.temp1
                        M950 H1 C"1.out1" T1                            ; create nozzle heater output on 1.out2 and map it to sensor 1
                        M307 H1 B0 S1.00                                ; disable bang-bang mode for heater  and set PWM limit
                        M143 H1 S280                                    ; set temperature limit for heater 1 to 280C
                        
                        ; bed heater0
                        M308 S2 P"0.temp0" Y"thermistor" T100000 B4138    ; configure sensor 2 as thermistor on mainboard pin temp0
                        M950 H2 C"0.out9" T2                            ; create bed heater output on 1.out0 and map it to sensor 2
                        M140 P0 H2                                         ;assign H2 to bed heater0
                        M307 H2 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
                        M143 H2 S120                                     ;set temperature limit for heater 0 to 120C 
                        
                        ; bed heater1
                        M308 S3 P"0.temp1" Y"thermistor" T100000 B4138    ; configure sensor 3 as thermistor on mainboard pin temp1
                        M950 H3 C"0.out6" T3                             ; create bed heater output on 1.out0 and map it to sensor 3
                        M140 P1 H3                                         ;assign H2 to bed heater0
                        M307 H3 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
                        M143 H3 S120                                     ;set temperature limit for heater 0 to 120C
                        
                        ; bed heater2
                        M308 S4 P"0.temp2" Y"thermistor" T100000 B4138    ; configure sensor 4 as thermistor on mainboard pin temp2
                        M950 H4 C"0.out5" T4                             ; create bed heater output on 1.out0 and map it to sensor 4
                        M140 P2 H4                                          ;assign H2 to bed heater0
                        M307 H4 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
                        M143 H4 S120                                     ;set temperature limit for heater 0 to 120C
                        
                        ; bed heater3
                        M308 S5 P"0.temp3" Y"thermistor" T100000 B4138    ; configure sensor 5 as thermistor on mainboard pin temp3
                        M950 H5 C"0.out4" T5                             ; create bed heater output on 1.out0 and map it to sensor 5
                        M140 P3 H5                                      ;assign H2 to bed heater0
                        M307 H5 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
                        M143 H5 S120                                     ;set temperature limit for heater 0 to 120C
                        
                        
                        
                        ; Fans
                        M950 F0 C"1.out7" Q500                          ; create fan 0 on pin 1.out7 and set its frequency
                        M106 P0 S0 H-1                                  ; set fan 0 value. Thermostatic control is turned off
                        M950 F1 C"1.out8" Q500                          ; create fan 1 on pin 1.out8 and set its frequency
                        M106 P1 S1 H-1                                  ; set fan 1 value. Thermostatic control is turned off
                        
                        ; Tools
                        M563 P0 D0 H0 F0                                ; define tool 0
                        G10 P0 X23.9 Y-28.21 Z0                          ; set tool 0 axis offsets
                        G10 P0 R0 S0                                    ; set initial tool 0 active and standby temperatures to 0C
                        M563 P1 D1 H1 F1                                ; define tool 1
                        G10 P1 X-23.9 Y-28.21 Z0                         ; set tool 1 axis offsets
                        G10 P1 R0 S0                                    ; set initial tool 0 active and standby temperatures to 0C
                        
                        ; Custom settings are not defined
                        
                        ; Miscellaneous
                        M575 P1 S1 B57600                               ; enable support for PanelDue
                        
                        
                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA