SKR V1.3 Marlin 2 Setup


Setting up the SKR V1.3 with Marlin 2 can initially be a daunting task. However, to make life a little easier for those new to the SKR V1.3 we have created the SKR V1.3 Marlin 2 Setup guide to aid in the specifics to help get you on the right tracks.

Let’s Begin

Without a doubt it all has to begin somewhere, and in this instance it’s with the software. So download the software listed below, make yourself a drink and let’s begin.

Software

Microsoft Visual Studio for running PlatformIO – https://code.visualstudio.com Available for PC, Mac and Linux.

PlatformIO is installed within Microsoft Visual Studio (MVS) so no need to download it.

Within MVS click on the icon that looks like building blocks. You will then see a search bar. Inside the search bar type in PlatformIO. A list will be shown, simply click on PlatformIO IDE and to the right information will be displayed. Click on install and let it doe its thing. You may need to close and restart MVS after the installation has taken place.

Latest Non-Bugfix release of Marlin 2 Firmware – https://github.com/MarlinFirmware/Marlin

Once you have downloaded Marlin 2 put in a good place on your computer that is easy to find. My Documents is usually a good bet.

From within MVS click on the Ants head to the left hand side. If you have just loaded MVS and it is not showing, give it a little while as it’s likely to be still loading.

Once loaded you will see the Welcome to PlatformIO screen. Now towards the right is an Open Project option. Click on Open Project.

Now find the folder you stored the latest Marlin 2 into, and you will see the button turn blue on the bottom saying Open Marlin 2. Click on Open Marlin 2

To find your files within MVS you use the explore icon that looks like paper files.

At this point, we are assuming you have PlatformIO installed within Microsoft Visual Studio (MVS). Please note, that if you are using ATOM it no longer supports Marlin firmware, so you will need to start using MVS or an supported alternative.

Let’s Get Started

Like most configuration setups, installing the SKR V1.3 with Marlin 2 is not a particular hard task, it just can get somewhat mundane and repetitive. However follow the guides step by step and you will be fine.

The SKR V1.3 Installing Marlin 2 guide is a guide to help get you going with the specifics needed for the SKR V1.3 3D printer mainboard. Furthermore it is not intended as a full guide on Marlin 2, however one is in the works.

platformio.ini

Load the platformio.ini by clicking on the platformio.ini file displayed in the explore section.

Before anything else, the printer board or chipset as it can be referred needs to be defined. This is a single line that needs changing within the platformio.ini file. Furthermore the chipset used to define the SKR V1.3 is the LPC1768. The line should be easy to spot, and is normally around line 24. Now change the line starting with env_default, so that it looks like below.

env_default = LPC1768

Well that was quick and painless. Now the real fun starts with SKR V1.3 Marlin 2 setup guide. Next is the Configuration.h file.

Configuration.h

@section machine

*Quick Tip – To quickly search for a key word you can use the search feature. It will show up towards the top right of Visual Studio. Simply enter the word you wish to search for and hit either the enter or return key.

Mac – Press the CMD (⌘) and the F key at the same time.
PC – Press the Ctrl and the F key at the same time.

Search for the term //#define SERIAL_PORT_2.

To enable an option within Marlin simply remove the forward slashes //

Now define serial port 2 to -1 exactly as shown below.

#define SERIAL_PORT_2 -1

Whilst completely possible to set data transfer speeds higher between the SKR V1.3 and a computer. However for reliability whilst configuring Marlin 2, it is advisable to set the baudrate rate to 115200.

#define BAUDRATE 115200

Now at this point in setting up the firmware for the SKR V1.3, it has no idea as to what physical board the printer will be using. Consequentially we need to tell Marlin what it is.

Moreover we need to define the motherboard, todo this we need to change the board specified in #define MOTHERBOARD.

#define MOTHERBOARD BOARD_BIGTREE_SKR_V1_3

Quick Note – It is good practise to regular save the work for the firmware you are adjusting. While you can use the mouse to go uptown the top of the screen. Then click File, then Save. It is far quicker to use shortcuts.

