-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Wrong pin mapping for MKS GEN L V2.1 (EEFB configuration) #25488
Comments
Have you tried the generic motherboard ( MKS_GEN_L )? These MEGA boards are just Ramps 1.4 compatibles. All the MKS Gen L pin mapping files (V1.0, V2.0, V2.1) include...
I could be wrong, but I think the only differences is, V2.0 fixed PCB pin trace routing error for Trinamic Serial control with E1 Motor Driver plug-in module, and V2.1 added 3.3V/5V Motor Driver module options for 3.3V sensor-less homing. How is schematic pin mapping different between V1.0, V2.0, and V2.1 ? |
Hi, borland1. I've already invastigated this issue and I cloud fix it my self. Root of issue: Marlin doesn't support EEFB (Extruder Extruder Fan and Bed) printer configuration for RAMPS compatible boards correclty. MKS GEN L V2.1 is RAMPS compatible PCB with additional MOSFET (classic RAMPS have 3 MOSFETs). EEFB configuration requires MOSFET_D_PIN definiation. So if RAMPS board defines MOSFET_D_PIN it means they could support EEFB. Full list of RAMPS compatible boards with EEFB support (Ctrl+F by MOSFET_D_PIN):
Technical details Here is macros (pins_RAMPS.h:235) which maps MOSFETs pin. #if FET_ORDER_EFB // Hotend, Fan, Bed
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#endif
#elif FET_ORDER_EEF // Hotend, Hotend, Fan
#define HEATER_1_PIN MOSFET_B_PIN
#elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define HEATER_1_PIN MOSFET_B_PIN
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#endif
#elif FET_ORDER_EFF // Hotend, Fan, Fan
#define FAN1_PIN MOSFET_C_PIN
#elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#endif
#if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
#define HEATER_1_PIN MOSFET_D_PIN
#else
#define FAN1_PIN MOSFET_D_PIN
#endif
#endif
#ifndef FAN_PIN
#if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
#define FAN_PIN MOSFET_B_PIN
#elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan
#define FAN_PIN MOSFET_C_PIN
#elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define FAN_PIN 4 // IO pin. Buffer needed
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN_PIN MOSFET_B_PIN
#endif
#endif Unfortunately, this macro was designed for 3 MOSFETS only, that's why Marlin doesn't support EEFB correctly. Suggested resolution. Add additional MOSFET order FET_ORDER_EEFB into pins.h. Currently this macro looks in the folowing way: #if NONE(FET_ORDER_EEF, FET_ORDER_EEB, FET_ORDER_EFF, FET_ORDER_EFB, FET_ORDER_SF)
#if MB(RAMPS_13_EFB, RAMPS_14_EFB, RAMPS_PLUS_EFB, RAMPS_14_RE_ARM_EFB, RAMPS_SMART_EFB, RAMPS_DUO_EFB, RAMPS4DUE_EFB)
#define FET_ORDER_EFB 1
#elif MB(RAMPS_13_EEB, RAMPS_14_EEB, RAMPS_PLUS_EEB, RAMPS_14_RE_ARM_EEB, RAMPS_SMART_EEB, RAMPS_DUO_EEB, RAMPS4DUE_EEB)
#define FET_ORDER_EEB 1
#elif MB(RAMPS_13_EFF, RAMPS_14_EFF, RAMPS_PLUS_EFF, RAMPS_14_RE_ARM_EFF, RAMPS_SMART_EFF, RAMPS_DUO_EFF, RAMPS4DUE_EFF)
#define FET_ORDER_EFF 1
#elif MB(RAMPS_13_EEF, RAMPS_14_EEF, RAMPS_PLUS_EEF, RAMPS_14_RE_ARM_EEF, RAMPS_SMART_EEF, RAMPS_DUO_EEF, RAMPS4DUE_EEF)
#define FET_ORDER_EEF 1
#elif MB(RAMPS_13_SF, RAMPS_14_SF, RAMPS_PLUS_SF, RAMPS_14_RE_ARM_SF, RAMPS_SMART_SF, RAMPS_DUO_SF, RAMPS4DUE_SF)
#define FET_ORDER_SF 1
#elif HAS_MULTI_HOTEND || (HAS_EXTRUDERS && HAS_CUTTER)
#if TEMP_SENSOR_BED
#define FET_ORDER_EEB 1
#else
#define FET_ORDER_EEF 1
#endif
#elif TEMP_SENSOR_BED
#define FET_ORDER_EFB 1
#else
#define FET_ORDER_EFF 1
#endif Using FET_ORDER_EEFB definition we can assign correct pins in pins_RAMPS.h:235. |
Glad you made progress finding a possible solution. Any idea why these 8-bit MCU boards need a special RAMPS EFB configuration setup, which is unlike other newer 32-bit MCU boards? Shouldn't the board's pin file be able to handle this without resorting to implementing the Is it the fact that the MCU Timer, that is suited for PWM control, is used for audio (Tone/Speaker)? For this |
Thx, borland1.
MKS_GEN_L has four MOSFET vs three MOSFET comparing to classic 8-bit RAMPS. First tree MOSFET could by easly mapped using the following definitions: FET_ORDER_EFB, FET_ORDER_EEB & FET_ORDER_EFF. Unfortunately, role of the last MOSFET isn't defined in pin.h file. I suggest to define additional MOSFET order FET_ORDER_EEFB (Extruder Extruder Fan and Bed), see my push request. Using this definition we can easily map fourth MOSFET to appropriate pin in pins_RAMPS.h #elif FET_ORDER_EEFB
#ifndef HEATER_0_PIN
#define HEATER_0_PIN MOSFET_A_PIN
#endif
#ifndef HEATER_1_PIN
#define HEATER_1_PIN MOSFET_D_PIN
#endif
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#endif
#ifndef FAN_PIN
#define FAN_PIN MOSFET_B_PIN
#endif
#elif
Thx, for info. I'll keep it in mind. |
amamchur, I guess I wasn't clear, as you seem to have missed my point. The MKS_GEN_L board file is located in the Marlin "RAMPS" folder. And the "pins_ramps.h" file, that the There are other Mega MCU boards that have board pin files in Marlin's "MEGA" folder. These boards do not use the same I think it might be easier to generate a new board pin file for the "Mega" folder. |
borland1,
Agree. I've canceled my pull requests due to failed tests. My changes broke "Azteeg X3 Pro" configuration.
|
I would search for a pin file in the MEGA folder to use as a template for creating a new pin file. Take a look at file You may need to edit the |
You guys are way over thinking this All you need is the following applied, tested on bugfix 2.1.x diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h
index d508cb453f..1e4e957c43 100644
--- a/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h
+++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h
@@ -35,7 +35,8 @@
// Heaters / Fans
//
// Power outputs EFBF or EFBE
-#define MOSFET_D_PIN 7
+#define MOSFET_B_PIN 7
+#define FAN_PIN 9
//
// CS Pins wired to avoid conflict with the LCD
Results in
|
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. |
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
Default pin mapping for MKS GEN L V2.1 (EEFB, Extruder Extruder Fan and Bed) doesn't match PCB schematic (see U_MOSFET
MOSFET.SchDoc)
Bug Timeline
Unknown
Expected behavior
#define HEATER_0_PIN 10
#define HEATER_1_PIN 7
#define HEATER_BED_PIN 8
#define FAN_PIN 9
Actual behavior
#define HEATER_0_PIN 10
#define HEATER_1_PIN 9
#define HEATER_BED_PIN 8
#define FAN_PIN 4
Steps to Reproduce
No response
Version of Marlin Firmware
bugfix-2.0.x a6cc7a4
Printer model
No response
Electronics
No response
Add-ons
No response
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
Config files here cfg.zip
Main settings:
The text was updated successfully, but these errors were encountered: