M106 does not work for Ender-4. Fan is not controllable.
You added two new lines to the pins_RAMPS_ENDER_4.h
file:
#define ENDER4_FAN_PIN RAMPS_D9_PIN
#undef FAN_PIN
These lines were not present in the earlier versions
just comment new lines (last two lines) in the pins_RAMPS_ENDER_4.h
file.
If CASE_LIGHT_PIN ENDER4_FAN_PIN
is activated, the PINs conflict.
Both used RAMPS_D9_PIN
I have been maintaining hex FW for Ender-4 (4 different HW configurations) for couple of Creality Ender-4 user groups at Facebook (audience of almost 1.4K people) and have never seen anybody using case light... However, the FAN1 is the must...
So, at least, you may check up if A case light is activated, then switch on these lines...
Shell these lines be moved to config_adv.h to
#if ENABLED(CASE_LIGHT_ENABLE)
section?
BTW, Ender-4 user guide said it explicitly: connect LED to FAN1 connector and set fan speed to 255 for full brightness. So, no firmware change is required for connecting LED instead of fan! Moreover, the manufacturer recommend to use M106 to manage the LED.
If it is not broken, do not fix it :-)
If M106
is enabled as a parts fan, a case light can still be used and controlled from G-code.
If M106
is disabled in favor of a dedicated case light (which would be better served running from LSU on its own switch) suddenly none of our current G-code works for the parts fan.
The Ender4 comes stock with M106
used to enable case light / pwm fan and this is what its users are familiar with and set up for. Changing it is not only not stock but screws up our G-code whether it is used to turn on the case light while printing and off when done or to control an add-on parts fan (standard Creality parts fan works).
I am a member of same group and this _caused quite an upset_, keeping many E4 users from upgrading Marlin. Thankfully Serigy heard our cries and fixed it for us.
TL;DR if it ain't broke don't fix it. M106
works great for case light or parts fan. Changing it breaks our G-code and requires separate files to share between printers.
@ShaggyDog18 problem solved?
nope, it was not.
I am still commenting new lines (mentioned above) in the RAMPS_ENDER_4.h file to make it work...
M355
is the command to enable or disable the case light. Is that what Ender 4 users are also using? The case light may be connected to any free 12V fan or heater output, or use a 5V pin to a relay or MOSFET that passes 12V to the case light.
M106
is the command to set the print cooling fan speed. If a light and fan happen to be on the same circuit, the light will come on with the fan.
We do check to make sure the case light (if enabled) doesn't share the FAN_PIN
:
/**
* Test case light not using the same pin as the fan
*/
#if ENABLED(CASE_LIGHT_ENABLE) && CASE_LIGHT_PIN == FAN_PIN
#error "You cannot set CASE_LIGHT_PIN equal to FAN_PIN."
#endif
This is what I would propose in pins_ENDER_4.h
…
. . .
#include "pins_RAMPS.h"
// The board only has one PWM fan connector. The others are 12V always-on.
// The default config uses this pin to control the brightness of the LED
// band (case light). Thus the hotend and controller fans are always-on.
#if ENABLED(CASE_LIGHT_ENABLE)
#undef FAN_PIN
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN RAMPS_D9_PIN
#endif
#endif
Good solution! Thank you!
@ShaggyDog18 so problem fixed? or does it still need some work?
I guess you may remove line 301 in config_adv.h - it is not necessary now..
301: //#define CASE_LIGHT_PIN ENDER4_FAN_PIN // Override the default pin if needed
Though I have not tested it yet, theoretically, should work fine. Yes, you may close the case. Thank you.
Override the default pin if needed
so if it works without removing // then everything should be ok
only you can close by clicking close button below
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.
Most helpful comment
If
M106
is enabled as a parts fan, a case light can still be used and controlled from G-code.If
M106
is disabled in favor of a dedicated case light (which would be better served running from LSU on its own switch) suddenly none of our current G-code works for the parts fan.The Ender4 comes stock with
M106
used to enable case light / pwm fan and this is what its users are familiar with and set up for. Changing it is not only not stock but screws up our G-code whether it is used to turn on the case light while printing and off when done or to control an add-on parts fan (standard Creality parts fan works).I am a member of same group and this _caused quite an upset_, keeping many E4 users from upgrading Marlin. Thankfully Serigy heard our cries and fixed it for us.
TL;DR if it ain't broke don't fix it.
M106
works great for case light or parts fan. Changing it breaks our G-code and requires separate files to share between printers.