Mac – Press the CMD (⌘) and the S key at the same time.
PC – Press the Ctrl and the S key at the same time.

@section machine

The standard type of power supply with most 3D printers is similar to LED power supply units. While not definable, if controlled via a relay defining the PSU to XBOX usually works the best.

If you are not controlling your power supply ensure PSU_CONTROL is left un-enabled by leaving the forward slashes in place.

//#define PSU_CONTROL

PS_ON is one of the features of an ATX PSU, if you are wishing to turn the SKR V1.3 on and off then follow the steps below.

#define PSU_CONTROL

Now you need to set the PSU_ACTIVE_HIGH option as false.

#define PSU_ACTIVE_HIGH false

However If you are using a relay setup as in our SKR V1.3 ATX PSU guide. Or you are using a relay to control a non-ATX power supply. Set to PSU_ACTIVE_HIGH as true (X-Box).

#define PSU_ACTIVE_HIGH true

While there are a few other settings within PSU_CONTROL they have notes alongside them that are self-explanatory. Simply choose what suits your needs.

@section homing

Below we will be talking about endstops, these are the physical or optical switches that trigger when the 3D printer homes. Furthermore the homing switches for are normally used on X, Y, and Z Min connector on the SKR V1.3. You will see and be setting up the settings for end stop pull-ups or pull-downs.

But what is a pull-up or a pull-down ?

A pull-up is a resistor that connects the pins not in use to the voltage of the switch either 3.3V or 5V. By doing so it keeps the switch as a High input. Where as pull-down resistor will connect the pins not used to the ground which is 0V and as such gives a LOW input.

BLTouch or other sensor probes normally need to have the switch they are connected to set to pullup. Moreover this can be done via enabling ENDSTOPPULLUPS.

#define ENDSTOPPULLUPS

However if this causes problems with your 3D printers particular setup, it’s end stops and homing. Then disable ENDSTOPPULLUPS and just enable the pull-up for the probe.

//#define ENDSTOPPULLUPS
#if DISABLED(ENDSTOPPULLUPS)
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN
#define ENDSTOPPULLUP_ZMIN_PROBE
#endif

Furthermore some other probes and switches require a pull-down in order to function correctly its a similar process as above but for the ENDSTOPPULLDOWNS.

If this is the case for your 3D printers setup then ensure the #define ENDSTOPPULLUPS is disabled and all the ENDSTOPPULLUP_. Now enable ENDSTOPPULLDOWNS.

#define ENDSTOPPULLDOWNS

On the rare occasion you need a mix of pull-up and pull-down resistance methods, then disable both the ENDSTOPPULLUPS and the ENDSTOPPULLDOWNS.

Now enable the relevant switch for a pull-up or pull-down by removing those forward slashes for the individual switches. See below for example.

//#define ENDSTOPPULLUPS //SET TO DISABLED
#if DISABLED(ENDSTOPPULLUPS)
#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN
#define ENDSTOPPULLUP_ZMIN_PROBE //This is only one enabled as pull-up
#endif

//#define ENDSTOPPULLDOWNS //SET TO DISABLED
#if DISABLED(ENDSTOPPULLDOWNS)
#define ENDSTOPPULLDOWN_XMAX
#define ENDSTOPPULLDOWN_YMAX
#define ENDSTOPPULLDOWN_ZMAX
#define ENDSTOPPULLDOWN_XMIN
#define ENDSTOPPULLDOWN_YMIN
#define ENDSTOPPULLDOWN_ZMIN
//#define ENDSTOPPULLDOWN_ZMIN_PROBE // This is only one not enabled as pull-down.
#endif

Now if upon testing your end-switches and they are not triggering you may need to invert the signal, luckily this can be in firmware rather than fitting new switches. Below is an example of an inverted logic for the probe or BLTouch not triggering when homing.

#define Z_MIN_PROBE_ENDSTOP_INVERTING true

@section probes

