# Troubleshooting Closed loop S42C

**URL:** <https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998>\
**Category:** General Discussion\
**Created:** [October 15, 2023, 9:50pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998 "2023-10-15T21:50:38Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anatolii](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Anatolii](https://klipper.discourse.group/u/Anatolii)\
**Post date:** [October 15, 2023, 9:50pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/1 "2023-10-15T21:50:38Z")

</div>

### Basic Information: S42C

Printer Model: Voron 2.4  
 MCU / Printerboard: BTT octopus  
 Recv: // Unable to read tmc uart ‘stepper\_x’ register IFCNT  
Recv: // Once the underlying issue is corrected, use the  
Recv: // “FIRMWARE\_RESTART” command to reset the firmware, reload the  
Recv: // config, and restart the host software.  
Recv: // Printer is shutdown  
Recv: // Klipper state: Not ready  
Recv: !! Unable to read tmc uart ‘stepper\_x’ register IFCNT

### Describe your issue:

Hi. I’ve tried for days trying to get my printer working with closed loop s42c drivers, but I’m always getting the same error. Any and all searches on the web lead to dead threads, useless youtube videos, or phrazes “it’s plug and play”. But, it’s not plug and play, by just pulling out old tmc 2209 driver and sticking this one in.  
I’ve tried changing settings in printer.cfg to A4988, tried with the jumper for TmС and without… nothing works.

[tmc2209 stepper\_x]  
uart\_pin: PC4  
interpolate: false  
run\_current: 0.8  
sense\_resistor: 0.110  
stealthchop\_threshold: 0

## A Stepper - Right

## Connected to MOTOR\_1

## Endstop connected to DIAG\_1

[stepper\_y]  
step\_pin: PG0  
dir\_pin: PG1  
enable\_pin: !PF15  
rotation\_distance: 40  
microsteps: 32  
full\_steps\_per\_rotation:200 #set to 400 for 0.9 degree stepper  
endstop\_pin: PG9  
position\_min: 0  
##--------------------------------------------------------------------

position\_endstop: 350  
position\_max: 355

##--------------------------------------------------------------------  
homing\_speed: 75 #Max 100  
homing\_retract\_dist: 5  
homing\_positive\_dir: true

## Make sure to update below for your relevant driver (2208 or 2209)

[tmc2209 stepper\_y]  
uart\_pin: PD11  
interpolate: false  
run\_current: 0.8  
sense\_resistor: 0.110  
stealthchop\_threshold: 0

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

# Z Stepper Settings

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

## Z0 Stepper - Front Left

## Connected to MOTOR\_2

## Endstop connected to DIAG\_2

[stepper\_z]  
step\_pin: PF11  
dir\_pin: PG3  
enable\_pin: !PG5  
rotation\_distance: 40  
gear\_ratio: 80:16  
microsteps: 32  
endstop\_pin: PG10

## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0)

## (+) value = endstop above Z0, (-) value = endstop below

## Increasing position\_endstop brings nozzle closer to the bed

## After you run Z\_ENDSTOP\_CALIBRATE, position\_endstop will be stored at the very end of your config

##position\_endstop: -0.5  
##--------------------------------------------------------------------  
position\_endstop: 330  
position\_max: 330

##--------------------------------------------------------------------  
position\_min: -5  
homing\_speed: 25  
second\_homing\_speed: 3  
homing\_retract\_dist: 3

## Make sure to update below for your relevant driver (2208 or 2209)

[tmc2209 stepper\_z]  
uart\_pin: PC6  
interpolate: false  
run\_current: 0.8  
sense\_resistor: 0.110  
stealthchop\_threshold: 0

## Z1 Stepper - Rear Left

## Connected to MOTOR\_3

[stepper\_z1]  
step\_pin: PG4  
dir\_pin: !PC1  
enable\_pin: !PA0  
rotation\_distance: 40  
gear\_ratio: 80:16  
microsteps: 32

## Make sure to update below for your relevant driver (2208 or 2209)

[tmc2209 stepper\_z1]  
uart\_pin: PC7  
interpolate: false  
run\_current: 0.8  
sense\_resistor: 0.110  
stealthchop\_threshold: 0

## Z2 Stepper - Rear Right

## Connected to MOTOR\_4

[stepper\_z2]  
step\_pin: PF9  
dir\_pin: PF10  
enable\_pin: !PG2  
rotation\_distance: 40  
gear\_ratio: 80:16  
microsteps: 32

## Make sure to update below for your relevant driver (2208 or 2209)

[tmc2209 stepper\_z2]  
uart\_pin: PF2  
interpolate: false  
run\_current: 0.8  
sense\_resistor: 0.110  
stealthchop\_threshold: 0

## Z3 Stepper - Front Right

## Connected to MOTOR\_5

[stepper\_z3]  
step\_pin: PC13  
dir\_pin: !PF0  
enable\_pin: !PF1  
rotation\_distance: 40  
gear\_ratio: 80:16  
microsteps: 32

## Make sure to update below for your relevant driver (2208 or 2209)

[tmc2209 stepper\_z3]  
uart\_pin: PE4  
interpolate: false  
run\_current: 0.8  
sense\_resistor: 0.110  
stealthchop\_threshold: 0

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

# Extruder

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

## Connected to MOTOR\_6

## Heater - HE0

## Thermistor - T0

[extruder]  
step\_pin: PE2  
dir\_pin: PE3  
enable\_pin: !PD4

## Update value below when you perform extruder calibration

## If you ask for 100mm of filament, but in reality it is 98mm:

## rotation\_distance = \<previous\_rotation\_distance\> \* \<actual\_extrude\_distance\> / 100

## 21.5450035 is a good starting point

rotation\_distance: 21.5450035 #Bondtech 5mm Drive Gears

## Update Gear Ratio depending on your Extruder Type

## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio)

## Use 80:20 for M4, M3.1

gear\_ratio: 50:10 #BMG Gear Ratio  
microsteps: 32  
full\_steps\_per\_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree  
nozzle\_diameter: 0.400  
filament\_diameter: 1.75  
heater\_pin: PA2

## Validate the following thermistor type to make sure it is correct

## See [Configuration reference - Klipper documentation](https://www.klipper3d.org/Config_Reference.html#common-thermistors) for additional options

sensor\_type: ATC Semitec 104GT-2  
sensor\_pin: PF4  
min\_temp: 10  
max\_temp: 300  
max\_power: 1.0  
min\_extrude\_temp: 110  
control = pid  
pid\_kp = 26.213  
pid\_ki = 1.304  
pid\_kd = 131.721

## Try to keep pressure\_advance below 1.0

pressure\_advance: 0.05

## Default is 0.040, leave stock

pressure\_advance\_smooth\_time: 0.040

## E0 on MOTOR6

## Make sure to update below for your relevant driver (2208 or 2209)

[tmc2209 extruder]  
uart\_pin: PE1  
interpolate: false  
run\_current: 0.5  
sense\_resistor: 0.110  
stealthchop\_threshold: 0  
[printer.cfg](https://klipper.discourse.group/uploads/short-url/yFRC8WbSSEkkSkyVadoZR6gD27e.cfg) (15.1 KB)

---

<div class="post-metadata">

**Author:** ![LifeOfBrian](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/lifeofbrian/32/2380_2.png) [@LifeOfBrian](https://klipper.discourse.group/u/LifeOfBrian)\
**Post date:** [October 16, 2023, 6:38am UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/2 "2023-10-16T06:38:05Z")

</div>

Please put such long code fragments between **Preformatted text** tags:  
 ![preformatted](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/c/c6197d1c4aad1508bc9a46a0ebff882b153cce9c.png)

This makes it much easier to read and keeps the page clean.

---

<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:** [October 16, 2023, 6:45am UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/3 "2023-10-16T06:45:00Z")

</div>

PLEASE upload the **klippy.log** as file **to your next post**.

The code sippet of the printer.cfg you included as text is of not much use:

- It is crippled
- It is not formatted as code
- You attached the printer.cfg file anyway.

* * *

You may check the UART wires  
You may swap the TMC drivers

---

<div class="post-metadata">

**Author:** ![Snakn1](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@Snakn1](https://klipper.discourse.group/u/Snakn1)\
**Post date:** [October 16, 2023, 6:01pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/4 "2023-10-16T18:01:13Z")

</div>

Not sure it your issue has been fixed… see my working config (still in progress but prints fine) … I have X and Y as closed loop. S42B

> [@X-In/1-Out Non-Mixing Extruder Config](https://klipper.discourse.group/t/x-in-1-out-non-mixing-extruder-config/2387/58):
>
> Hello Here is my current working config (still Bata working on calibration) for an BTT octopus with a 3 in to one head , three BTT runout Encoder switch three Bondtech extruders , Duel Z steppers and Closed loop X and Y steppers . Enjoy and I hope it helps anyone who needs it. [printer.cfg](https://klipper.discourse.group/uploads/short-url/51xtmZfXsck5tosyyoQKbgEEOjI.cfg) (17.1 KB)

---

<div class="post-metadata">

**Author:** ![Anatolii](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Anatolii](https://klipper.discourse.group/u/Anatolii)\
**Post date:** [November 2, 2023, 6:06am UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/5 "2023-11-02T06:06:55Z")

</div>

> [@EddyMI3D](#):
>
> klippy.log

Hi. I’m very new to this, and I can’t seen to find klippy.log

---

<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:** [November 2, 2023, 6:52am UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/6 "2023-11-02T06:52:43Z")

</div>

You can find the klippy.log here: `/tmp/klippy.log`

---

<div class="post-metadata">

**Author:** ![Anatolii](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Anatolii](https://klipper.discourse.group/u/Anatolii)\
**Post date:** [November 2, 2023, 5:24pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/7 "2023-11-02T17:24:15Z")

</div>

Your printer.cfg looks completely different from mine )).  
And in your settings it looks like you have TMC set up. How did you manage to get the S42B drivers working?  
I either case, thanks for your help. I’m sure as I deep dive in to this, your file will be quite usefull.

---

<div class="post-metadata">

**Author:** ![Anatolii](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Anatolii](https://klipper.discourse.group/u/Anatolii)\
**Post date:** [November 2, 2023, 5:35pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/8 "2023-11-02T17:35:35Z")

</div>

Thank you.  
Found it

```auto

```

[Starting Klippy…  
Args: [‘/home/pi/klipper/klippy/klippy.py’, ‘/home/pi/printer.cfg’, ‘-l’, ‘/tmp/klippy.log’]  
Git version: ‘v0.11.0-279-g7bd32994’  
Branch: master  
Remote: origin  
Tracked URL: [GitHub - Klipper3d/klipper: Klipper is a 3d-printer firmware](https://github.com/klipper3d/klipper)  
CPU: 4 core ARMv7 Processor rev 3 (v7l)  
Python: ‘2.7.18 (default, Jul 14 2021, 08:11:37) \n[GCC 10.2.1 20210110]’  
Start printer at Thu Nov 2 00:22:36 2023 (1698877356.2 11.9)  
===== Config file =====  
[mcu]  
serial = /dev/serial/by-id/usb-Klipper\_stm32f446xx\_3C000E001850344D30353320-if00  
restart\_method = command

[neopixel sb\_leds]  
pin = PB0  
chain\_count = 10  
color\_order = GRB  
initial\_red = 1.0  
initial\_green = 1.0  
initial\_blue = 1.0  
initial\_white = .0

[gcode\_macro \_sb\_vars]  
variable\_colors = {  
‘logo’: {  
‘busy’: {‘r’: 0.4, ‘g’: 0.0, ‘b’: 0.0, ‘w’: 0.0},  
‘cleaning’: {‘r’: 0.0, ‘g’: 0.02, ‘b’: 0.5, ‘w’: 0.0},  
‘calibrating\_z’: {‘r’: 0.8, ‘g’: 0., ‘b’: 0.35, ‘w’: 0.0},  
‘heating’: {‘r’: 0.3, ‘g’: 0.18, ‘b’: 0.0, ‘w’: 0.0},  
‘homing’: {‘r’: 0.0, ‘g’: 0.6, ‘b’: 0.2, ‘w’: 0.0},  
‘leveling’: {‘r’: 0.5, ‘g’: 0.1, ‘b’: 0.4, ‘w’: 0.0},  
‘meshing’: {‘r’: 0.2, ‘g’: 1.0, ‘b’: 0.0, ‘w’: 0.0},  
‘off’: {‘r’: 0.0, ‘g’: 0.0, ‘b’: 0.0, ‘w’: 0.0},  
‘printing’: {‘r’: 1.0, ‘g’: 0.0, ‘b’: 0.0, ‘w’: 0.0},  
‘standby’: {‘r’: 0.01, ‘g’: 0.01, ‘b’: 0.01, ‘w’: 0.1},  
},  
‘nozzle’: {  
‘heating’: {‘r’: 0.8, ‘g’: 0.35, ‘b’: 0.0, ‘w’:0.0},  
‘off’: {‘r’: 0.0, ‘g’: 0.0, ‘b’: 0.0, ‘w’: 0.0},  
‘on’: {‘r’: 0.8, ‘g’: 0.8, ‘b’: 0.8, ‘w’:1.0},  
‘standby’: {‘r’: 0.6, ‘g’: 0.0, ‘b’: 0.0, ‘w’:0.0},  
},  
‘thermal’: {  
‘hot’: {‘r’: 1.0, ‘g’: 0.0, ‘b’: 0.0, ‘w’: 0.0},  
‘cold’: {‘r’: 0.3, ‘g’: 0.0, ‘b’: 0.3, ‘w’: 0.0}  
}  
}  
variable\_logo\_led\_name = “sb\_leds”  
variable\_logo\_idx = “1”  
variable\_nozzle\_led\_name = “sb\_leds”  
variable\_nozzle\_idx = “2,3”  
gcode =

[gcode\_macro \_set\_sb\_leds]  
gcode =  
{% set red = params.RED|default(0)|float %}  
{% set green = params.GREEN|default(0)|float %}  
{% set blue = params.BLUE|default(0)|float %}  
{% set white = params.WHITE|default(0)|float %}  
{% set led = params.LED|string %}  
{% set idx = (params.IDX|string).split(‘,’) %}  
{% set transmit\_last = params.TRANSMIT|default(1) %}  
{% for led\_index in idx %}  
{% set transmit=transmit\_last if loop.last else 0 %}  
set\_led led={led} red={red} green={green} blue={blue} white={white} index={led\_index} transmit={transmit}  
{% endfor %}

[gcode\_macro \_set\_sb\_leds\_by\_name]  
gcode =  
{% set leds\_name = params.LEDS %}  
{% set color\_name = params.COLOR %}  
{% set color = printer[“gcode\_macro \_sb\_vars”].colors[leds\_name][color\_name] %}  
{% set led = printer[“gcode\_macro \_sb\_vars”][leds\_name + “\_led\_name”] %}  
{% set idx = printer[“gcode\_macro \_sb\_vars”][leds\_name + “\_idx”] %}  
{% set transmit = params.TRANSMIT|default(1) %}  
\_set\_sb\_leds led={led} red={color.r} green={color.g} blue={color.b} white={color.w} idx=“{idx}” transmit={transmit}

[gcode\_macro \_set\_logo\_leds]  
gcode =  
{% set red = params.RED|default(0)|float %}  
{% set green = params.GREEN|default(0)|float %}  
{% set blue = params.BLUE|default(0)|float %}  
{% set white = params.WHITE|default(0)|float %}  
{% set led = printer[“gcode\_macro \_sb\_vars”].logo\_led\_name %}  
{% set idx = printer[“gcode\_macro \_sb\_vars”].logo\_idx %}  
{% set transmit=params.TRANSMIT|default(1) %}  
\_set\_sb\_leds led={led} red={red} green={green} blue={blue} white={white} idx=“{idx}” transmit={transmit}

[gcode\_macro \_set\_nozzle\_leds]  
gcode =  
{% set red = params.RED|default(0)|float %}  
{% set green = params.GREEN|default(0)|float %}  
{% set blue = params.BLUE|default(0)|float %}  
{% set white = params.WHITE|default(0)|float %}  
{% set led = printer[“gcode\_macro \_sb\_vars”].nozzle\_led\_name %}  
{% set idx = printer[“gcode\_macro \_sb\_vars”].nozzle\_idx %}  
{% set transmit=params.TRANSMIT|default(1) %}  
\_set\_sb\_leds led={led} red={red} green={green} blue={blue} white={white} idx=“{idx}” transmit={transmit}

[gcode\_macro set\_logo\_leds\_off]  
gcode =  
{% set transmit=params.TRANSMIT|default(1) %}  
\_set\_logo\_leds red=0 blue=0 green=0 white=0 transmit={transmit}

[gcode\_macro set\_nozzle\_leds\_on]  
gcode =  
{% set transmit=params.TRANSMIT|default(1) %}  
\_set\_sb\_leds\_by\_name leds=“nozzle” color=“on” transmit={transmit}

[gcode\_macro set\_nozzle\_leds\_off]  
gcode =  
{% set transmit=params.TRANSMIT|default(1) %}  
\_set\_sb\_leds\_by\_name leds=“nozzle” color=“off” transmit={transmit}

[gcode\_macro status\_off]  
gcode =  
set\_logo\_leds\_off transmit=0  
set\_nozzle\_leds\_off

[gcode\_macro status\_ready]  
gcode =  
\_set\_sb\_leds\_by\_name leds=“logo” color=“standby” transmit=0  
\_set\_sb\_leds\_by\_name leds=“nozzle” color=“standby” transmit=1

[gcode\_macro status\_busy]  
gcode =  
\_set\_sb\_leds\_by\_name leds=“logo” color=“busy” transmit=0  
set\_nozzle\_leds\_on

[gcode\_macro status\_heating]  
gcode =  
\_set\_sb\_leds\_by\_name leds=“logo” color=“heating” transmit=0  
\_set\_sb\_leds\_by\_name leds=“nozzle” color=“heating” transmit=1

[gcode\_macro status\_leveling]  
gcode =  
\_set\_sb\_leds\_by\_name leds=“logo” color=“leveling” transmit=0  
set\_nozzle\_leds\_on

[gcode\_macro status\_homing]  
gcode =  
\_set\_sb\_leds\_by\_name leds=“logo” color=“homing” transmit=0  
set\_nozzle\_leds\_on

[gcode\_macro status\_cleaning]  
gcode =  
\_set\_sb\_leds\_by\_name leds=“logo” color=“cleaning” transmit=0  
set\_nozzle\_leds\_on

[gcode\_macro status\_meshing]  
gcode =  
\_set\_sb\_leds\_by\_name leds=“logo” color=“meshing” transmit=0  
set\_nozzle\_leds\_on

[gcode\_macro status\_calibrating\_z]  
gcode =  
\_set\_sb\_leds\_by\_name leds=“logo” color=“calibrating\_z” transmit=0  
set\_nozzle\_leds\_on

[gcode\_macro status\_printing]  
gcode =  
\_set\_sb\_leds\_by\_name leds=“logo” color=“printing” transmit=0  
set\_nozzle\_leds\_on

[printer]  
kinematics = corexy  
max\_velocity = 350  
max\_accel = 4000  
max\_z\_velocity = 50  
max\_z\_accel = 350  
square\_corner\_velocity = 10.0

[stepper\_x]  
step\_pin = PF13  
dir\_pin = PF12  
enable\_pin = !PF14  
rotation\_distance = 40  
microsteps = 32  
full\_steps\_per\_rotation = 200  
endstop\_pin = PG6  
position\_min = 0  
position\_endstop = 350  
position\_max = 350  
homing\_speed = 100  
homing\_retract\_dist = 5  
homing\_positive\_dir = true

[tmc2209 stepper\_x]  
uart\_pin = PC4  
interpolate = false  
run\_current = 0.8  
sense\_resistor = 0.110  
stealthchop\_threshold = 0

[stepper\_y]  
step\_pin = PG0  
dir\_pin = PG1  
enable\_pin = !PF15  
rotation\_distance = 40  
microsteps = 32  
full\_steps\_per\_rotation = 200  
endstop\_pin = PG9  
position\_min = 0  
position\_endstop = 350  
position\_max = 360  
homing\_speed = 75  
homing\_retract\_dist = 5  
homing\_positive\_dir = true

[tmc2209 stepper\_y]  
uart\_pin = PD11  
interpolate = false  
run\_current = 0.8  
sense\_resistor = 0.110  
stealthchop\_threshold = 0

[stepper\_z]  
step\_pin = PF11  
dir\_pin = PG3  
enable\_pin = !PG5  
rotation\_distance = 40  
gear\_ratio = 80:16  
microsteps = 32  
endstop\_pin = PG10  
position\_max = 330  
position\_min = -5  
homing\_speed = 75  
second\_homing\_speed = 3  
homing\_retract\_dist = 3  
position\_endstop = 1.000

[tmc2209 stepper\_z]  
uart\_pin = PC6  
interpolate = false  
run\_current = 0.8  
sense\_resistor = 0.110  
stealthchop\_threshold = 0

[stepper\_z1]  
step\_pin = PG4  
dir\_pin = !PC1  
enable\_pin = !PA0  
rotation\_distance = 40  
gear\_ratio = 80:16  
microsteps = 32

[tmc2209 stepper\_z1]  
uart\_pin = PC7  
interpolate = false  
run\_current = 0.8  
sense\_resistor = 0.110  
stealthchop\_threshold = 0

[stepper\_z2]  
step\_pin = PF9  
dir\_pin = PF10  
enable\_pin = !PG2  
rotation\_distance = 40  
gear\_ratio = 80:16  
microsteps = 32

[tmc2209 stepper\_z2]  
uart\_pin = PF2  
interpolate = false  
run\_current = 0.8  
sense\_resistor = 0.110  
stealthchop\_threshold = 0

[stepper\_z3]  
step\_pin = PC13  
dir\_pin = !PF0  
enable\_pin = !PF1  
rotation\_distance = 40  
gear\_ratio = 80:16  
microsteps = 32

[tmc2209 stepper\_z3]  
uart\_pin = PE4  
interpolate = false  
run\_current = 0.8  
sense\_resistor = 0.110  
stealthchop\_threshold = 0

[extruder]  
step\_pin = PE2  
dir\_pin = PE3  
enable\_pin = !PD4  
rotation\_distance = 22.1913536  
gear\_ratio = 50:10  
microsteps = 32  
full\_steps\_per\_rotation = 200  
nozzle\_diameter = 0.400  
filament\_diameter = 1.75  
heater\_pin = PA2  
sensor\_type = ATC Semitec 104GT-2  
sensor\_pin = PF4  
min\_temp = 10  
max\_temp = 300  
max\_power = 1.0  
min\_extrude\_temp = 140  
pressure\_advance = 0.05  
pressure\_advance\_smooth\_time = 0.040  
control = pid  
pid\_kp = 20.471  
pid\_ki = 0.858  
pid\_kd = 122.057

[tmc2209 extruder]  
uart\_pin = PE1  
interpolate = false  
run\_current = 0.5  
sense\_resistor = 0.110  
stealthchop\_threshold = 0

[heater\_bed]  
heater\_pin = PA3  
sensor\_type = Generic 3950  
sensor\_pin = PF3  
max\_power = 0.6  
min\_temp = 0  
max\_temp = 120  
control = pid  
pid\_kp = 38.900  
pid\_ki = 1.402  
pid\_kd = 269.868

[probe]  
pin = PG15  
x\_offset = 0  
y\_offset = 25.0  
z\_offset = 0  
speed = 10.0  
samples = 3  
samples\_result = median  
sample\_retract\_dist = 3.0  
samples\_tolerance = 0.006  
samples\_tolerance\_retries = 3

[fan]  
pin = PA8  
kick\_start\_time = 0.5  
off\_below = 0.10

[heater\_fan hotend\_fan]  
pin = PE5  
max\_power = 1.0  
kick\_start\_time = 0.5  
heater = extruder  
heater\_temp = 50.0

[controller\_fan controller\_fan]  
pin = PD12  
max\_power = 0.9  
kick\_start\_time = 0.5  
heater = heater\_bed

[idle\_timeout]  
timeout = 1800

[safe\_z\_home]  
home\_xy\_position = 233,350  
speed = 100  
z\_hop = 10

[quad\_gantry\_level]  
gantry\_corners =  
-60,-10  
410,420  
points =  
50,25  
50,275  
300,275  
300,25  
speed = 350  
horizontal\_move\_z = 10  
retries = 5  
retry\_tolerance = 0.0075  
max\_adjust = 10

[board\_pins]  
aliases =  
EXP1\_1=PE8, EXP1\_2=PE7,  
EXP1\_3=PE9, EXP1\_4=PE10,  
EXP1\_5=PE12, EXP1\_6=PE13,  
EXP1\_7=PE14, EXP1\_8=PE15,  
EXP1\_9=, EXP1\_10=\<5V\>,  
EXP2\_1=PA6, EXP2\_2=PA5,  
EXP2\_3=PB1, EXP2\_4=PA4,  
EXP2\_5=PB2, EXP2\_6=PA7,  
EXP2\_7=PC15, EXP2\_8=,  
EXP2\_9=, EXP2\_10=\<5V\>

[display]  
lcd\_type = uc1701  
cs\_pin = EXP1\_3  
a0\_pin = EXP1\_4  
rst\_pin = EXP1\_5  
encoder\_pins = ^EXP2\_3, ^EXP2\_5  
click\_pin = ^!EXP1\_2  
contrast = 63  
spi\_software\_miso\_pin = EXP2\_1  
spi\_software\_mosi\_pin = EXP2\_6  
spi\_software\_sclk\_pin = EXP2\_2

[neopixel btt\_mini12864]  
pin = EXP1\_6  
chain\_count = 3  
initial\_red = 0.1  
initial\_green = 0.5  
initial\_blue = 0.0  
color\_order = RGB

[delayed\_gcode setdisplayneopixel]  
initial\_duration = 1  
gcode =  
SET\_LED LED=btt\_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=1 TRANSMIT=0  
SET\_LED LED=btt\_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0  
SET\_LED LED=btt\_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3

[gcode\_macro G32]  
gcode =  
G28  
QUAD\_GANTRY\_LEVEL  
G28  
G0 X175 Y175 Z30 F3600

[gcode\_macro PRINT\_START]  
gcode =  
G32 ; home all axes  
G1 Z20 F3000 ; move nozzle away from bed

# [gcode\_macro PRINT\_END] gcode = {% set th = printer.toolhead %} {% set x\_safe = th.position.x + 20 \* (1 if th.axis\_maximum.x - th.position.x \> 20 else -1) %} {% set y\_safe = th.position.y + 20 \* (1 if th.axis\_maximum.y - th.position.y \> 20 else -1) %} {% set z\_safe = [th.position.z + 2, th.axis\_maximum.z]|min %} SAVE\_GCODE\_STATE NAME=STATE\_PRINT\_END M400 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-5.0 F1800 ; retract filament TURN\_OFF\_HEATERS G90 ; absolute positioning G0 X{x\_safe} Y{y\_safe} Z{z\_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis\_maximum.x//2} Y{th.axis\_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED\_MESH\_CLEAR RESTORE\_GCODE\_STATE NAME=STATE\_PRINT\_END

Extruder max\_extrude\_ratio=0.266081]

```auto

```

Is this the part you were talking about?

---

<div class="post-metadata">

**Author:** ![Snakn1](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@Snakn1](https://klipper.discourse.group/u/Snakn1)\
**Post date:** [November 2, 2023, 5:46pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/9 "2023-11-02T17:46:16Z")

</div>

Sorry I do not know how to respond… They just work. Notice I do not have any driver for the X or the Y only the definition is needed. For my 2 Z axes and the extrudes that are TMCxxx. I have changed a few things in my config, but that is for the encoder runout sensors… I still can not get all three of them to work, or get one of them to work more then once. But that is for a different post else were…

---

<div class="post-metadata">

**Author:** ![Anatolii](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Anatolii](https://klipper.discourse.group/u/Anatolii)\
**Post date:** [November 2, 2023, 6:05pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/10 "2023-11-02T18:05:15Z")

</div>

Hm… That just may be the answer to all things. ))  
I’m afraid to do any more experiments on current printer, since I had a brick sitting on the table for over 2 months and things to print were just piling up.  
Planning on buying another voron kit and go crazy on that one.  
Thanks againg for your help.

---

<div class="post-metadata">

**Author:** ![Snakn1](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@Snakn1](https://klipper.discourse.group/u/Snakn1)\
**Post date:** [November 2, 2023, 7:31pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/11 "2023-11-02T19:31:17Z")

</div>

I have to ask a dumb question …. did you go thought the stepper’s calibration and setting in the stepper themselves ? they are dumb until you do.

---

<div class="post-metadata">

**Author:** ![Anatolii](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Anatolii](https://klipper.discourse.group/u/Anatolii)\
**Post date:** [November 2, 2023, 7:45pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/12 "2023-11-02T19:45:13Z")

</div>

If you mean the calibration using the 3 buttons on the pcb that is screwed to the back of the motor, then the answer is yes.  
It calibrated doing a full rotation and all was good.  
Problems start as soon as I send g28.

---

<div class="post-metadata">

**Author:** ![Snakn1](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@Snakn1](https://klipper.discourse.group/u/Snakn1)\
**Post date:** [November 2, 2023, 8:23pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/13 "2023-11-02T20:23:38Z")

</div>

please make sure you test it without the steppers in the printer to see it they move in the correct direction. , or if you have the good direction tested and then when it tries to home, try just the x or y only. to make sure it is not the core xy vs core yx it it moves then crashes check the endstops.

Remember troubleshooting first starts with power that you have… them cut the config to the minimal possible. Save you current config, rename it, start with a blank one and just do the x and y steppers. (maybe z) then add back to it

---

<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:** [November 2, 2023, 8:38pm UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/14 "2023-11-02T20:38:19Z")

</div>

> [@Anatolii](#):
>
> Thank you.  
> Found it

**PLEASE** : Always upload things like a klippy.log as a file.

**DO NOT** paste it in like a text.

At lease formate it as `Preformatted text` with the **`</>`** symbol in the editors tool bar.

A: It is way too long  
B: Spaces get lost

Did you have had a look on your post?

> [@LifeOfBrian](#):
>
> Please put such long code fragments between **Preformatted text** tags:

@LifeOfBrian already told you to do so.

---

<div class="post-metadata">

**Author:** ![Anatolii](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@Anatolii](https://klipper.discourse.group/u/Anatolii)\
**Post date:** [November 3, 2023, 6:53am UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/15 "2023-11-03T06:53:02Z")

</div>

I heard your advice and tried uploading as a file, but it was 8.2 mb and would not upload.  
Then I cut out the top part of the file and tried using the Preformatted text tab, hit enter and this happened 😑  
Then I tried to edit and added [], didn’t help.  
I’m sure that I didn’t do something right, just haven’t figured out what yet.

---

<div class="post-metadata">

**Author:** ![LifeOfBrian](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/lifeofbrian/32/2380_2.png) [@LifeOfBrian](https://klipper.discourse.group/u/LifeOfBrian)\
**Post date:** [November 3, 2023, 7:26am UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/16 "2023-11-03T07:26:28Z")

</div>

If files are too big just zip them and upload the zipped file.  
We are mostly dealing here with text files that can be compressed quite well.

Regarding preformatted text you can test it here in the reply window and should see the result on the right hand side.  
Test it with a single word or small text to get familiar with it and then fire it up! 😉

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [January 2, 2024, 7:27am UTC](https://klipper.discourse.group/t/troubleshooting-closed-loop-s42c/10998/17 "2024-01-02T07:27:02Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
