0% found this document useful (0 votes)
80 views

Steps To Setup Marlin Firmware For KE 3DP

This document provides steps to setup the Marlin firmware for a KE 3DP printer, including: 1. Centering the print on the bed by adjusting configuration settings and travel limits. 2. Setting up auto bed leveling using a BL Touch sensor by adjusting firmware settings and probe offset values. 3. Tuning PID settings for the heat bed which is controlled by an SSR through auto tuning commands and updating firmware settings. 4. Configuring settings for the PWC 2.0 board to automatically power off the printer after a print finishes.

Uploaded by

Kunal Bhatt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

Steps To Setup Marlin Firmware For KE 3DP

This document provides steps to setup the Marlin firmware for a KE 3DP printer, including: 1. Centering the print on the bed by adjusting configuration settings and travel limits. 2. Setting up auto bed leveling using a BL Touch sensor by adjusting firmware settings and probe offset values. 3. Tuning PID settings for the heat bed which is controlled by an SSR through auto tuning commands and updating firmware settings. 4. Configuring settings for the PWC 2.0 board to automatically power off the printer after a print finishes.

Uploaded by

Kunal Bhatt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Steps to setup Marlin firmware for KE 3DP

Table of Contents

1 Centering print on Bed ....................................................................................................... 2


2 Setting up Auto bed levelling by BL touch sensor ............................................................ 3
3 PID settings for Heat Bed with SSR .................................................................................. 5
3.1 EEPROM settings: .................................................................................................................. 5
3.2 PID Auto tune: (For Hotend – Nozzle) ................................................................................... 5
3.3 PID Auto tune: (For Heat Bed) ............................................................................................... 6
4 Settings for PWC 2.0 to Auto power off after print finishes ............................................. 8
5 Settings for MKS DET power outage detection ................................................................ 9
6 Converting marlin file (with config.h) to .hex file to upload via programmer ................ 10

KE-VIKAY-555 Page 1 of 10
Steps to setup Marlin firmware for KE 3DP

1 Centering print on Bed

1. Open: configuration.h. Find the line shown below.

2. Input: Input the values of bed size in X & Y directions. (for example 500 in both
directions for sac printer)
3. Define: Define the travel limits in X & Y directions. If hotend nozzle is away from the
bed after homing input positive values. If hotend nozzle is into the bed after homing
input negative values. (It is howmuch nozzle head has to move to reach bed edge. If it is
already into bed after homing it has to move in negative direction and if it is away from
the bed it has to move in positive direction to reach the bed edge.)

KE-VIKAY-555 Page 2 of 10
Steps to setup Marlin firmware for KE 3DP

2 Setting up Auto bed levelling by BL touch sensor

1. Before going to the marlin set up, make sure that it is mounted on specific height. Refer
BL Touch manual for the same.
2. Open: Open configuration.h file.
3. Search: Find the “#define BLTOUCH”. Uncomment it.
4. Change: #define Z_MIN_ENDSTOP_INVERTING to false & #define
Z_MIN_PROBE_ENDSTOP_INVERTING to false.
5. Set Offset values: Set the probe offset values as per actual as shown in figure.

6. Go to: Go to bed leveling section. Uncomment “#define


AUTO_BED_LEVELING_BILINEAR” (As this is the method we are going to use.)
7. Go to: #define GRID_MAX_POINTS_X set it as 3. It is going to set the 3 number of
grid points in X direction & 3 in Y direction. So total of 9 point to measure.
8. Set: Set the boundaries for probing (where the probe can reach).

Uncomment the highlighted lines. Set the values according to your bed size. We can
set #define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE to 30 and #define

KE-VIKAY-555 Page 3 of 10
Steps to setup Marlin firmware for KE 3DP

FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE to also 30 so that it does


not touch the clips which are holding glass to plate.

Note: The below step no 9 is doubtful whether to do it or not.


9. Open: Open Marlin_main.cpp file. Find “Case 28” and add this sentence.
“set_bed_leveling_enabled(true);” as shown in figure. This is important otherwise
leveling data can’t be stored.

KE-VIKAY-555 Page 4 of 10
Steps to setup Marlin firmware for KE 3DP

3 PID settings for Heat Bed with SSR


3.1 EEPROM settings:

1. Go: to configuration.h.
2. Search: #define EEPROM_SETTINGS & #define EEPROM_CHITCHAT >
Uncomment both the commands.
3. Compile & Upload: Upload the marlin firmware to the board.

3.2 PID Auto tune: (For Hotend – Nozzle)

1. Power on: Turn on printer power.