Probes make life a little easier when it comes to bed levelling, however sometimes they take a bit of tweaking and trial and error to getting working well. All going well you can simply plug into the servo or probe inserts on the SKR V1.3. However if you are wanting to run Neopixels on the SKR V1.3 and say a BLTouch, then it takes a little more jiggling around. Have a look at our SKR V1.3 NEOPIXEL & BLTOUCH guide if this is of interest to you.

Naturally Marlin needs to know where the probe is connected. While this next step is now semi-redundant as it should be within the pins_BTT_SKR_V1_3.h file. However, it is still good practise to set it just encase there has been a mistake made with an update to Marlin.

Search and enable #define Z_MIN_PROBE_PIN and set the pin number as set below which is the Z_MAX_PIN.

#define Z_MIN_PROBE_PIN P1_24

Now we need to set what type of probe we are using. If the sensor on the 3D printer is an inductive or a switch type sat on the nozzle then enable the fix mounted probe.

#define FIX_MOUNTED_PROBE

else if you are using a BLTouch style sensor then enable the bltouch.

#define BLTOUCH

So at this point Marlin knows there is a sensor, it knows what type and where it is plugged in. However it doesn’t know where it is physically attached to the printer.

This is important, let’s say your probe is to the left of the nozzle by 22mm. Without Marlin knowing this, the point in height for where the nozzle will always be wrong. As it is the measurement for 22mm away to the left of the nozzle.

So by telling Marlin where the nozzle is physically located Marlin adjusts that point of reference accordingly. Now the the height is correct. So if you are using a 3D printed model supplied from say Thingiverse or a purchased holder. Ordinarily the distances needed to set are normally enclosed.

However if you don’t know the placement you are going to need to measure the distance from the centre of the nozzle to the centre of the probe. Both in the X-Axis (Left or right) and the Y-Axis (Front or back). The Z Height adjustment comes much later.

So on the example below, my probe position that I designed is exactly 22mm to the left. It is not in front or behind the centre of the nozzle.

Now if the nozzle is to the left it is a negative number, if it was to the right you would leave off the minus.

#define NOZZLE_TO_PROBE_OFFSET { -22, 0, 0 }

However, let’s say your probe was to the left by 30mm, and behind the probe by 10mm it would look like below.

#define NOZZLE_TO_PROBE_OFFSET { -30, 10, 0 }

In Marlin if the probe is behind the nozzle it is a positive number, and if it was in front then it would be a negative. Marlin supplies a little example in this section.

Moving along, I personally like to have multiple probes, this takes twice as long, but is more reliable. In essence with to probes one is fast and one is slow. The measurement is then average but with more emphasis on the slow probe for the averaging. If this sounds good to you then enable Multiple Probing and set the value to 2.

#define MULTIPLE_PROBING 2

While not just specific to the SKR V1.3 it is however worth pointing out that you need to set the correct bed size. Not only is this key for printing boundaries but also required for getting as much of the bed level as possible.

so look for and define the X_BED_SIZE and the Y_BED_SIZE options and adjust for your printer.

For example if your printer was a Anet A8 it would be 220 x 220. Alternatively if say it was a Creality Ender 3 Pro it would be 230 x 230. Yes 230, you can get more bed levelling nearer to the edge even with the standard setup.

#define X_BED_SIZE 230
#define Y_BED_SIZE 230

Now Marlin needs to know how high the printer can print too. So search for and adjust Z_MAX_POS. Again Anet A8 is 240, Creality Ender 3 Pro is 250.

#define Z_MAX_POS 250

In Marlin 2 there is a section for a software minimum end stop. Lets say the height for the Z-Axis is 0mm. It would stop at 0mm and not go any lower. As this is defined in Z_MIN_POS 0.

However when bed levelling this causes an issue where the probe or nozzle can not be lowered enough. Naturally we want to disable this, so search for the MIN_SOFTWARE_ENDSTOPS option. Now disable the option for the MIN_SOFTWARE_ENDSTOP_Z. See below for an example.

#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
#define MIN_SOFTWARE_ENDSTOP_Y
//#define MIN_SOFTWARE_ENDSTOP_Z
#endif

If you haven’t already don’t forget to save your changes.

Mac – Press the CMD (⌘) and the S key at the same time.
PC – Press the Ctrl and the S key at the same time.

