Temperature controlled 2 wire fans
Is it possible to have a temperature controlled 2 wire (+ and -) 24v HE fan. Off when below set point, on when above?
john.sinclair203 last edited by
Yep possible to control 2 wire fans. Can either just have them set to come on at a certain temperature, or can use PWM control to alter the fan speed based on temperature.
Fans are defined the the config.g file:
M106 P1 T45 H1
would set fan 1 to run any time the temperature of heater 1 is above 45 Celsius.
More info on fan connections here:
And details on the m106 command here:
Just a note on PWM: I found my 2 wire fans were noisy with the default PWM frequency but adding in F20 (set frequency to 20Hz) to slow down the frequency at which they are turned on / off made them near silent.
Hope that helps!
So I would use the M106 command with a duet 3 with V3 firmware? Also these are 24v fans. I should have stated this sooner apologies.
Ok, I've moved the voltage jumper and have 24v to the fans. I just need to figure out the code to turn it off and on.
I just need to figure out the code to turn it off and on.
That's where M106 comes in.
This would be a more appropriate gcode wiki reference for the Duet/RRF
I've looked at the M106 wiki and inserted code into my config G file to turn the fan off and on @ 45c but the fan runs when the reported temperature is 23 C . Can someone look at my config (1).g and see if something is wrong? I'm running 24v fans and have the jumper set to 24v
deckingman last edited by
@luckyflyer Had a quick look at your config.g. The thing that hit me in the face was that there are no heater tuning parameters for heater 1 (the hot end heater). There is an M307 H1 B0 which disables bang-bang mode but no A, C, D or V parameters. Maybe you tuned the heater and used M500 to store the results to config.overide.g? In which case you need to either put M501 in your config.g to read those values in, or you need to cut and paste those M307 values into your config.g. This may or may not be why the fan doesn't work as you'd expect - I haven't though it through due to being short of time right now. HTH
@luckyflyer Here's your current config.g for the
; Heaters M308 S0 p"temp0" Y"thermistor" T100000 B3950 ; 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 M143 H0 S120 ; set temperature limit for heater 0 to 120C M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M308 S1 p"temp1" Y"thermistor" T100000 B3950 ; 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 M143 H1 S280 ; set temperature limit for heater 1 to 280C M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit ; Fans M950 F0 C"out4" Q500 ; create fan 0 on pin out4 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"out5" ; create fan 1 on pin out5 and set its frequency M106 P1 T45 S0.99 H1 ;Set fan 1 to run when the temperature of the hotend is above 45 Celsius ; Tools M563 P0 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
In your tool definition, you've set it to use the F0 fan, which is not thermostatically controlled. Change M563 to
M563 P0 D0 H1 F1.
Droftarts, I did not mention in this post but did in my other post the fact that this duet 3 board is not connected to a printer, I'm waiting for a Sec-kit core xy printer to arrive which has been delayed by coronavirus. I have it connected on my workbench to familiarize myself with the duet 3 and RR firmware environment, which I'm finding is very different from Marlin which is where I'm coming from. My goal is twofold, to familiarize and to have a working or close to working config G when I have the printer built. I have ran the configurator and that is all. I may ask if someone in the Sec-kit community would share their working config.G file with me but since the sek-kit is a new printer with not many in service that may be a long shot. Also I've learned that I gain far more knowledge when I dig in and research and figure out on my own. So I'm one of those guys that because of the differences between Marlin and RR and the differences and newness of the Duet 3 board I will need more help than I would like to admit to. I do believe I'll like Duet/RR once I get past the initial steep learning curve. I'll make the change to M563 and thanks for your help.
I'm waiting for a Sec-kit core xy printer
Nice. I soooo nearly pulled the trigger on getting one of those after watching the Teaching Tech review. But then I decided to build my own. It hasn't got very far!
So I'm one of those guys that because of the differences between Marlin and RR and the differences and newness of the Duet 3 board I will need more help than I would like to admit to.
No problem, that's what the forum is for. And there's so much in the documentation wiki. Of particular use to you, to understand how Duet is different from Marlin, might be: https://duet3d.dozuki.com/Wiki/FirmwareDifferences
Any of the documentation here will be useful to you, to: https://duet3d.dozuki.com/#Section_Quick_Links
The config tool is a good place to start, but depending on your machine configuration, it may not be able to specify everything. So it's good to understand how to edit the config.g and other files. But you can also ask the forum. Just try to include as much useful information in your first post; see here for posting guidelines: https://forum.duet3d.com/topic/5909/guide-for-posting-requests-for-help
And... welcome to Duet!
Fans now working, I had my 2 wire fans connected to the 3/4 wire fan connectors. After connecting to the 2 wire fan connectors and adjusting the config.g code the fans now work as they should.