Introduction: Connecting BLTOUCH to KFB2.0

About: Avid 3D printer builder, currently completing my 3rd printer design. If you like what you see and maybe even implement what provide, consider supporting subscribing to my youtube channel…

It's been asked before and now that I'm assisting someone with a CR-10 "upgrade" to a KFB2.0 with TMC2130, I ran into it myself: How do I connect a BLTOUCH to the KFB2.0

So a small instructable may be in order.

The question is a good one, as as one of the major downsides to the KFB2.0 is, that it never implemented the Servo Pins (generally present on most other boards).

In order to figure this out I ordered a genuine BLTOUCH from Amazon, so if you're using a clone, this should probably still work but no guarantees.

The BLTOUCH consists of 2 sets of wires. The end stop wires and the servo wires.

The end stop wires will go into the regular end stop connectors but for the servo wires we need to use an alternative to get around the missing servo pins

Step 1: Parts Required

There are many parts required to wire up a KFB2.0 but for this instructable you will need at least

BLTOUCH Amazon $37.98 (no extended wires, get extended if you need them)

KFB2.0 Amazon $19.97

This setup was done on Marlin Firmware 1.1.9 (very similar to setup of 1.1.8)

Step 2: Wiring Using Z-Max

For this setup we're going to use/abuse the Z-Max end stop connector to run the servo on the BLTOUCH

Z-Min is used as the actual end stop

The picture says it all. Connect all 5 wires from your BLTOUCH according to the image with the Servo wires being handled by the Z-Max connector.

In the software setup we'll redirect the pins

Step 3: Changing Marlin Firmware Configuration.h

Update 4/302020: This instructable was written using a BLTOUCH SMART v2 on an earlier version of Marlin. Following are the changes you need to make to get this to work on the latest Marlin 02.00.05 (bugfix). All changes are now limited to the configuration.h

  #define MOTHERBOARD BOARD_KFB_2 //marlin 2 has dedicated KFB2 board setup
#define ENDSTOP_INTERRUPTS_FEATURE (keep disabled for TMC2130)
#define BLTOUCH 
  #define SERVO0_PIN 19 //redirects servo pin to Z-Max endstop
#endif //Customized DBP

These you have to configure but setting depend on your hardware setup

#define NOZZLE_TO_PROBE_OFFSET { -27, -10, 0 } 

// Certain types of probes need to stay away from edges
#define MIN_PROBE_EDGE 12 
// X and Y axis travel speed (mm/m) between probes

#define XY_PROBE_SPEED 2800

//Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)

// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 4) //Customized DBP

following is optional (the double tap)

#define EXTRA_PROBING    1 

The following is from my older version of marlin:

A few changes have to be made to enable the BLTOUCH and redirect the pins

In Configuration.h

Pick the MKS_GEN_L board for the KFB2.0


Practically all of the following settings are a matter of uncommenting/commenting your code by adding/removing // (adding these will disable code)

For this setup it is assumed you will be using the Z-Min for the Z endstop


define your ENDSTOPPULLUPs, make sure it uses ENDSTOPPULLUP_ZMIN_PROBE

  // Disable ENDSTOPPULLUPS to set pullups individually

for my BLTOUCH installation I have the inversion set to false

#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.

let the system know it uses the probe for Z-min


turn on BLTOUCH

#define BLTOUCH
  #define BLTOUCH_DELAY 100   // (ms) Enable and increase if needed

The following setting are going to depend on where you have mounted your BLTOUCH. Measure the distance from your BLTOUCH pin to your extruder. These values make sure you remain on top of your bed when auto leveling. The values below may (and probably won't) match your setup

#define X_PROBE_OFFSET_FROM_EXTRUDER 48  // X offset: -left  +right  [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER -2  // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0   // Z offset: -below +above  [the nozzle]

set probe speed

#define XY_PROBE_SPEED 8000

IF you want the probe to do a double touch (or more)


The following setting will position your extruder prior to during and after probing

#define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES  10 // Z Clearance between probe points
#define Z_CLEARANCE_MULTI_PROBE     5 // Z Clearance between multiple probes
//#define Z_AFTER_PROBING           5 // Z position after probing is done

Make the system aware of at least this servo

#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command<br>#define SERVO_DELAY { 300 } 

If you are going to use the BLTOUCH for Auto Bed Leveling set the next values


Step 4: Marlin Redirecting Pins

Since the KFB 2.0 does not have its dedicated Servo pins we using the Z-Max plug to power the servo that is inside the BLTOUCH.

For this we need to tell the Marlin firmware to redirect some pins.

It is assumed you have selected BOARD_MKS_GEN_L in the configuration.h

open the file pins_MKS_GEN_L.h

in it add the following Make sure you add this AFTER the line #include "pins_RAMPS.h":

#include "pins_RAMPS.h"
//redirect the servo pin to the Z-Max plug
#define SERVO0_PIN 19

If you want to test the pins with g-code m43 you'll need to enable #define PINS_DEBUGGING in configuration_adv.h


Step 5: Testing Your Setup

Once you've uploaded the updated Marlin FW to the board you can test the BLTOUCH.

If your firmware is setup for Safe Z-homing (meaning you can't home z before having homed X or Y) you either need to turn this feature off in the firmware

in configuration.h comment out Z_SAFE_HOMING

//#define Z_SAFE_HOMING

or have your X and Y end stops connected.

First test is to see what happens with you turn on/power up your board. In this setup the BLTOUCH lights up when powering on and does two servo action. The probe pin comes out twice and retracts

As far as lights is concerned I see the orange light and a small purple led on. (not quite clear in the photo)

connect to the board with something like PronterFace or OCtoPrint and send it g-code m43 (if you've enabled PINS_DEBUGGING in the last step)

Check to see if pin 19 is indeed set to SERVO0_pin

Next check out this video for testing the BLTOUCH setup