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 me on

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

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 USE_XMIN_PLUG<br>#define USE_YMIN_PLUG#define USE_ZMIN_PLUG

define your ENDSTOPPULLUPs, make sure it uses ENDSTOPPULLUP_ZMIN_PROBE


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
#if ENABLED(BLTOUCH)#define BLTOUCH_DELAY 100 // (ms) Enable and increase if needed#endif

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
#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



    • Optics Contest

      Optics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Plastics Contest

      Plastics Contest

    3 Discussions


    Tip2 months agoon Step 5

    Just a couple of notes...on the picture (Step 2, Wiring Z-Max) The black wire looks like it's going to the left pin, when it should be going to the center pin (ground). And on "Step 4: Marlin Redirecting Pins" references X-Max, when it should be referencing Z-Max (pin 19).

    Thanks for the instructable, I have this exact setup and was wondering how to wire the BLTouch without the servo pins.


    Reply2 months ago

    The pic did look very misleading. Replaced it. Also changed the X to Z. Thanks for catching that!


    Reply2 months ago

    No problem at all! I went through this step by step, and now have a bltouch sensor working on my Piper 2 corexy printer. Thanks for the Instructable!,,,,,,,,,,