Variable Fan configuration possible?
-
So to answer your first question:
My config is a bit different than some of the publicly available ones. In my homez.g file you will see a line that says:
G1 Z1.35 ;set this number to the difference between the bed and nozzle height sensor
The larger this number is adjusted the "higher" the nozzle will be. So if you need to slightly lower the nozzle, make this number smaller.
My setup uses the nozzle tip as the Z minimum end stop and the inductive(or in my case klicky) defined as a probe. This makes things clean IMO.
I use the nozzle height sensor for setting my Z zeros. It was way more repeatable than the inductive probe I was running when I first built the machine. The indictive probe is only used to do the gantry leveling.
Here is my full config for reference. Just as an FYI like I said above, mine is quite a bit different than "normal" V2.4 configs as provided by Flug and a few others.
; Configuration file for Duet 3 (firmware version 3) ; executed by the firmware on start-up ; ;Voron 2.4 config 350x350x350mm ;Hardware: Duet3 6HC+3HC+1LC, mosquito hotend, klicky probe, ERCF ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"voron2" ; set printer name M669 K1 ; switch to 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 ;Neopixel RGBW M150 X3 S16 R0 U255 B255 P60 F0 M291 P"Controller Boot Sequence" R"Start" S0 T4 M80 C"pson" ; turn on ATX supply for safety (and trigger button on DWC) ;Turn on toolboard M950 F5 C"0.out1" ;GPIO pin for toolboard power ;M42 P0 S1 ;turn on toolboard power M106 P5 S1 L1 H-1 C"Toolboard power" G4 S3 ; wait for Canbus to stabilize ; --- drive map --- ; _______ ; | 3 | 4 | ; | ----- | ; | 2 | 5 | ; ------- ; front ; Drives M569 P0.0 S0 ; physical drive 0.0 goes forwards (A Stepper) M569 P0.1 S0 ; physical drive 0.1 goes forwards (B Stepper) M569 P0.2 S0 ; physical drive 0.2 goes forwards M569 P0.3 S1 ; physical drive 0.3 goes backwards M569 P0.4 S0 ; physical drive 0.4 goes forwards M569 P0.5 S1 ; physical drive 0.5 goes backwards M569 P20.0 S0 ; physical drive 20.0 goes forwards (E Stepper) G4 P50 M584 X0.1 Y0.0 Z0.2:0.3:0.4:0.5 E20.0 ; set drive mapping M350 X32 Y32 Z16 E16 I1 ; configure microstepping with interpolation M92 X160.00 Y160.00 Z400.0 E406.0 ; set steps per mm (E417.075 old BMG) M906 X1500 Y1500 Z1500 E550 I50 ; set motor currents (mA) and motor idle factor in per cent M84 S120 ; Set idle timeout G4 P50 ; Accelerations and speed M98 P"/macros/print_scripts/speed_normal.g" ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X350.0 Y350.0 Z330.0 S0 ; set axis maxima ; Endstops M574 X2 S1 P"0.io2.in" ; configure active-high endstop for high end on X via pin io2.in M574 Y2 S1 P"0.io1.in" ; configure active-high endstop for high end on Y via pin io1.in M574 Z1 S1 P"0.io3.in" ; ; BLTouch ;M950 S0 C"0.io7.out" ; create servo pin 0 for BLTouch ;M558 P9 C"0.io7.in" H5 A3 S0.005 F120 T9000 ; set Z probe type to bltouch and the dive height + speeds (probe 3 times and average) ;G31 P25 X0.0 Y23.23 z3.5 ; Nozzle Height sensor ;M558 P8 C"^0.io3.in" H5 A1 F120 T9000 K0 ; set Z probe type to unfiltered digital and the dive height + speeds ;G31 K0 P500 Z-4.0 ;NPN NO switch (stock voron sensor) ;M558 P8 C"^0.io5.in" T18000 F600 H5 A3 S0.01 B0 R0.2 K0 ;G31 K0 P25 X0.0 Y25.0 z2.458 ; set Z probe trigger value, offset and trigger height, ;Klicky Probe M558 P8 C"^20.io2.in" T18000 F500:150 H5.0 A1 S0.01 B0 R0.0 K0 G31 K0 P25 X0.0 Y25.0 z8.523 ; Bed leveling M557 X25:325 Y25:325 S50 ; define mesh grid M671 X-70:-70:420:420 Y-10:460:460:-10 S20 ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right) ; Heaters ;bed heater - dual sensor config ;hex stud thermistor: https://www.amazon.com/gp/product/B07Q5MKSLS/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 M308 S0 P"0.temp0" Y"thermistor" T100000 B3950 C0.0 A"Build Plate Temp" ; configure sensor 0 as thermistor on pin temp0 ;Built in Keenovo sensor M308 S1 P"0.temp1" Y"thermistor" T100000 B4725 C7.06e-8 A"Bed Heater Temp" ; configure sensor 0 as thermistor on pin temp1 M950 H0 C"0.out0" T0 Q60 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B0 S1.0 ; disable bang-bang mode for the bed heater and set PWM limit ;M307 H0 R0.450 C420.1 D1.06 S1.00 M307 H0 R0.153 C1735.5 D31.48 S1.00 ; pre 3.4 Beta 7 heater params M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for build plate to 120C M143 H0 T1 P1 S125 A2 ; Monitor heater thermistor, if temp goes above 125C temporarily turn off M143 H0 T1 P2 S132 A3 ; Monitor heater thermistor, if temp goes above 132C cut "atx"(110V) supply ;Extruder T0 heater ;Slice Engineering 50W heater+ E3d PT100 M308 S2 P"20.temp0" Y"PT1000" T100000 B3950 A"T0" ;configure sensor 2 as PT1000 M950 H1 C"20.out0" T2 ; create nozzle heater output on out1 and map it to sensor 2 M307 H1 B0 S1.00 ; disable bang-bang mode for the nozzle heater and set PWM limit ;307 H1 B0 R2.426 C171.9:143.7 D6.21 S1.00 V23.8 ; pre 3.4 Beta 7 params ;3.4beta7 and later params ;M307 H1 R1.924 K0.500:0.006 D8.84 E1.35 S1.00 B0 V23.8 M307 H1 R2.125 K0.495:0.023 D7.24 E1.35 S1.00 B0 V23.8 M143 H1 S300 ; set temperature limit for heater 1 to 300C ;Chamber Monitors ;Thermisors below: https://www.amazon.com/gp/product/B07D9LSKWK/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1 M308 S3 P"1.temp1" Y"thermistor" T100000 B4725 C7.06e-8 A"Chamber Upper Temp" M308 S4 P"0.temp2" Y"thermistor" T100000 B4725 C7.06e-8 A"Chamber Gantry Temp" ; configure sensor 2 as thermistor on pin temp2 M308 S5 P"0.temp3" Y"thermistor" T100000 B4725 C7.06e-8 A"Z Motor4 Temp" ; Epoxied to stepper 4 M308 S10 P"0.spi.cs1" Y"dht22" A"Chamber Lower Temp" ; define DHT22 temperature sensor M308 S11 P"S10.1" Y"dhthumidity" A"Chamber Hum[%]" ; Attach DHT22 humidity sensor to secondary output of temperature sensor ;M308 S12 Y"drivers" A"6HC Steppers" ;mcu calibration M308 S7 Y"mcu-temp" A"MCU" ; configure MCU as sensor 3 M912 P0 S-13.6 ; set CPU temp correction ; Fans/LEDs ;part cooling fan M950 F0 C"20.out2" Q500 ; create fan 0 on pin out1 and set its frequency M106 P0 S0 H-1 L2 C"Part fan" ; set fan 0 value. Thermostatic control is turned off ;main extruder heater cooling fan M950 F1 C"20.out1" Q500 ; create fan 1 on pin 20.out1 and set its frequency M106 P1 S255 H2 T45 C"Extruder fan" ; set fan 1 value. Thermostatic control is turned on ;Electronic cooling fan M950 F2 C"0.out7" Q100 ; create fan 2 on pin out7 and set its frequency ;M106 P2 S.25 H-1 C"MCU fans" M106 P2 L0.25 X1 H7 T25:32 C"MCU fans" ; set fan 2 value. Thermostatic control is turned on ;Main LEDs M950 F3 C"0.out4" Q500 ; create fan 3 on pin out4 and set its frequency M106 P3 S0 H-1 C"Lights" ; set fan 3 value. Thermostatic control is turned off ;Filter fan M950 F4 C"1.out8" Q100 ; create fan 4 on pin out8 and set its frequency M106 P4 S0 H-1 C"Exhaust Fan" ; set fan 4 value. Thermostatic control is turned off ;F5 and P5 are taken earlier in config ;Filter fan M950 F6 C"0.out8" Q100 ; create fan 4 on pin out8 and set its frequency M106 P6 S0 H-1 C"Nevermore Fan" ; set fan 4 value. Thermostatic control is turned off ; Tools M563 P0 S"Tool 0" D0 H1 F0 ; 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 ;M591 D0 P7 C"1.io0.in" S1 E25 L2.1 R70:130 ; create filament monitor for Tool 0 M572 D0 S0.00 ; default pressure advance for Tool 0 M592 D0 A0.0 B0.00 L0.2 ; Nonlinear extrusion Tool 0 ;Accelerometer M955 P20.0 I05 ;Input Shaper ;M593 P"ei3" F45.0 L0.05 ;20.0 improved FFT results across the board ;54.0 is old valueF34.48 ; Cancel ringing ;M593 P"EI3" F50.0 L0.1 ;(old 8.0) M593 P"EI3" F10.6 L0.1 ;Work Offsets: G10L2P1 X0.0Y0.0Z0.0 ;Set G54 offset to be machine coordinates G10L2P7 X230.2Y349.5Z0.0 ;use G59.1 for tool height probing Z zero is top of the setter when not pressed G10L2P8 X100.0Y346.5Z4.0 ;use G59.2 for nozzle cleaning, center of brush, top of brush ; Motor Stall Detect M915 X S10 F1 H200 R1 M915 Y S10 F1 H200 R1 M915 Z S10 F1 H200 R1 ;global variable declare ;global gantryLevel = 0 ;global printstoptime = 0 ;global printcomplete = 0 ;global holdtime = 0 global daemonRun = 1; ;GPIO ;Buttons on the toolboard to retract and extrude M950 C"20.button0" J0 M950 C"20.button1" J1 M581 P0 T2 M581 P1 T3 ;Neopixel RGBW M150 X3 S16 R0 U0 B255 P60 F0 ; Miscellaneous M115 M115 B1 ;Check status of Can-FD exansion board M115 B20 M911 S19 R22 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss M207 S0.4 R0.0 F3600 T3600 Z1.0 ; set default retraction settings G54 T0 ; select first tool ;G31 K0 ;select Bltouch by default M106 P3 S255 ; turn on lights ;M564 H0 S0; Allow movement outside of max/min and allow movment without homing M98 P"ercf/lib/init.g" ;Set up the ERCF T0
-
@alankilian said in Variable Fan configuration possible?:
I'm not familiar with the object model and all that, but I think you could use daemon.g to write a loop checking the temperature and sending an appropriate fan speed control.
Using daemon.g to control the fan is very feasible. I am doing something similar to the material cooling fan to avoid duct deformation from the heat.
if {heat.heaters[1].current > 70 && fans[0].actualValue < 0.25} M106 P0 S0.25 ; Fan too law for a hot heater, set to 25% elif {heat.heaters[1].current < 50} M106 P0 S0.0 ; Fan off
In the same way you can have conditions for a few temperature thresholds and set the fan speed.
-
Thanks a lot for sharing your thoughts and ideas.
Even though I have a "SuperPinda" supposed to be immune to temperature changes, I still noticed that the measuring distance is different in various temperatures (not a lot, but still enough to mess up the first layer).
I adopted your configuration and find it pretty usefull.
So bottom line, my Z1 probe is the nozzle sensor used to determine the distance between nozzle and bed - great strategy as even a nozzle swap automatically adjusts the right height between nozzle and bed. Something to bare in mind for other users, you shall have a waste bin with steel brush to clean the nozzle from debries prior final z-adjustment (after heating the nozzle). If not present, there is the risk, that oozed out filament messes up with the testing (as the nozzle appears "longer" to the printer).
The Z0 probe is the PINDA (inductive sensor), which is only used for gantry leveling and mesh bed compensation. Trigger distances may vary between temperatures, but as only relative values to each other are used as reference, this does not really matter. (aka it does not make a difference if the 4 trigger points are measured at 1.5 or 1.7 mm).
So thanks for your support and insights.
-
Thanks for your input, in this thread I figured out, that my main problem was, that the fans are "not" PWM compatible.
That means fiddeling around with the frequency.Sooner or later, I'll probably switch over to 12V fans. There choice in 24V is pretty limited. Thanks to Duet Hardware, it's pretty easy to run the board with 24V and the fans with 12V (which then can handle PWM).
Then the standard config with M106 should be sufficient.