Welcome! Log In Create A New Profile

Advanced

Auto fan start when extruder temp >50C - disables M106 !!

Posted by softfoot 
Auto fan start when extruder temp >50C - disables M106 !!
December 01, 2020 05:58AM
I am running 2.0.5 bugfix and want the part cooling fan to come on when the extruder temp is >50.

So, in configuration_adv I have defined the following :-

#define FAN_KICKSTART_TIME 500

and

#undef FAN_PIN
#define FAN_PIN -1
#define E0_AUTO_FAN_PIN 7
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
#define E5_AUTO_FAN_PIN -1
#define E6_AUTO_FAN_PIN -1
#define E7_AUTO_FAN_PIN -1
#define CHAMBER_AUTO_FAN_PIN -1

#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 25 // 255 == full speed
#define CHAMBER_AUTO_FAN_TEMPERATURE 30
#define CHAMBER_AUTO_FAN_SPEED 255

My fan is on pin 7 and I found that I had to #undef FAN_PIN and redefine it as -1 or I got a compile error saying that I couldnt set both!

The fan tries to start when the extruder temp >50 but the "kickstart" does nothing (the fan stalls) and when I try to start the fan or adjust the speed manually via repetierHost (or a terminal) I get the error "Unknown Command M106" and for M107.

I assume that any attempt to control the speed by the slicer will fail too.

Interestingly, with only FAN_KICKSTART_TIME defined it does behave as expected and jumps to 100% for half a second, then drops back to 10% when started by the M106 command.

What am I missing ??

Regards,
Dave

Edited 2 time(s). Last edit at 12/01/2020 06:18AM by softfoot.
Re: Auto fan start when extruder temp >50C - disables M106 !!
December 01, 2020 06:22AM
An auto fan is just that a automatically activated fan, controlled by the controller with the settings provided. ie hotend temp is > 50c
It is meant for extruder cooling


It is not a gcode controllable fan. such as a part cooling fan.

If you have no user controllable fans, g-codes for turning fans on or off is removed as it is not needed.

Edited 1 time(s). Last edit at 12/01/2020 06:24AM by Dust.
Re: Auto fan start when extruder temp >50C - disables M106 !!
December 01, 2020 07:19AM
My printer is a "Geeetech i3 Pro C" with a "GT2560_RevA+" controller board and both the controller fan and the fan that cools the extruder/extruder stepper are wired between 12v and ground and are NOT controllable at all and are permenantly on.

PIN7 is connected to the PWM fan that I am using to cool the "part" (work piece).

So, how do I control the "part" fan in the way I need ??

Regards,
Dave

Edited 1 time(s). Last edit at 12/01/2020 07:20AM by softfoot.
Re: Auto fan start when extruder temp >50C - disables M106 !!
December 01, 2020 04:19PM
#define E0_AUTO_FAN_PIN -1
#define FAN_PIN 7

Edited 2 time(s). Last edit at 12/01/2020 04:20PM by Dust.
Re: Auto fan start when extruder temp >50C - disables M106 !!
December 03, 2020 06:45AM
That achieves nothing except re-enabling M106/7.

What I need is for E0_AUTO_FAN_PIN to work on PIN 7 with it under GCode control as well.

*OR*

that the fan to be constantly ON at say 10% when the extruder is not in use and under GCode control when the extruder is in use.

I dont mind which.

Dave
Re: Auto fan start when extruder temp >50C - disables M106 !!
December 07, 2020 03:28PM
Quote
Dust
#define E0_AUTO_FAN_PIN -1
#define FAN_PIN 7

i am trying to enable the fan to simply turn on when extruder goes above 50 degrees. What should be simple likely is, but only if you know the answer already. The little bit of description says to use #define E0_AUTO_FAN_PIN to set a custom pin number, or use -1 to disable. How do I enable it to use the pin number as defined in the pins.h file for my motherboard? In other words, I have fan connected to the FAN1 connection on my motherboard that is using P2_04 pin. It does nothing by default. I am using a MKS SGEN_L V2.0 mainboard that has 2 fan power ports. I can control fan speed on FAN1 via the fan control in S3D software, but don't see how to use FAN2. Both are PWM controls.
Re: Auto fan start when extruder temp >50C - disables M106 !!
December 07, 2020 05:17PM
@doug_scott

you need

#define E0_AUTO_FAN_PIN FAN1_PIN
Re: Auto fan start when extruder temp >50C - disables M106 !!
December 08, 2020 04:45AM
Thanks, FAN1_PIN didn't work, but using FAN2_PIN and connecting the fan to FAN2 port did work. In the pins_MKS_SGEN_L_V2.h file it shows this:

#if HOTENDS == 1
#ifndef FAN1_PIN
#define FAN1_PIN P2_06
#endif
#else
#ifndef HEATER_1_PIN
#define HEATER_1_PIN P2_06
#endif
#endif
#ifndef FAN_PIN
#define FAN_PIN P2_04
#endif
#ifndef FAN2_PIN
#define FAN2_PIN P1_04
#endif

I am not a programmer but, FAN1_PIN is set to use P2_06 and that is already the connection for the second hotend heater. I tried using FAN_PIN since it is using PIN P2_04 but compiling failed with

#error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."

It does however allow me to use FAN2_PIN that is physically marked as being P1_04 in the pins jpg image for the motherboard. Don't really know why, unless it is because FAN_PIN is controllable by GCODE commands created by slicer. Simplify3D does not appear to have support for more than one fan, so I have connected the fan that is cooling the hotend to FAN2_PIN (comes on automatically when hotend is +50 degrees) and then connected the 2 fans that blow on the bed to FAN_PIN to be controlled by slicer settings.
Re: Auto fan start when extruder temp >50C - disables M106 !!
December 18, 2020 03:42PM
I thought this was working the other day, but apparently not. I have it set up to run fan2 when extruder temp hits 50. When I test it by running the extruder alone (not a print job) it just sails past 50 and never runs the fan. I must have missed something in the configuration_adv.h file. Its the only location I can find any fan settings in. Here is what I have (minus the notes),


//#define USE_CONTROLLER_FAN
#define FAN_KICKSTART_TIME 1000

#define FAN_MIN_PWM 60
#define FAN_MAX_PWM 128

#define E0_AUTO_FAN_PIN FAN2_PIN
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
#define E5_AUTO_FAN_PIN -1
#define E6_AUTO_FAN_PIN -1
#define E7_AUTO_FAN_PIN -1
#define CHAMBER_AUTO_FAN_PIN -1

#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 128 // 255 == full speed
#define CHAMBER_AUTO_FAN_TEMPERATURE 30
#define CHAMBER_AUTO_FAN_SPEED 255

On printer startup the fans run for a short period of time, then stop. If I enable define USE_CONTROLLER_FAN it ignores the extruder temp. In my logic, the stepper motors are not going to making the drivers heat up or the mainboard to generate heat that would require the case cooling fan to run, but if the extruder heater is on it must have a fan running. Since running the extruder heater without actually printing is more like to happen, and having the printer move the hotend around when printing also requires the hotend to be well, hot, I think the extruder should control the fan.
Sorry, only registered users may post in this forum.

Click here to login