I seem to be misunderstanding M106 / fan control
-
@SupraGuy I suspect that you may have incorrectly specified fan numbers in your M563 command(s). Please post the whole of your config.g file s that we can check.
-
@dc42 M563? I guess I didn't touch that from the configuration tool, so I think it's defined as having fan 1 (Which is the thermostatic controlled fan that keeps the heat from coming up the throat.)
config.g:
; Configuration file for Duet 3 MB 6HC (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.15 on Tue Feb 21 2023 20:05:02 GMT-0800 (Pacific Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"DMG3D03" ; set printer name M669 K1 ; select CoreXY mode ; Network M552 P0.0.0.0 S1 ; enable network and acquire dynamic address via DHCP M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0.0 S0 ; physical drive 0.0 goes backwards M569 P0.1 S0 ; physical drive 0.1 goes backwards 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 M584 X0.0 Y0.1 Z0.2:0.3:0.4 E0.5 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X100.00 Y100.00 Z100.00 E395.45 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X9000.00 Y9000.00 Z3000.00 E2700.00 ; set maximum speeds (mm/min) M201 X3000.00 Y3000.00 Z1500.00 E3000.00 ; set accelerations (mm/s^2) M906 X1100 Y1100 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S60 ; Set idle timeout ; Axis Limits M208 X-15 Y0 Z0 S1 ; set axis minima M208 X235 Y250 Z243 S0 ; set axis maxima M671 X-35.3:271.3:117.5 Y34.5:34.5:307.8 S5 ; Motor positions: -35.3,34.5; 271.3,34.5; 117.5,307.8 ; Endstops M574 X1 S1 P"^io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin ^io0.in M574 Y1 S1 P"^io1.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ^io1.in M574 Z2 S3 ; configure sensorless endstop for high end on Z ; Z-Probe M950 S0 C"io4.out" ; create servo pin 0 for BLTouch M558 P9 C"io4.in" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X0 Y-36 Z3.24 ; set Z probe trigger value, offset and trigger height M557 X5:205 Y2:202 S50 ; define mesh grid ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M307 H0 R0.155 D15.47 ; set PID parameters for heated bed M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin temp1 M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M307 H1 R1.800 K0.448:0.000 D7.97 E1.35 S1.00 B0 V24.1 M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M950 F0 C"out8" Q500 ; create fan 0 on pin out7 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"out7" Q500 ; create fan 1 on pin out8 and set its frequency M106 P1 S0 H1 T45 ; set fan 1 value. Thermostatic control is turned on M950 F2 C"out4" Q500 ; Pretend that the LED lighting is a fan... M106 P2 S0 H0 T30:75 ; set fan 2 value. Thermostatic control follows the bed ; Tools M563 P0 S"Hemera" D0 H1 F1 ; 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 ; Custom settings are not defined ; Miscellaneous T0 ; select first tool
-
Okay, I'm re-reading the M563 page, and it seems that I should tell it that it's fan 0. I'll change that, and see how it works...
-
Okay... I changed the line:
M563 P0 S"Hemera" D0 H1 F1
So now it reads:
M563 P0 S"Hemera" D0 H1 F0
And... nothing changed. Still can't seem to control the fan, it still comes on full blast when the board powers up.
So... maybe it's the control pin? I changed it to "out9" and moved the fan connector. Yay, it's off... and won't turn on....
-
Can you send these commands manually?
M106 P0 S0 H-1
M106 P0 S1
Does it work?
-
@Phaedrux that would be no.
So if I define fan 0 on out8, the fan comes on. If it's on out9, it is off. If I define it as thermostatic, it comes on at temperature, so pretty sure that it isn't hardware.
; Configuration file for Duet 3 MB 6HC (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.15 on Tue Feb 21 2023 20:05:02 GMT-0800 (Pacific Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"DMG3D03" ; set printer name M669 K1 ; select CoreXY mode ; Network M552 P0.0.0.0 S1 ; enable network and acquire dynamic address via DHCP M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0.0 S0 ; physical drive 0.0 goes backwards M569 P0.1 S0 ; physical drive 0.1 goes backwards 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 M584 X0.0 Y0.1 Z0.2:0.3:0.4 E0.5 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X100.00 Y100.00 Z100.00 E395.45 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X9000.00 Y9000.00 Z3000.00 E2700.00 ; set maximum speeds (mm/min) M201 X3000.00 Y3000.00 Z1500.00 E3000.00 ; set accelerations (mm/s^2) M906 X1100 Y1100 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S60 ; Set idle timeout ; Axis Limits M208 X-15 Y0 Z0 S1 ; set axis minima M208 X235 Y250 Z243 S0 ; set axis maxima M671 X-35.3:271.3:117.5 Y34.5:34.5:307.8 S5 ; Motor positions: -35.3,34.5; 271.3,34.5; 117.5,307.8 ; Endstops M574 X1 S1 P"^io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin ^io0.in M574 Y1 S1 P"^io1.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ^io1.in M574 Z2 S3 ; configure sensorless endstop for high end on Z ; Z-Probe M950 S0 C"io4.out" ; create servo pin 0 for BLTouch M558 P9 C"io4.in" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X0 Y-36 Z3.24 ; set Z probe trigger value, offset and trigger height M557 X5:205 Y2:202 S50 ; define mesh grid ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M307 H0 R0.155 D15.47 ; set PID parameters for heated bed M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin temp1 M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M307 H1 R1.800 K0.448:0.000 D7.97 E1.35 S1.00 B0 V24.1 M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M950 F0 C"out9" Q500 ; create fan 0 on pin out7 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"out7" Q500 ; create fan 1 on pin out8 and set its frequency M106 P1 S0 H1 T45 ; set fan 1 value. Thermostatic control is turned on M950 F2 C"out4" Q500 ; Pretend that the LED lighting is a fan... M106 P2 S0 H0 T30:75 ; set fan 2 value. Thermostatic control follows the bed M950 F3 C"out8" Q500 M106 P3 S0 H1 T45 ; Tools M563 P0 D0 H1 S"Hemera" ; 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 ; Custom settings are not defined ; Miscellaneous T0 ; select first tool
Current state of config.g with fan 0 on out9 and a fan defined on out8 with thermostatic control. I also tried changing the tool to the non zero fan to see if that was it. Grasping at straws... currently the F parameter for M563 is not defined, to let it default to 0.
-
Okay. I give up. I left the printer on and had a shower, when I came back, the part fan was on, and I could turn it off. So... yay?
-
Call an exorcist.
Is the fan failing maybe?
-
Doubtful. It's brand new, but with some of these Chinese parts that might not mean much. The fact that it worked reliably on thermostatic control is what really gets me though.
Hopefully I don't have to change the config file anymore, so if it acts up again, I'll replace the fan.
-
-
-
Okay... This is still making me crazy...
Configuration is still as it was last. I've changed stuff and changed it back, and behaviour is as it was. When I power the printer up, the part fan (Fan 0) comes on, nothing that I can do powers it down, except to redefine it with thermostatic control. Then it will follow the heater, and still not turn on/off. I've been leaving it on, but trying some filaments that are a bit more picky about part cooling, and it isn't going well...
-
@SupraGuy Does the fan voltage jumper match the voltage of the fan itself? Other than that, some fans just don't play nicely with pwm, have you tried a different PWM value? I've found that sometimes a really low value like 10Hz can work.