Variable Fan configuration possible?
-
@timtom said in Variable Fan configuration possible?:
Thanks for your input, saved me some time
I just came accross a different issue, maybe you're able to help me with (already reading and trying to understand. Changing the fan to "manual" mode", I figured that I'm only able to set the fan speed to 100% or 0%.
M950 F3 C"out3" ; create fan 2 on pin out4 and set its frequency
M106 P3 S0 H-1 C"My Fan"Fans are standard 2 wire configurations. Weired is, that the Hotend and Partcooling Fan on out5/6 work just as expected . . .
HW is a Duet 3 Mini 5+
Not sure that I fully understand what you mean by ".....I figured that I'm only able to set the fan speed to 100% or 0%". Do you see the fan in the web interface and does it have a slider control? If so, are you saying that the slider only allows for 0 and 100 % speed and that you are unable to set any intermediate speed, or are you saying that you can set the speed but the fan doesn't react to it properly and either runs at full speed or no speed regardless of the demand setting?
-
Thanks again for coming back to me.
The Fan turns up in the Webfrontend. I can set the value between 0 and 100, the fan only turns on, when I set it to 100. (Any value set below 100 e.g. 70,87 or even 99 leave the fan off). Just when I move the slider to 100, it switches on to full blast.
-
This could mean that your fan doesn’t like to be PWM’d. You can try adjusting the Q value on M950 to find a value that works.
Or it could mean that your fan needs a “blip” to get started. This can be controlled with the B command under M106.
-
-
THAT'S IT!
Stupid fans, got some SUNON 24V, they work more or less reliable with Q10 (making some noise due to the 10 Hz).They don't turn on on low settings, but with setting the start temperature in M106 to 10°C, I got me expected results:
M950 F2 C"out4" Q10 M106 P2 H2:3 L0.15 X1 B0.3 T10:50 C"Electronics Bay" B0.5
The fans turn slowly in normal operation, providing a nice breeze to the electronics compartment and will speed up with raising temperatures.
There is still a notable difference between 99% and 100%, but that should do it for the moment.I added some information on https://duet3d.dozuki.com/Wiki/M950?revisionid=HEAD, maybe that gets accepted and will help others in future.
Thanks a lot for your support. For the future I'll experiment with different fans, as DUET allows different voltages on out ports. I assume lower voltage fans might perform better as the operating voltage is not so wide spread.
-
@timtom
The biggest thing to look for in fans is a note saying "PWM" capable as a spec. Voltage matters less. -
@alex-cr
Thanks for the input, mostly followed Voron BOM and the fans are 24 Volt, the selection on "easily" available ones in certain dimensions seem limited.Even though I might ask dummy questions and keep busy, I'm super thankful for the support, the experience I'm gaining is priceless.
I heavily rely on documentation, and while Duet Documentation is not bad, some more guidance and help on the one or other page would shorten troubleshooting! -
@timtom
I am a big fan of my 2.4.
The Voron community has done a good job of putting a lot of components in demand. -
@timtom Unless fans actually state that they are PWM compatible, it's largely "pot luck" how well they will work. But I haven't yet come across a fan that I can't get to work reasonably well by playing around with PWM frequency (Q value) and the L, X and B parameters.
-
Yes definitivly, I started with a Tevo Tarantula several years ago, got it working so so.
Still remember my first clogged nozzle (due to bad machinery in hotend) and how long I needed to figure this out. . .Then I got one of the first Prusa MK3, also here it tooks some iterations until it got that stable to become my workhose since (printed all ABS parts for my Voron with it, in an enclosure).
Now I'm with Voron, beautiful machine.
With each iteration I learned more and more. As I kid I enjoyed Lego Technic, no comparision, what 3D printers bring to the table
even if it's off this topic, do you have some docu/suggestion/information for Z-Level/print start code? - I'll figure out but would appreciate some hints
-
Sure can! Let me know if you need any explaining. This will need modified to fit your needs but should give you a place to start.
My slicer(Superslicer) start code looks like this:
;voron start code M104 S180 M190 S[first_layer_bed_temperature] G10 P0 S[temperature] R180; M116 ; wait for tool temp G32 ; home and level gantry M207 P0 S0.4 R0.0 F3600 Z1.0; firmware retract defaults M572 D0 S0.05 ;pressure advance for tool 0 M291 P"Cycle Start" S1 T30 M98 P"/macros/print_scripts/nozzle_purge_wipe.g" M98 P"homez.g" ; home Z using the home Z file G1 X175 Y175 Z10 F20000
Homez.g
; homez.g ; called to home the Z axis ; G90 ;G59.1 ;select nozzle height sensor coordinate system ;G31 K0 ; select nozzle hieght sensor M98 P"/macros/print_scripts/speed_homing.g" ; Setup low speed & accel G1 Y335.0 F9000 G1 X230.2 G1 X230.2Y349.5 ; probe location G91 G1 Z-999 F1000 H1 G1 Z5.0 F6000 G1 Z-999 F150 H1 G90 G1 Z1.35 ;set this number to the difference between the bed and nozzle height sensor G92 Z0.0 ;G4 S5 M98 P"/macros/print_scripts/speed_normal.g" ; Setup normal speed & accel G01 Z20.0 F60000 G54 ;return coordinates to normal G4 P250
Homeall.g
; homeall.g ; called to home all axes ; G91 G54; relative positioning M561 ; Clear any bed transform G1 H2 Z10 F2000 M98 P"/macros/print_scripts/speed_homing.g" ; Setup low speed & accel G1 Y-5 H2 F9000 ; Move away from the endstops G1 X600 F2400 H1 ; Coarse home X G1 X-5 F9000 G1 X600 F360 H1 ; Coarse home X G1 X-5 F9000 G1 Y600 H1 F2400 ; Coarse home Y G1 Y-5 F9000 ; Move away from the endstops G1 Y600 F360 H1 ; Fine home Y G1 Y-5 F9000 ; Move away from the endstops G90; M98 P"homez.g" ; home Z using the home Z file M98 P"/macros/print_scripts/speed_normal.g" ; Setup normal speed & accel G1 Z20.0 G1 X100.0Y344.5 ;M98 P"/macros/print_scripts/goto_bucket.g" ; Go to park position G54 ;G29 S1 ; load bed map
And my G32/bed.g looks like this:
; bed.g ; Called to perform automatic bed compensation via G32 ; If the printer hasn't been homed, home it if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed echo "Homeing" G28 else M98 P"/sys/homez.g" ; Home Z G54 ; normal coordinate system M561 ; Clear any bed transform ;G31 K1 ; select height probe M401 ;Deploy Probe G1 X310 Y310 Z15.0 F20000 ; move to an inital location M98 P"/macros/print_scripts/speed_homing.g" ; Setup low speed & accel M290 R0 S0 ; clear babystepping G90; echo "Leveling" M558 H6.0 ;dive height for probing while iterations <=1 ; Do minimum of 2 passes G30 P0 X320 Y300 Z-99999 G30 P1 X320 Y50 Z-99999 G30 P2 X30 Y50 Z-99999 G30 P3 X30 Y300 Z-99999 S4 M558 H3.0 ;lower dive height while move.calibration.initial.deviation >= 0.01 ; perform additional tramming if previous deviation was over 0.01mm if iterations = 5 ; Perform 5 checks M300 S3000 P500 ; Sound alert, required deviation could not be achieved abort "!!! ABORTED !!! Failed to achieve < 0.01 deviation within 5 movements. Current deviation is " ^ move.calibration.initial.deviation ^ "mm." G30 P0 X320 Y300 Z-99999 G30 P1 X320 Y50 Z-99999 G30 P2 X30 Y50 Z-99999 G30 P3 X30 Y300 Z-99999 S4 echo "Gantry deviation of " ^ move.calibration.initial.deviation ^ "mm obtained." ;set global.gantrylevel=1 ; set variable to true G1 Z{sensors.probes[0].diveHeight+10.0}; lift head M402 ;Retract probe M98 P"homez.g" M98 P"/macros/print_scripts/speed_normal.g" ; Setup normal speed & accel G1 Z20.0 M98 P"/macros/print_scripts/goto_bucket.g" ; Go to park position G54 G4 P50 ;G29 S1 ; load bed map
-
-
Thanks a lot for your config, it helped already.
Two more questions.
- How do you adjust Z-height? I followed the guide https://docs.duet3d.com/User_manual/Connecting_hardware/Z_probe_testing and on 0.0 the nozzle is barely touching the bed (paper test). When starting printing the nozzle moves to 0.2 and the extrusion is to high . . .
Seems like I'm missing something in the concept. - How do you handle the two different Z-Sensors (inductive and nozzle tip)? It's still a mystery to me.
Do you prefer inductive or nozzle sensor? Any insights are heavily appeciated!
- How do you adjust Z-height? I followed the guide https://docs.duet3d.com/User_manual/Connecting_hardware/Z_probe_testing and on 0.0 the nozzle is barely touching the bed (paper test). When starting printing the nozzle moves to 0.2 and the extrusion is to high . . .
-
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.