FAN0 starts 100% on + difficult explanations on wiki

Avatar

By dintid 26 January 2017 09:49

Member · 14 comments

So, I've come down to setting up my fans, and I do have them working.

Meaning I have FAN0 for my Tool (I only have one tool), FAN1 for auto temperature heatsink fan on hotend and FAN2 to cool motors inside the case.

FAN0 starts on
FAN0 starts on at full tilt. Is that intentional? I know I can turn it off using M107, but it must be me, missing something?
edit: while posting my code below I stumbled across "S1" in my Fans definition. Does that mean full power? Should I remove it, or what is the purpose of this?

Snnn Fan speed (0 to 255; RepRapFirmware also accepts 0.0 to 1.0))

FAN0 default when defining tool?
IS F0 implicit when defining tool if you do not specify F1 or F2? Just wondering.

My Tool

; Tool definition - Standard E3Dv6
M563 P0 D0 H1 F0 ; Define tool 0 uses extruder drive E0 and heater 1  - Unless specified, it uses FAN0 (F0)(pose this question)

Fan

; Fans
; http://reprap.org/wiki/G-code#M106:_Fan_On
; FAN0 Cool printed objects
; H-1 = Turn Thermostatic control off
M106 P0 S1 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency.

There's an "I0" variable, which means "Invert signal or disable".. what does "invert" actually mean here? is it inverted at I0 and disabled at I1, or is it just written badly? 😁

Innn Invert signal, or disable fan1

How would we ever know what frequency to run our fan on?

Fnnn Set fan PWM frequency, in Hz1

Additioan for RepRapFirmware... Can anyone decode this to human non technical speak? 😁
Problem: lots of references to nowhere and vague description.

If an S parameter is provided but no other parameter is present, then the speeds of the print cooling fans associated with the current tool will be set (see the F parameter in the M563 command).
If no tool is active then the speed of Fan 0 will be set. 
Either way, the speed is remembered so that it can be recalled using the R2 parameter (see below). 
If no S parameter is given but the R1 parameter is used, the fan speed when the print was last paused will be set. If the R2 parameter is used, then the speeds of the print cooling fans associated with the current tool will be set to the remembered value (see above).

Tech Writer
MS Infrastructure Specialist inc. Cisco

Avatar

By dc42 26 January 2017 13:50

Administrator · 2,256 comments

1. Fan0 should start in the off state when you start or reset the Duet. Are you sure you don't have a M106 command in config.g that turns it on?

2. If you don't use the F parameter when defining a tool, the default is F0.

For the rest, is https://duet3d.com/wiki/G-code#M106:_Fan_On any clearer?


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com

Avatar

By dintid 18 March 2017 13:26

Member · 14 comments
dc42 wrote

1. Fan0 should start in the off state when you start or reset the Duet. Are you sure you don't have a M106 command in config.g that turns it on?

2. If you don't use the F parameter when defining a tool, the default is F0.

For the rest, is https://duet3d.com/wiki/G-code#M106:_Fan_On any clearer?

Sad to say, I'm still a bit stuck here.
Just posted a blog-post where I did a new configuration using the online configurator, but the FAN0 is still just on.
https://betrue3d.dk/en/duet-wifi-genera … figurator/

The fan does stop when I issue M107 and I can start it again using M106 S255 command.

Here's the entire config as generated by the configurator. motors works fine 😁

; Configuration file for Duet WiFi (firmware version 1.17)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Fri Mar 17 2017 14:24:02 GMT+0100 (Rom, normaltid)

; General preferences
M111 S0 ; Debugging off
G21 ; Work in millimetres
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves
M555 P1 ; Set firmware compatibility to look like RepRapFirmare
M208 X0 Y0 Z0 S1 ; Set axis minima
M208 X230 Y210 Z200 S0 ; Set axis maxima

; Endstops
M574 X1 Y2 Z2 S1 ; Define active high microswitches
M558 P1 X0 Y0 Z0 H5 F120 T6000 ; Set Z probe type to unmodulated, the axes for which it is used and the probe + travel speeds
G31 P600 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
M557 X15:215 Y15:195 S20 ; Define mesh grid

; Drives
M569 P0 S1 ; Drive 0 goes forwards
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M350 X32 Y32 Z32 E32 I1 ; Configure microstepping with interpolation
M92 X160 Y160 Z800 E2050 ; Set steps per mm
M566 X900 Y900 Z12 E120 ; Set maximum instantaneous speed changes (mm/min)
M203 X12000 Y12000 Z6000 E1200 ; Set maximum speeds (mm/min)
M201 X500 Y500 Z250 E250 ; Set accelerations (mm/s^2)
M906 X800 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout

; Heaters
M143 S320 ; Set maximum heater temperature to 320C
M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning)
M305 P0 T100000 B3988 C0 R4700 ; Set thermistor + ADC parameters for heater 0			; BED
M305 P1 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 1			; Heater 1

; Tools
M563 P1 D H1 ; Define tool 1
G10 P1 X0 Y0 Z0 ; Set tool 1 axis offsets
G10 P1 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C

; Network
M550 PDuetUM2 ; Set machine name
M552 P192.168.1.25 S1 ; Enable network and set IP address
M553 P255.255.255.0 ; Set netmask
M554 P192.168.1.1 ; Set gateway

; Fans
M106 P0 S0.3 I0 F500 H-1 F0 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S0.5 I0 F500 H1 T50 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
M106 P2 S0.5 I0 F500 H0:1 T60 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on

; Custom settings are not configured

; Miscellaneous
T1 ; Select first tool

Tech Writer
MS Infrastructure Specialist inc. Cisco

Avatar

By Jackal 18 March 2017 13:59

Member · 96 comments

Can you show us the first 50 lines of your print file (.gcode)?

edit: your M106 commands in your config.g have the S parameter which will turn the fans on, and your got 2 F parameter in your M106 P0

Last edited by Jackal (18 March 2017 14:07)

Avatar

By deckingman 18 March 2017 14:14

Member · 702 comments

I'd say it's a problem with your fan definition. Take another look at M106 in the Wiki. What you have at the moment is setting the fan speed to 30% (S 0.3) instead of off (S0) and at a PWM frequency of zero (F0). So with that pwm frequency I'd say there is a 50% chance of the fan being permanently on or permanently off.  Try something like M106 P0 S0 I0 F500 H-1.
HTH


Avatar

By dintid 19 March 2017 08:55

Member · 14 comments
Jackal wrote

Can you show us the first 50 lines of your print file (.gcode)?

edit: your M106 commands in your config.g have the S parameter which will turn the fans on, and your got 2 F parameter in your M106 P0

The configuration is 100% straight from the Web Configurator. Ignore the first post. Only my last post with complete config is the current one.
I take it you refer to the M106 under ; Fans?
How should it be otherwise? There is only one F parameters on M106 P0

The code is generated by this setting (30% for FAN0 is default):
cooling_fans_config01.jpg

deckingham wrote

I'd say it's a problem with your fan definition. Take another look at M106 in the Wiki. What you have at the moment is setting the fan speed to 30% (S 0.3) instead of off (S0) and at a PWM frequency of zero (F0). So with that pwm frequency I'd say there is a 50% chance of the fan being permanently on or permanently off.  Try something like M106 P0 S0 I0 F500 H-1.

I have read the entire wiki a couple of times, and I honestly can't find anything usefull for my current situation - doesn't mean the info isn't there, just that I havn't been able to decipher it.
That is the one of the main reasons I'm working on writing posts for us common people 😁

Fan speed at 30%
That denotes the default setting in the Web Configurator.
Default is: S0.3 for FAN0 and S1 for FAN1 and FAN2.
I do not know why the default settings are different for FAN0 and 1-2
The mouse-over says it's "Initial value of this fan when turned on".
It does not say the fan should be at 30% as soon as the controller powers up.. which is how it works now.
PWM frequency.. why would you change that?

I have changed the S0.3 to S0 and it seems to work - I havn't tested it when printing yet.

; Fans
M106 P0 S0 I0 F500 H-1 F0 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off

The mouse-over on the Web Configurator should be changed to reflect this, as FAN0 used as fan to cool objects really should not turn on when the controller is powered on.

Last edited by dintid (19 March 2017 08:57)


Tech Writer
MS Infrastructure Specialist inc. Cisco

Avatar

By Jackal 19 March 2017 09:03

Member · 96 comments

I haven't used the web configurator myself so I can say much about that. The main point would be to leave the S parameter out of your M106 in your config.g since you just want to define it's behaviour.
All I got in my config.g for fan is 'M106 P1 H1 T50 ; Thermostatic mode for fan 1' and I just leave my cooling fan (fan0) on default settings

Avatar

By dc42 19 March 2017 09:27

Administrator · 2,256 comments

I think the configurator help text is confusing you. When a fan is not configured to be thermostatic, the "Value" field will be the fan PWM at startup. So set that to zero for fan 0. Or just edit S0.3 to S0 in the M106 P0 command in config.g.


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com