20 KiB
Marlin 2
A chaque fois je prends le master.zip de Marlin + le master.zip de "Marlin configuration" (ils ont fait 2 dépôts séparés). Je copie les exemples de la SKR (car pas d'ender 3 sans la SKR mini ) pour partir d'une version fresh.
Version originale
Fourni avec l'imprimante : Marlin 1.1.6.1
M503 :
Send: M503
Recv: echo: G21 ; (mm)
Recv: echo: M149 C ; Units in Celsius
Recv:
Recv: echo:Filament settings: Disabled
Recv: echo: M200 D1.75
Recv: echo: M200 D0
Recv: echo:Steps per unit:
Recv: echo: M92 X80.00 Y80.00 Z400.00 E93.00
Recv: echo:Maximum feedrates (units/s):
Recv: echo: M203 X500.00 Y500.00 Z5.00 E25.00
Recv: echo:Maximum Acceleration (units/s2):
Recv: echo: M201 X500 Y500 Z100 E5000
Recv: echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
Recv: echo: M204 P500.00 R500.00 T500.00
Recv: echo:Advanced: Q<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk> E<max_e_jerk>
Recv: echo: M205 Q20000 S0.00 T0.00 X10.00 Y10.00 Z0.30 E5.00
Recv: echo:Home offset:
Recv: echo: M206 X0.00 Y0.00 Z0.00
Recv: echo:Material heatup parameters:
Recv: echo: M145 S0 H185 B45 F255
Recv: echo: M145 S1 H240 B0 F255
Recv: echo:PID settings:
Recv: echo: M301 P21.73 I1.54 D76.55
Recv: ok
Modifs
Compilation
Post reddit pour modif Marlin pour SKR
Qui a vraiment plein d'infos
https://www.reddit.com/r/ender3/comments/e894j7/marlin_20x_guide_for_ender_3_using_skr_mini_e3_v12/
Changes to the original Marlin 2.0.5.3 files for Ender 3 with SKR mini E3 v1.2.
^(Use this guide with other marlin versions at your own risk.)
Content:
- Getting started
- Essential changes
- PID autotune
- BLTOUCH
- Measure NOZZLE_TO_PROBE_OFFSET
- BLTouch wiring
- Unified Bed Leveling (UBL)
- Manual Mesh Bed Leveling
- Filament Runout Detection and Filament Change
- Linear Advance
- Junction Deviation
- All in one Retraction testing
- 512k flash memory
- Compiling firmware
- Flashing firmware
- Updating/Reflashing firmware
- Printable Direct Drive mod
- Changelog
Getting started
- Install VSCode and Git according to this Installation guide
- Open Marlin in VSCode as it is in this Comment
- (You can choose the marlin version at the bottom left corner of the window, the default is the latest 2.0.x)
- Modify your Marlin based on this guide
- (Not necessary step) Optionally you can use the marlin example file for this board for easier/faster editing. The example file for this board is in the zip file, under config\examples\BigTreeTech\SKR Mini E3 1.2.
E - Enable | C - Change | E&C - Enable and Change | D - Disable
Enable/Disable by deleting/placing // at the start of a line.
Essential changes
Essential / useful changes to platformio.ini, Configuration.h and Configuration_adv.h files in Marlin/ folder.
platformio.ini:
- C
default_envs =STM32F103RC_btt_512K
Configuration.h:
- E
SHOW_CUSTOM_BOOTSCREEN - E
CUSTOM_STATUS_SCREEN_IMAGE- (Copy
_Bootscreen.h/_Statusscreen.hfile from Marlin\config\examples\Creality\Ender-3\ to Marlin\Marlin folder) - Download it from the Marlin GitHub.
- (Copy
- C
SERIAL_PORT2 - E
SERIAL_PORT_2-1 - C
BAUDRATE115200- (BTT default baudrate)
- C
MOTHERBOARDBOARD_BTT_SKR_MINI_E3_V1_2 - E&C
CUSTOM_MACHINE_NAME"Ender-3" - C
DEFAULT_NOMINAL_FILAMENT_DIA1.75 - C
TEMP_SENSOR_BED1 - C
BED_MAXTEMP125- (By setting it to 70 for a magnetic bed that works up to 70 °C, marlin will only let it heat up to 60, for safety reason)
- E
PIDTEMPBED- (You don't need to enable
PIDTEMPBED, if you are satisfied with your heated bed, but by calibrating the heated bed, it could heat up faster and maintain temperature more accurately) - (Be sure to do a PID autotune for your heated bed after you enabled it in your firmware, otherwise it will trigger Thermal Runaway Protection when heating up the bed. You can find the guide under the PID autotune section, later in this post)
- (You don't need to enable
- C
EXTRUDE_MAXLENGTH200- (Or measure the length from the extruder gear to the nozzle through the PTFE tube)
- C
Z_MIN_PROBE_ENDSTOP_INVERTINGtrue- (BLTouch v3/3.1 can work with either true/false, but v2 needs it to be true)
- E&C
X_DRIVER_TYPETMC2209 - E&C
Y_DRIVER_TYPETMC2209 - E&C
Z_DRIVER_TYPETMC2209 - E&C
E0_DRIVER_TYPETMC2209 - C
DEFAULT_AXIS_STEPS_PER_UNIT{ 80, 80, 400, 93 } - C
DEFAULT_MAX_FEEDRATE{ 500, 500, 20, 60 } - C
DEFAULT_ACCELERATION500 - C
DEFAULT_RETRACT_ACCELERATION500 - C
DEFAULT_TRAVEL_ACCELERATION500 - E
CLASSIC_JERK- (Use Classic Jerk instead of Junction Deviation, as JD is still not working properly, and sometimes can cause bad results when printing curves) (https://github.com/MarlinFirmware/Marlin/issues/17146)
- E&C
TRAVEL_EXTRA_XYJERK5.0 - C
DEFAULT_EJERK15.0 - E
S_CURVE_ACCELERATION- (LIN_ADVANCE and S_CURVE_ACCELERATION may not play well together. Disable f you want to use Linear Advance)
- C
INVERT_X_DIRtrue - C
INVERT_E0_DIRtrue - C
X_BED_SIZE235 - C
Y_BED_SIZE235 - C
Z_MAX_POS250 - E
LEVEL_BED_CORNERS - C
LEVEL_CORNERS_HEIGHT0.1- (Set it to the thickness of the paper/credit card/feeler gauge you want to use)
- C
HOMING_FEEDRATE_XY(50*60) - E
EEPROM_SETTINGS - E
NOZZLE_PARK_FEATURE - C
NOZZLE_PARK_POINT{ (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } - D
DISPLAY_CHARSET_HD44780 - E
SDSUPPORT - E
CR10_STOCKDISPLAY - E
FAN_SOFT_PWM
Configuration_adv.h:
- E
QUICK_HOME - C
SLOWDOWN_DIVISOR8 - E
ADAPTIVE_STEP_SMOOTHING - E
STATUS_MESSAGE_SCROLLING - E
PRINT_PROGRESS_SHOW_DECIMALS - E
SHOW_REMAINING_TIME - E
USE_M73_REMAINING_TIME - E
ROTATE_PROGRESS_DISPLAY - E
SCROLL_LONG_FILENAMES - E&C
SDCARD_CONNECTIONONBOARD - E
STATUS_HEAT_PERCENT - E
LIN_ADVANCE- (LIN_ADVANCE and S_CURVE_ACCELERATION may not play well together. Disable S-Curve Acc. if you want to use LA)
- C
LIN_ADVANCE_K0.00- (You can find guide links to calibrate your K value under the Linear Advance section, later in this post)
- C
BLOCK_BUFFER_SIZE32 - C
BLOCK_BUFFER_SIZE32 - C
BUFSIZE32 - C
TX_BUFFER_SIZE32 - C
X_CURRENT580 - C
Y_CURRENT580 - C
Z_CURRENT580 - C
E0_CURRENT650 - C
CHOPPER_TIMINGCHOPPER_DEFAULT_24V - E
MONITOR_DRIVER_STATUS - D
HYBRID_THRESHOLD - E
CANCEL_OBJECTS
PID autotune
(You don't need to enable PIDTEMPBED if you are satisfied with your heated bed, but by calibrating the heated bed, it can heat up faster and can maintain temperature more accurately)
- Connect the printer to the PC (USB, Octoprint, etc.)
- Use any software that can send gcode commands to a printer (Octoprint, Pronterface, Repetier, Simplify3D, etc.)
- Connect to the printer in the software if not done automatically (COM4, 115200)
- By sending an
M301/M304to the printer you will the PID values for the HOTEND / HEATED BED, take a note of those values - To start an autotune, you will need to send an
M303C< count >E< index >S< temp >Uto the printer.- For the hotend I used
M303 C25 E0 S205 U(Hotend:E0)- (Turn on the part cooling fan for the hotend PID autotuning)
- ( C5 should be enough, but C25 doesn't take too long either, S < temp > should be the 5-10 more than the printing temperature you usually use)
- For the heated bed I used
M303 C25 E-1 S60 U(Heated bed:E-1)- ( C5 should be enough, but if I did 25 for the hotend might as well do it to the bed too, S < temp > should be the bed temperature you usually use) (If after the
M303... you get "PID Autotune failed! Temperature too high", send anM304 P0.00 I0.00 D0.00to the printer, then redo the PID autotune)
- ( C5 should be enough, but if I did 25 for the hotend might as well do it to the bed too, S < temp > should be the bed temperature you usually use) (If after the
- For the hotend I used
- Wait for the operation to complete (when it's done the heating cycle will stop and the temperature will drop)
- Take a not of the new P, I, D values that the software displays
- Send an
M500to the printer to save the the new PID values to the EEPROM - To make sure that all the values are saved, send an
M301/M304to the printer to display the current PID values - If the current PID values doesn't match the new values, then you need to set the PID values manually:
- Hotend: Send an
M301P< value >I< value >D< value > to the printer - Heated bed: Send an
M304P< value >I< value >D< value > to the printer - Send an
M500to the printer to save the the new PID values to the EEPROM - In Configuration.h update the PID values for future firmware updates (
DEFAULT_Kp, ...Ki, ...Kd,DEFAULT_bedKp, ...bedKi, ...bedKd)
​
- The 3D Print General PID Autotuning
BLTOUCH
Configuration.h:
- E
BLTOUCH - C
NOZZLE_TO_PROBE_OFFSET{ -44.5, -10, -1.00 }- (Edit these values according to your setup, help is in the Measure NOZZLE_TO_PROBE_OFFSET section)
- C
MIN_PROBE_EDGE10- (If you have clips holding the bed, increase it to your clip size +5)
- C
XY_PROBE_SPEED6000- (With 6000 the BLTouch works more reliably)
- E
Z_MIN_PROBE_REPEATABILITY_TEST - E
AUTO_BED_LEVELING_BILINEAR- (or use
AUTO_BED_LEVELING_UBL/MESH_BED_LEVELING, guide links later in this post)
- (or use
- E
RESTORE_LEVELING_AFTER_G28 - E
Z_SAFE_HOMING
Configuration_adv.h:
- E
BLTOUCH_DELAY500- (If you are experiencing failed probing, then increasing it could help)
- D
BLTOUCH_SET_5V_MODE - E
BABYSTEPPING - C
BABYSTEP_MULTIPLICATOR_Z4- (1 will raise the Z-axis by 1 microstep (0.0025), 4 will raise the Z-axis by 0.01)
- E
DOUBLECLICK_FOR_Z_BABYSTEPPING- (Double-click on the Status Screen to edit Z Babystepping during prints)
- E
BABYSTEP_ZPROBE_OFFSET - E
BABYSTEP_ZPROBE_GFX_OVERLAY
Measure NOZZLE_TO_PROBE_OFFSET
- Take rough measurements from the probe pin to the nozzle in X and Y directions
- (The tip of the probe pin should be 2.3-4.3mm higher than the nozzle)
- Change the
NOZZLE_TO_PROBE_OFFSETvalues according to your measurements - Compile - flash - boot ...
- Home the printer
- Take a note of the X and Y coordinates (you can do that in the printer move axis menu)
- Move the Z axis down until the nozzle touches or almost touches the print bed
- Mark that point where the nozzle touches the bed (make sure that your mark won't move on the bed)
- Move the X and Y axis in the printer menu until the probe pin is spot on to your mark
- Take a note of the X and Y coordinates
- Subtract the X/Y coordinates from the original X/Y coordinates to get the
NOZZLE_TO_PROBE_OFFSET
BLTouch wiring
- Teaching Tech Guide for SKR mini E3 v1.2 + BLTouch
- Chris Riley BLtouch Bed Leveling Sensor
- Wiring diagram from GitHub
- SERVOS
- Brown or Blue - GND
- Red - +5V
- Yellow - PA1
- Z-STOP
- Black - GND
- White - PC2
- SERVOS
Unified Bed Leveling (UBL)
- Marlin UBL guide
- Chris Riley UBL video guide
Manual Mesh Bed Leveling
Configuration.h
- E
PROBE_MANUALLY - C
NOZZLE_TO_PROBE_OFFSET{ 0, 0, 0 } - E
MESH_BED_LEVELING - E
RESTORE_LEVELING_AFTER_G28 - C
GRID_MAX_POINTS_X5 (Or change it accordingly to your needs) - E
LCD_BED_LEVELING
Leveling:
Heat up your bed to the temperature you usually print on (e.g. 60°C) (Make sure that there are no plastic on the nozzle, that would alter the nozzles distance to the bed)
- Select: Prepare - Bed Leveling - Level Bed
- Wait for Homing XYZ to complete
- When Click to Begin appears, press the controller button to move to the first point
- Use the controller wheel to adjust Z so that a piece of paper can just pass under the nozzle
- Press the controller button to save the Z value and move to the next point
- Repeat steps 4-5 until completed
- Select: Configuration - Store settings to save the mesh to the EEPROM
- Select: Motion - Fade height: Set it to 10
- Select: Motion - Store settings
- Make a test print, and as it prints you can change the nozzle distance to the bed in Motion - Bed Z with the controller wheel
- Select: Configuration - Store settings
​
- Marlin Bed Leveling (Manual)
- Teaching Tech Manual Mesh Bed Levelling
- Crosslink Ender 3 Mesh Bed Leveling
Filament Runout Detection and Filament Change
pins_BTT_SKR_MINI_E3.h (Found it in Marlin\Marlin\src\pins\stm32f1)
- D
Z_MIN_PROBE_PIN
Switch with 2 pin connector:
- C
FIL_RUNOUT_PINPC14 // "PROBE"
Configuration.h
- E
FILAMENT_RUNOUT_SENSOR - E&C
FILAMENT_RUNOUT_DISTANCE_MM5
(Filament Runout detection and M600 - Filament Change part)
- C
EXTRUDE_MAXLENGTH100- (Length from the extruder gear to the nozzle + 10)
- E
NOZZLE_PARK_FEATURE - C
NOZZLE_PARK_Z_FEEDRATE3
Configuration_adv.h
- E
ADVANCED_PAUSE_FEATURE - C
PAUSE_PARK_RETRACT_FEEDRATE30- (Change it to your retraction speed)
- C
PAUSE_PARK_RETRACT_LENGTH6- (Change it to your retraction length)
- C
FILAMENT_CHANGE_UNLOAD_LENGTH100- (Length from the extruder gear to the nozzle OR set it to 0 for manual filament extraction)
- (This needs to be less than or equal to
EXTRUDE_MAXLENGTH)
- C
FILAMENT_CHANGE_FAST_LOAD_LENGTH0- (Length from the extruder gear to the nozzle OR set it to 0 for manual filament insertion)
- (This needs to be less than or equal to
EXTRUDE_MAXLENGTH)
- C
FILAMENT_CHANGE_ALERT_BEEPS10- (10 might be too much/annoying, if so, lower it to your liking)
- E
PARK_HEAD_ON_PAUSE - E
HOME_BEFORE_FILAMENT_CHANGE - E
FILAMENT_LOAD_UNLOAD_GCODES- (Adds
M701/M702Load/Unload G-code, and Load/Unload in the LCD Prepare menu.)
- (Adds
Connect your Runout switch with 2 pin connector to the "PROBE" (PC14) and with 3 pin connector to the "PT-DET" connector on either side of the "SERVOS" (BLTouch) connector. (I use the Z-endstop switch with 2 pin connector for runout sensor)
Teaching Tech
Chris Riley
Linear Advance
- Linear Advance K-factor Calibration
- Teaching Tech Linear advance video guide
- Chris Riley Linear advance video guide
Junction Deviation
All in one Retraction testing
- KARL JOHNSON How to Easily Calibrate Retraction in 3D Printers
512k flash memory
- Alex Kenis
Compiling firmware
Use VSCode with the PlatformIO extension and Git GUI.
- Chris Riley
- VSCode installation guide for Marlin 2.0.
You can find the firmware file in Marlin/.pio/build/STM32F103RC_btt_512K/firmware.bin
Flashing firmware
Place the firmware.bin file onto your SD card, them insert it into your printer and turn it on. After a short 20-30 sec blank screen your printer should be ready.
If after ~50-60 sec there is still a blank screen, don't worry, just turn off your printer. A long blank screen could mean that the firmware you just tried is bad in some way. You should recheck your configurations, then try reflashing it. Comment.
Updating/Reflashing firmware
(Comment) You don't need to redo all the changes every time you want to update to a newer version of marlin, just copy your edited files to the new marlin and compare them in VSC Source Control (Ctrl+Shift+G), and copy anything that is new or changed.
Not all changes will be applied on a firmware update. For that you will need to reset your printer settings by Restore Defaults (M502) in menu - Configuration, then Save Settings (M500). It will reset your settings back to your edited firmware values.
Printable Direct Drive mod
Printable Direct Drive extruder mount for Ender 3, Ender 5, CR-10 etc.
Changelog:
^(Changes older than 1 month are deleted.)
- 04.22.
- Added Linear Advance and S-Curve Acceleration conflict cautionary.
- 04.26.
- pins_BTT_SKR_MINI_E3.h location changed form ...\stm32 to ...\stm32f1
- If you get EEPROM error on startup, go in the printer to the Configuration, press Restore Defaults then Store Settings
- 05.13.
- Removed
#define
- Removed
- 05.14.
- Disabled Hybrid Threshold and settings related to it, to the way it will be in 2.0.6
- Added
DEFAULT_EJERK,HOME_BEFORE_FILAMENT_CHANGE
- 05.19.
- Removed the
PT-DEToption for filament runout sensor, as it cannot be used for filament runout sensor.
- Removed the