# Help needed with SKR1.4, TMC5160 and BL Touch Klipper setup

**URL:** <https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278>\
**Category:** General Discussion\
**Created:** [May 15, 2021, 10:24am UTC](https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278 "2021-05-15T10:24:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![aldiallo-3dKlip](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@aldiallo-3dKlip](https://klipper.discourse.group/u/aldiallo-3dKlip)\
**Post date:** [May 15, 2021, 10:24am UTC](https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278/1 "2021-05-15T10:24:23Z")

</div>

Hi all,

I have a Artirelly Sidewider X1 running a SKR 1.4 with TMC5160 and a BL Touch and a BTT touchscreen so after watching several videos on Youtube about Klipper I decided to give it a go.

I’ve installed Klipper on the Raspeberry and have started looking at how I go configuring the printer.cfg file, but must admit I’m a bit lost here on how I go in configuring it to take into account the BL Touch as well as the TMC5160, I’m also using a Bondtech BMG Extruder and a E3DV6 hotend, I’m currently assuming that for the steppers just renaming them would work but I would rather check here first before I go on a make the magic smoke show up.

As I’m a complete noob with Klipper, any advise on the correct setup would be highly appreciated.

Thanks in advance

It that helps, here my printer.cfg:

# This file contains common pin mappings for the BIGTREETECH SKR V1.4

# board. To use this config, the firmware should be compiled for the

# LPC1768 or LPC1769(Turbo).

# See docs/Config\_Reference.md for a description of parameters.

[virtual\_sdcard]  
path: ~/gcode\_files

[display\_status]

[pause\_resume]

[stepper\_x]  
step\_pin: P2.2  
dir\_pin: P2.6  
enable\_pin: !P2.1  
microsteps: 16  
rotation\_distance: 40  
endstop\_pin: !P1.29  
position\_endstop: 0  
position\_max: 310  
homing\_speed: 50

[stepper\_y]  
step\_pin: P0.19  
dir\_pin: P0.20  
enable\_pin: !P2.8  
microsteps: 16  
rotation\_distance: 40  
endstop\_pin: !P1.28  
position\_endstop: 0  
position\_max: 310  
homing\_speed: 50

[stepper\_z]  
step\_pin: P0.22  
dir\_pin: !P2.11  
enable\_pin: !P0.21  
microsteps: 16  
rotation\_distance: 8  
endstop\_pin: endstop\_pin: probe:z\_virtual\_endstop  
position\_max: 300  
position min: -1.5

[extruder]  
step\_pin: P2.13  
dir\_pin: !P0.11  
enable\_pin: !P2.12  
microsteps: 16  
rotation\_distance: 33.500  
nozzle\_diameter: 0.400  
filament\_diameter: 1.750  
heater\_pin: P2.7  
sensor\_type: EPCOS 100K B57560G104F  
sensor\_pin: P0.24  
control: pid  
pid\_Kp: 22.2  
pid\_Ki: 1.08  
pid\_Kd: 114  
min\_temp: 5  
max\_temp: 260

#[extruder1]  
#step\_pin: P1.15  
#dir\_pin: P1.14  
#enable\_pin: !P1.16  
#heater\_pin: P2.4  
#sensor\_pin: P0.23  
#…

[heater\_bed]  
heater\_pin: P2.5  
sensor\_type: EPCOS 100K B57560G104F  
sensor\_pin: P0.25  
control: pid  
pid\_Kp: 54.027  
pid\_Ki: 0.770  
pid\_Kd: 948.182  
min\_temp: 0  
max\_temp: 130

[fan]  
pin: P2.3

[mcu]  
serial: /dev/serial/by-id/usb-Klipper\_Klipper\_firmware\_12345-if00

[printer]  
kinematics: cartesian  
max\_velocity: 400  
max\_accel: 500  
max\_z\_velocity: 10  
max\_z\_accel: 100

########################################

# TMC2208 configuration

########################################

#[tmc2208 stepper\_x]  
#uart\_pin: P1.10  
#run\_current: 0.800  
#hold\_current: 0.500  
#stealthchop\_threshold: 999999

# 

#[tmc2208 stepper\_y]  
#uart\_pin: P1.9  
#run\_current: 0.800  
#hold\_current: 0.500  
#stealthchop\_threshold: 999999

# 

#[tmc2208 stepper\_z]  
#uart\_pin: P1.8  
#run\_current: 0.650  
#hold\_current: 0.450  
#stealthchop\_threshold: 999999

# 

#[tmc2208 extruder]  
#uart\_pin: P1.4  
#run\_current: 0.800  
#hold\_current: 0.500  
#stealthchop\_threshold: 999999

# 

#[tmc2208 extruder1]  
#uart\_pin: P1.1  
#run\_current: 0.800  
#hold\_current: 0.500  
#stealthchop\_threshold: 999999

########################################

# TMC5160 configuration

########################################

[tmc5160 stepper\_x]  
cs\_pin: P1.10  
spi\_software\_miso\_pin: P0.5  
spi\_software\_mosi\_pin: P1.17  
spi\_software\_sclk\_pin: P0.4  
run\_current: 0.800  
hold\_current: 0.500  
stealthchop\_threshold: 999999  
diag1\_pin: P1.29

[tmc5160 stepper\_y]  
cs\_pin: P1.9  
spi\_software\_miso\_pin: P0.5  
spi\_software\_mosi\_pin: P1.17  
spi\_software\_sclk\_pin: P0.4  
run\_current: 0.800  
hold\_current: 0.500  
stealthchop\_threshold: 999999  
diag1\_pin: P1.28

[tmc5160 stepper\_z]  
cs\_pin: P1.8  
spi\_software\_miso\_pin: P0.5  
spi\_software\_mosi\_pin: P1.17  
spi\_software\_sclk\_pin: P0.4  
run\_current: 0.650  
hold\_current: 0.450  
stealthchop\_threshold: 999999  
diag1\_pin: P1.27

[tmc5160 extruder]  
cs\_pin: P1.4  
spi\_software\_miso\_pin: P0.5  
spi\_software\_mosi\_pin: P1.17  
spi\_software\_sclk\_pin: P0.4  
run\_current: 0.800  
hold\_current: 0.500  
stealthchop\_threshold: 999999  
diag1\_pin: P1.26

[tmc5160 extruder1]  
cs\_pin: P1.1  
spi\_software\_miso\_pin: P0.5  
spi\_software\_mosi\_pin: P1.17  
spi\_software\_sclk\_pin: P0.4  
run\_current: 0.800  
hold\_current: 0.500  
stealthchop\_threshold: 999999  
diag1\_pin: P1.25

########################################

# EXP1 / EXP2 (display) pins

########################################

[board\_pins]  
aliases:  
# EXP1 header  
EXP1\_1=P1.30, EXP1\_3=P1.18, EXP1\_5=P1.20, EXP1\_7=P1.22, EXP1\_9=,  
EXP1\_2=P0.28, EXP1\_4=P1.19, EXP1\_6=P1.21, EXP1\_8=P1.23, EXP1\_10=\<5V\>,  
# EXP2 header  
EXP2\_1=P0.17, EXP2\_3=P3.26, EXP2\_5=P3.25, EXP2\_7=P1.31, EXP2\_9=,  
EXP2\_2=P0.15, EXP2\_4=P0.16, EXP2\_6=P0.18, EXP2\_8=, EXP2\_10=  
# Pins EXP2\_1, EXP2\_6, EXP2\_2 are also MISO, MOSI, SCK of bus “ssp0”

# See the sample-lcd.cfg file for definitions of common LCD displays.

[bltouch]  
sensor\_pin: !P1.27  
control\_pin: P1.26  
x\_offset: -43  
y\_offset: -52  
z\_offset: 1.5

[bed\_mesh]  
speed: 120  
horizontal\_move\_z: 5  
mesh\_min: 35,6  
mesh\_max: 240, 198  
probe\_count: 5,3

[gcode\_macro G29]  
gcode:  
BED\_MESH\_CALIBRATE

[safe\_z\_home]  
home\_xy\_position: 100,100 # Change coordinates to the center of your print bed  
speed: 50  
z\_hop: 10 # Move up 10mm  
z\_hop\_speed: 5

[gcode\_macro PAUSE]  
rename\_existing: BASE\_PAUSE  
gcode:  
##### set defaults #####  
{% set x = params.X|default(230) %} #edit to your park position  
{% set y = params.Y|default(230) %} #edit to your park position  
{% set z = params.Z|default(10)|float %} #edit to your park position  
{% set e = params.E|default(1) %} #edit to your retract length  
##### calculate save lift position #####  
{% set max\_z = printer.toolhead.axis\_maximum.z|float %}  
{% set act\_z = printer.toolhead.position.z|float %}  
{% set lift\_z = z|abs %}  
{% if act\_z \< (max\_z - lift\_z) %}  
{% set z\_safe = lift\_z %}  
{% else %}  
{% set z\_safe = max\_z - act\_z %}  
{% endif %}  
##### end of definitions #####  
SAVE\_GCODE\_STATE NAME=PAUSE\_state  
BASE\_PAUSE  
G91  
G1 E-{e} F2100  
G1 Z{z\_safe}  
G90  
G1 X{x} Y{y} F6000

```
[gcode_macro RESUME]

```

rename\_existing: BASE\_RESUME  
gcode:  
##### set defaults #####  
{% set e = params.E|default(1) %} #edit to your retract length  
G91  
G1 E{e} F2100  
G90  
RESTORE\_GCODE\_STATE NAME=PAUSE\_state MOVE=1  
BASE\_RESUME

[gcode\_macro CANCEL\_PRINT]  
rename\_existing: BASE\_CANCEL\_PRINT  
gcode:  
TURN\_OFF\_HEATERS  
CLEAR\_PAUSE  
SDCARD\_RESET\_FILE  
BASE\_CANCEL\_PRINT

[gcode\_macro BED\_MESH\_CALIBRATE]  
rename\_existing: BASE\_BED\_MESH\_CALIBRATE  
gcode:  
#before the original gcode  
BED\_MESH\_CLEAR  
QUAD\_GANTRY\_LEVEL  
G1 X125 Y125 Z5 F6000  
#the original gcode  
BASE\_BED\_MESH\_CALIBRATE  
#after the original gcode

---

<div class="post-metadata">

**Author:** ![aldiallo-3dKlip](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@aldiallo-3dKlip](https://klipper.discourse.group/u/aldiallo-3dKlip)\
**Post date:** [May 15, 2021, 7:40pm UTC](https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278/2 "2021-05-15T19:40:09Z")

</div>

Ok, seems like going through trial and error I’m starting to understand how it works, my only issue now seems to be related to the BTT touchscreen I’m using as I got it to work for several minutes but now is not showing anything except the screen type whereas I previously managed to get some info displayed.

this is what I’m using and I do have the [board\_pins] config section

[display]

lcd\_type = st7920

cs\_pin = EXP1\_4

sclk\_pin = EXP1\_5

sid\_pin = EXP1\_3

encoder\_pins = ^EXP2\_3, ^EXP2\_5

click\_pin = ^!EXP1\_2

[output\_pin beeper]

pin: EXP1\_1

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [May 16, 2021, 8:29am UTC](https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278/3 "2021-05-16T08:29:12Z")

</div>

The BBT’s firmware and Klipper are not really compatible. You will need [this firmware](https://github.com/teeminus/NoTouchScreenFirmware) and a special `[display]` configuration to make it work.

[Check the Wiki](https://github.com/teeminus/NoTouchScreenFirmware/wiki) if your combination is already available. If not you will have to figure it out but the examples in the Wiki should give you an idea how.

---

<div class="post-metadata">

**Author:** ![aldiallo-3dKlip](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@aldiallo-3dKlip](https://klipper.discourse.group/u/aldiallo-3dKlip)\
**Post date:** [May 16, 2021, 11:44am UTC](https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278/4 "2021-05-16T11:44:44Z")

</div>

Thanks for this Sineos, I’ll give a try and report back, for now I can say that I have the same config as the one tested by wildjokerss with the TFT 35V3 E3 and the SKR 1.4, except for the firmware; what I don’t get is why it started working until I did a change on the printer.cfg file that was not even related to the display section.

Below is what I currently have going on for the display and as you can see it matches what is on the Wiki and tested, I’ll use the firmware described in the link.

```auto
[board_pins]
aliases: 
	EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,
	EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
	EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,
	EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>

[display]
lcd_type: st7920 
cs_pin: EXP1_4
sclk_pin: EXP1_5
sid_pin: EXP1_3
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2

```

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [May 16, 2021, 11:56am UTC](https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278/5 "2021-05-16T11:56:35Z")

</div>

I’d recommend the [emulated\_st7920](https://github.com/teeminus/NoTouchScreenFirmware/wiki/Klipper-display-configuration#migrate-to-new-display-driver)

```auto
[display]
lcd_type: emulated_st7920
spi_software_miso_pin: EXP1_6
spi_software_mosi_pin: EXP1_3
spi_software_sclk_pin: EXP1_5
en_pin: EXP1_4
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2

```

---

<div class="post-metadata">

**Author:** ![aldiallo-3dKlip](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@aldiallo-3dKlip](https://klipper.discourse.group/u/aldiallo-3dKlip)\
**Post date:** [May 16, 2021, 1:03pm UTC](https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278/6 "2021-05-16T13:03:47Z")

</div>

will give that a try, thanks

---

<div class="post-metadata">

**Author:** ![aldiallo-3dKlip](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@aldiallo-3dKlip](https://klipper.discourse.group/u/aldiallo-3dKlip)\
**Post date:** [May 18, 2021, 8:21pm UTC](https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278/7 "2021-05-18T20:21:37Z")

</div>

Sineos,

Thank you very much, that did the trick, I did ran into a weird issue for a few minutes where I had white donuts going from left to right on all the screen until I rebooted the machine and all good since on that front. 🙂

Thanks again

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [March 26, 2025, 4:09am UTC](https://klipper.discourse.group/t/help-needed-with-skr1-4-tmc5160-and-bl-touch-klipper-setup/278/8 "2025-03-26T04:09:44Z")

</div>