@section calibrate

There are various options for the style of automatic bed levelling within Marlin. However the quickest and easiest to get along with is AUTO_BED_LEVELING_BILINEAR so let’s start with that.

#define AUTO_BED_LEVELING_BILINEAR

Importantly for the most part when the printer is set to home the G28 command is giving. However it will forget any previous bed levelling probing. So we need to make sure that it doesn’t forget. So search for and enable the RESTORE_LEVELING_AFTER_G28 option.

#define RESTORE_LEVELING_AFTER_G28

The next major step in setting up bed levelling within Marlin is the amount of grid lines per dimension is used. By default this is 3 x 3 however, for most beds you may need a higher value. I would suggest 9 is a good point to start with for many beds. So lets alter the value of the amount of grid points in GRID_MAX_POINTS_X.

#define GRID_MAX_POINTS_X 9

While I don’t recommend using the LCD for Automatic Bed Levelling (ABL). Due to the results always seem better when the command is sent via a PC terminal. However it does enable a great feature for both manual and automatic bed levelling.

Furthermore there is an LCD menu option that will allow the printer to move around the four corners one at a time. This allows us to adjust the bed levelling for each corner until perfect. Even with the automatic bed levelling this helps narrow the gap differences between corners. Firstly we need to enable LCD_BED_LEVELING.

#define LCD_BED_LEVELING

A few lines down you will see LEVEL_BED_CORNERS you need to enable this also.

#define LEVEL_BED_CORNERS

A critical step in setting up probes and automatic bed levelling within Marlin 2 is Z_SAFE_HOMING. Without this option enabled the nozzle will crash into the bed when homing. So search and enable Z_SAFE_HOMING.

#define Z_SAFE_HOMING

@section extras

Every time a setting is changed on a 3D printer the information can be lost if it is not saved. So you may change something turn the printer off and when its turned back on again it has disappeared.

This is because it has not been saved into the printers memory. So memory on a printer can be via a physical chip or software via the SD card. Which every option is used we need to enable the storing of information into that memory known as EEPROM. (Electrically Erasable Programmable Read-Only Memory). So search and enable EEPROM_SETTINGS.

#define EEPROM_SETTINGS

Now we want to be able to talk back and forth to that memory so we need to enable the chit-chat option.

#define EEPROM_CHITCHAT

Bizarrely SD memory card support is disabled by default, so let find SDSUPPORT and enable it.

#define SDSUPPORT

@section lcd

Marlin 2 needs to know the type of LCD display we are using on the 3D printer so it can display the information correctly. Double check what display you are using and find it in the list within the lcd section. For most people using a purchased LCD this is going to be REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER.

#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

Alternative those using Creality 3D printers are likely to be using the CR10_STOCKDISPLAY.

#define CR10_STOCKDISPLAY

Furthermore Anet users could be using the ANET_FULL_GRAPHICS_LCD

#define ANET_FULL_GRAPHICS_LCD

Thats the basic setup done in the Configuration.h for using the SKR V1.3. Furthermore this finishes the first part of the SKR V1.3 Marlin 2 setup guide. While there are other settings that need changing within Configuration these are non-specific to the SKR V1.3 and tend to be machine specific. Next comes the Configuration_adv.h file changes.

There will be a Full guide to Marlin 2 but these take a long time to write and just as long to proof read. Until recently Marlin 2 was a beta release, however now it is been released things can move forward with the writing of guides.

Don’t forget to save your changes.

Mac – Press the CMD (⌘) and the S key at the same time.
PC – Press the Ctrl and the S key at the same time.

Configuration_adv.h

While you may be feeling fatigued from dealing with the Configuration.h setup. You will be pleased to know there isn’t much more to change specifically for the SKR V1.3. So make yourself a drink, recuperate and when ready delve into the Configuration_adv.h and continue with the SKR V1.3 Marlin 2 setup guide.

@section homing

