MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.33k stars 19.25k forks source link

Cooling FAN not started with extruder heating #5940

Closed walterX12 closed 7 years ago

walterX12 commented 7 years ago

I have RAMPS 1.4 and I have only 1 fan. The fan is for cooling down the "cool part" of extruder (not the printed parts). This fan is in D9 pins in RAMPS.

I can start and stop the fan using Repetier GUI or M106 or M107.

I have found that when I start heating the extruder (using Marlin-RCMarlin 1.1.0-RC8 or Marlin-RCBugFix ) the fan does not start at all (at no extruder temperature).

I have tried:

  1. define E0_AUTO_FAN_PIN -1 - it ends up with described behaviour

  2. define E0_AUTO_FAN_PIN 9 - it ends up with error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."

Marlin.zip

It seems that there were many changes related to FAN PINS in the past few months. I assume that cooling down extruder is not something that needs to be started from GCode, right ? Is it a bug or do I have some settings wrong.

KevMags commented 7 years ago

D9 is for the part cooling fan. Wire your extruder fan straight to 12V or use a fan extender to automatically turn it on and off.

walterX12 commented 7 years ago

D9 is supposed to be 12 V (http://reprap.org/wiki/File:Arduinomega1-4connectors.png). Do I understad correct that D9 will be used for fan to cool down the printed part ?

I assume that 100% users have fan for cooling down HE , but not all users have fan for cooling down printed model.

It would make sense to have "out of the box" solution for HE cooling rather then for printed parts cooling.

I assume that many users were used to have fan on D9 and it worked previously fine (according to my colleague, because I moved from Repetier to Marlin recently).

Bob-the-Kuhn commented 7 years ago

@KevMags is correct - FAN_PIN is now just a fan that you can manually control.

I could have sworn that at one time it defaulted to the E0 extruder fan.

@walterX12 - to use D9 to cool the extruder you'll need to do two things:

walterX12 commented 7 years ago

Hi Bob-the-Kuhn and KevMags,

thank you, both for helping to solve the issue. Now the fan is started when HE is above 50 degrees without the Fan extender.

If anyone is trying to solve the same issue I am attaching my configuration changes.

I am wondering whether I am the only one who will need to do similar changes or there are many users having the same HW and being surprised that they need to buy fan extender until they will figure out that new line of code (rather than commenting / uncommenting lines) needs to be written.

It makes much more sense to edit only Configuration.h and Configuration_adv.h than to edit "low-level config file" pinsXXXX.h

This is my suggestion, but I am grateful for your help to solve my issue.

Have a nice weekend.

Marlin_changes.zip

PicoPi commented 7 years ago

Thanks. I was having the same issue as above. Now fixed thanks to you.

vMeph commented 7 years ago

it works but then you cant work this section

#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
  #define CONTROLLER_FAN_PIN 4 // Set a custom pin for the controller fan
  #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled
  #define CONTROLLERFAN_SPEED 255        // 255 == full speed
#endif
Ladvien commented 6 years ago

@Bob-the-Kuhn hey man, that's what I needed. One note, it looks like they've moved where the FAN_PIN is declared, so I thought I'd just add what I put in to make it work

#if ENABLED(IS_RAMPS_EFB)                      // Hotend, Fan, Bed
  #define FAN_PIN        RAMPS_D9_PIN
  #define HEATER_BED_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EEF)                    // Hotend, Hotend, Fan
  #define HEATER_1_PIN   RAMPS_D9_PIN
  #define FAN_PIN        RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EEB)                    // Hotend, Hotend, Bed
  #define HEATER_1_PIN   RAMPS_D9_PIN
  #define HEATER_BED_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EFF)                    // Hotend, Fan, Fan
  #define FAN_PIN        RAMPS_D9_PIN
  #define FAN1_PIN       RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_SF)                     // Spindle, Fan
  #define FAN_PIN        RAMPS_D8_PIN
#else                                          // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
  #define FAN_PIN        RAMPS_D9_PIN
  #define HEATER_BED_PIN RAMPS_D8_PIN
  #if HOTENDS == 1
    #define FAN1_PIN     MOSFET_D_PIN
  #else
    #define HEATER_1_PIN MOSFET_D_PIN
  #endif
#endif
#undef FAN_PIN 
Bob-the-Kuhn commented 6 years ago

We'd only move things around if you weren't looking. 😉

Glad to hear that you're up & running.

opodecano commented 6 years ago

thanks, worked for me...

Configuration_adv.h add #define E0_AUTO_FAN_PIN 9 (as you had tried earlier) and.. pins_RAMPS.h add #undef FAN_PIN (line 239)

Mangosniper commented 6 years ago

If anyone has the same problem with a RAMPS 1.3 and Marlin 1.1.9, I just moved my extruder fan to PIN 44 and the print object fan to PIN 9. Then I set in the advanced config:

#define E0_AUTO_FAN_PIN 44

I did this as

#undef FAN_PIN

in the pins_RAMPS.h disabled me to send M106 or M107

This is my pinout: https://drucktipps3d.de/wp-content/uploads/asgarosforum/195/anycubic_i3_mega_trigorilla_board.jpg

thinkyhead commented 6 years ago

We have two options for Trigorilla — 1.3 and 1.4. The 1.4 version already has E0_AUTO_FAN_PIN set to 44.

sidhant commented 5 years ago

I agree with @walterX12 about the default being able to correctly control the extruder/hot-end fan as that is basic functionality. Control of the part cooling fan is a perk. I ran into the exact same issue where my board has one connector labeled FAN and is a D9 pin. Not changing anything in the config, Marlin fails to kick the fan on when the hot-end even gets to ~190C. Turning on the E0_AUTO_FAN_PIN results in compile error complaining that it cannot be the FAN_PIN.

I disagree that the solution is to connect extruder fan to 12V rails and have it be on at all times. The default handling of fan control is counterintuitive in Marlin.

Using bugfix-1.1.x

Richie800 commented 5 years ago

in 1.1.9, can you change:

define RAMPS_D9_PIN 9

define RAMPS_D9_PIN -1 // Change made

to fix the problem? Now you can use D9 however you choose.

itaycohen73 commented 4 years ago

Hello, I was trying all suggestions here and no matter which one I choose, I get that same error message "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN" These are the changes I was trying :

  1. Set RAPS_D9_PIN to -1
  2. Set #undef FAN_PIN
  3. Commented all #define FAN_PIN lines

Any suggestion why I'm still getting the error ?

Richie800 commented 4 years ago

Set: Config.h.adv

define E0_AUTO_FAN_PIN PD12

Commet out in pin.h //#define FAN_PIN PD12 // Fan0

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.