2. Connect: Connect the printer with host software. (Pronterface, Octoprint, Repetier etc)
3. Turn off: Turn off hot end from host software. It should be at room temperature.
4. Issue the command: Give the following command in command line interface.
M303 E0 S220 C10
(M303- Start the auto tune sequence,
E0- Extruder 0,
S220- Temperature target of extruder 0,
C10- No of cycles to tune PID. More the cycles more the accurate PID settings would
be. But 10 is an optimum value.)

Once the command is sent to printer, it will start to auto tune PID coefficients. It may
take some time.
5. Go to: Scroll down to last value of PID coefficients i.e Kp, Ki & Kd.
Put in EEPROM: Before we make the changes in configuration.h, put the new
values of PID coefficients in EEPROM using following command. Send the
commands.
M301 P__ I__ D__
And then
M500 (to store the settings)
6. Update: Update the values of PID coefficients in configuration.h file as marked in
figure below. (Don’t need to upload now but in future when one need to re-flash the
firmware.)

KE-VIKAY-555 Page 5 of 10
Steps to setup Marlin firmware for KE 3DP

7. M501: Send M501 command to review the updated PID settings.


M501- Read parameters from EEPROM
Here we can see different M codes in front of each settings. We can use the M code to
store the settings in EEPROM. For example, M92 can be used to store Steps per mm
for x, y, z & extruder motors. M851 to set Z offset from tip of the probe to tip of the
nozzle in Auto bed levelling.
And then
M500 (to store such settings)
(Note: M502 command is to clear the EEPROM. This will restore the values that
are in configuration.h file. If you want to use it use it followed by M500
command to store the settings).

3.3 PID Auto tune: (For Heat Bed)

There is no need to auto tune the PID coefficients of the bed unless bed is controlled by solid
state relay (SSR) or silicon heaters.
1. Make: Hardware connections of Heat bed and SSR.
2. Go: to configuration.h.
3. Search: #define PIDTEMPBED > Uncomment the command.
4. Upload: Upload the marlin firmware to printer.
5. Pre Heat: Heat up the bed up to 70 deg C. (This is done to keep the bed temp
consistent. Because while using SSR and PID on the bed the aim is to maintain
consistent temp).
6. Issue the command: Give the following command in command line interface.
M303 E-1 S70 C10
(M303- Start the auto tune sequence,
E-1 - Bed,
S70- Temperature target of bed,
C10- No of cycles to tune PID. More the cycles more the accurate PID settings would
be. But 10 is supposed to be an optimum value.)

Once the command is sent to printer, it will start to auto tune PID coefficients. It may
take some time.
8. Go to: Scroll down to last value of PID coefficients i.e Kp, Ki & Kd.
Put in EEPROM: Before we make the changes in configuration.h, put the new
values of PID coefficients in EEPROM using following command. Send the
commands.
M304 P__ I__ D__
And then
M500 (to store the settings)
9. Update: Update the values of PID coefficients in configuration.h file as marked in
figure below. (Don’t need to upload now but in future when one need to re-flash the
firmware.)

KE-VIKAY-555 Page 6 of 10
Steps to setup Marlin firmware for KE 3DP

7. M501: Send M501 command to review the updated PID settings.

KE-VIKAY-555 Page 7 of 10
Steps to setup Marlin firmware for KE 3DP

4 Settings for PWC 2.0 to Auto power off after print finishes
1. Open: configuration.h file. Go to #define POWER_SUPPLY 0. By default it is 0.
Make it 2 as shown in figure below.

2. Go to: configuration.h file. Go to #define MOTHERBOARD. Define motherboard type


as BOARD_RAMPS_14_EEB as shown in figure below.

3. Open: pins__RAMPS.h, define the pin via "#define PS_ON_PIN". By default it is 12.
Make it as 11 as shown in figure.

KE-VIKAY-555 Page 8 of 10
Steps to setup Marlin firmware for KE 3DP

5 Settings for MKS DET power outage detection


Nothing needs to be changed in Marlin firmware.

KE-VIKAY-555 Page 9 of 10
Steps to setup Marlin firmware for KE 3DP

6 Converting marlin file (with config.h) to .hex file to upload via


programmer
1. Make sure: Make sure to have your board set correctly in marlin, or else it'll compile it
for the wrong board and won't work.
2. Go to: Sketch > Export Compiled Binary.
3. Hex file: This will make two hex files in whatever folder you have opened. You need to
use the one having “with_bootloader” in the name if using usb port of the board to
upload. You can use the other hex file which doent have “with_bootloader” in the name
if using dedicated programmer and uploading via 6 pin or 10 pin connector of board.

KE-VIKAY-555 Page 10 of 10

You might also like