For the Bltouch sensor types there are a few addition settings we need to apply. Firstly probes need a little time to ensure they have received the signal before deploying. While the default is 500 and can be left at this. I found 200 is perfect for the BLtouch V3 or later. So search and alter the BLTOUCH_DELAY option.

#define BLTOUCH_DELAY 200

Now the Bltouch version 3 or later performs better with a 5V power supply.

BUT before you enable this option, check, check and check again that your board supports 5V on the pin you plugged the three cables into.

This is usually marked up as Servo or Probe.

Once confirmed and you are using a Bltouch V3 or higher, then enable the 5V mode.

#define BLTOUCH_SET_5V_MODE

If however you are using a lower version of the Bltouch or you are not sure leave the 5V mode disabled.

//#define BLTOUCH_SET_5V_MODE

Ordinarily this next option is usually used for Delta style 3D printers, however the BLTouch versions 3 or higher seem to perform more reliably with the High Speed option enabled.

#define BLTOUCH_HS_MODE

@section lcd

So in the Configuration.h we enabled the SD card support. However many setups have multiple SD card slots. So we need to tell Marlin which one we want to use for the everyday printing.

By default it will use the one detailed within the 3D printer boards pins file, but we can override this here. So find SDCARD_CONNECTION and change this to your preference. I prefer using the LCD’s memory card slot for ease.

#define SDCARD_CONNECTION LCD

However the default Creality LCD’s don’t have any SD slots. So you will want to to set this to the onboard SD card slot.

#define SDCARD_CONNECTION ONBOARD

Moving along, a critical part of bed levelling, is being able to adjust the height of the nozzle from the bed. In particular in very small increments. This helps us to get that perfect first layer. Marlin refers to this as Baby Stepping. So let’s find and enable the BABYSTEPPING option.

#define BABYSTEPPING

Within the baby stepping configuration is a few options that you will want to enable.

Firstly while not an option that many will find a use for, however I do an it allows be to adjust the baby stepping without having to home first. So this option is a personal choice.

#define BABYSTEP_WITHOUT_HOMING

Importantly we want to be able to quickly get to the baby stepping option. So we want to enable DOUBLECLICK_FOR_Z_BABYSTEPPING. Once enabled, access is fire quickly pushing the LCD button in twice in quick succession. Now we can even use this option while theprinter is printing, if you find the 1st layer height is off slightly, you can adjust accordingly.

#define DOUBLECLICK_FOR_Z_BABYSTEPPING

Next we want to be able to adjust this wether the 3D printer is moving or not. So we want to be able to always access the baby stepping mode.

define BABYSTEP_ALWAYS_AVAILABLE

One of the most important and critical options for good automatic bed levelling is the ability to combine the baby step movements with the initial Z probe height (M851). Allowing for a more refined bed levelling.

#define BABYSTEP_ZPROBE_OFFSET

A good option to enable for bed levelling is the retry and recovery option. This way if the automatic bed levelling fails, it will restart itself. So search for and enable the G29_RETRY_AND_RECOVER option.

#define G29_RETRY_AND_RECOVER

Furthermore we can tell Marlin and in turn the printer, how many times we want to re-try before completely failing. I personally have found even with the most unreliable of probes that it normally achieves the bed levelling after failing 3 time. So I tend to setup the amount of retries to 4.

#define G29_MAX_RETRIES 4

Don’t forget to save your changes.

Mac – Press the CMD (⌘) and the S key at the same time.
PC – Press the Ctrl and the S key at the same time.

Thats the basic setup done in the Configuration_adv.h for using the SKR V1.3 and the end of the SKR V1.3 Marlin 2 setup guide. While there are other settings that need changing within the Configuration_adv these are non-specific to the SKR V1.3 and tend to be machine specific.

Since the release of Marlin 2 there is no need to alter the pins_BTT_SKR_V1_3.h as standard.

There will be a Full guide to Marlin 2 but these take a long time to write and just as long to proof read. Until recently Marlin 2 was a beta release, however now it is been released things can move forward with the writing of setup guides.

Once again I hope the SKR V1.3 Marlin 2 Setup Guide was useful, all the very best.


© 2019-2020 Copyright - All Rights Reserved.