config_MMU2.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #include <inttypes.h>
  3. #include <avr/pgmspace.h>
  4. // Settings for filament load / unload from the LCD menu.
  5. // This is for Prusa MK3-style extruders. Customize for your hardware.
  6. #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
  7. #define NOZZLE_PARK_XY_FEEDRATE 50
  8. #define NOZZLE_PARK_Z_FEEDRATE 15
  9. // Nominal distance from the extruder gear to the nozzle tip is 87mm
  10. // However, some slipping may occur and we need separate distances for
  11. // LoadToNozzle and ToolChange.
  12. // - +5mm seemed good for LoadToNozzle,
  13. // - but too much (made blobs) for a ToolChange
  14. static constexpr float MMU2_LOAD_TO_NOZZLE_LENGTH = 87.0F + 5.0F;
  15. // As discussed with our PrusaSlicer profile specialist
  16. // - ToolChange shall not try to push filament into the very tip of the nozzle
  17. // to have some space for additional G-code to tune the extruded filament length
  18. // in the profile
  19. // Beware - this value is used to initialize the MMU logic layer - it will be sent to the MMU upon line up (written into its 8bit register 0x0b)
  20. // However - in the G-code we can get a request to set the extra load distance at runtime to something else (M708 A0xb Xsomething).
  21. // The printer intercepts such a call and sets its extra load distance to match the new value as well.
  22. static constexpr uint8_t MMU2_TOOL_CHANGE_LOAD_LENGTH = 5 + 16; // mm
  23. static constexpr float MMU2_EXTRUDER_PTFE_LENGTH = 50.f; // mm
  24. static constexpr float MMU2_EXTRUDER_HEATBREAK_LENGTH = 17.7f; // mm
  25. static constexpr float MMU2_LOAD_TO_NOZZLE_FEED_RATE = 20.0F; // mm/s
  26. static constexpr float MMU2_UNLOAD_TO_FINDA_FEED_RATE = 120.0F; // mm/s
  27. // The first the MMU does is initialise its axis. Meanwhile the E-motor will unload 20mm of filament in approx. 1 second.
  28. static constexpr float MMU2_RETRY_UNLOAD_TO_FINDA_LENGTH = 80.0f; // mm
  29. static constexpr float MMU2_RETRY_UNLOAD_TO_FINDA_FEED_RATE = 80.0f; // mm/s
  30. static constexpr uint8_t MMU2_NO_TOOL = 99;
  31. static constexpr uint32_t MMU_BAUD = 115200;
  32. struct E_Step {
  33. float extrude; ///< extrude distance in mm
  34. float feedRate; ///< feed rate in mm/s
  35. };
  36. static constexpr E_Step ramming_sequence[] PROGMEM = {
  37. { 0.2816F, 1339.0F / 60.F},
  38. { 0.3051F, 1451.0F / 60.F},
  39. { 0.3453F, 1642.0F / 60.F},
  40. { 0.3990F, 1897.0F / 60.F},
  41. { 0.4761F, 2264.0F / 60.F},
  42. { 0.5767F, 2742.0F / 60.F},
  43. { 0.5691F, 3220.0F / 60.F},
  44. { 0.1081F, 3220.0F / 60.F},
  45. { 0.7644F, 3635.0F / 60.F},
  46. { 0.8248F, 3921.0F / 60.F},
  47. { 0.8483F, 4033.0F / 60.F},
  48. { -15.0F, 6000.0F / 60.F},
  49. { -24.5F, 1200.0F / 60.F},
  50. { -7.0F, 600.0F / 60.F},
  51. { -3.5F, 360.0F / 60.F},
  52. { 20.0F, 454.0F / 60.F},
  53. { -20.0F, 303.0F / 60.F},
  54. { -35.0F, 2000.0F / 60.F},
  55. };
  56. static constexpr E_Step load_to_nozzle_sequence[] PROGMEM = {
  57. { 10.0F, 810.0F / 60.F}, // feed rate = 13.5mm/s - Load fast until filament reach end of nozzle
  58. { 25.0F, 198.0F / 60.F}, // feed rate = 3.3mm/s - Load slower once filament is out of the nozzle
  59. };