# Sensorless Homing on Manta M4P not working

**URL:** <https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584>\
**Category:** General Discussion\
**Created:** [May 23, 2025, 3:28pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584 "2025-05-23T15:28:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![reaver993](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@reaver993](https://klipper.discourse.group/u/reaver993)\
**Post date:** [May 23, 2025, 3:28pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/1 "2025-05-23T15:28:40Z")

</div>

### Basic Information:

Printer Model: Ender 3 Pro  
 MCU / Printerboard: BTT Manta M4P  
 Host / SBC: BTT CB1  
 [klippy (2).log](https://klipper.discourse.group/uploads/short-url/fEMK6NWsKg5jdR3hMfswmj7AyDN.log) (100.7 KB)

### Describe your issue:

Hello, im setting up a Manta m4p on my ender 3 pro with sensorless homing,  
For some reason its not working everytime the stepper motor gets to the home position it wont stop moving and grind against the limit.

I had to configure the diag\_pin: ^!PC0 negated, otherwise the virtual endstop is always triggered.

Here how i configured my printer stepper motor:

```auto
 [stepper_x]
step_pin: PC6
dir_pin: PA14
enable_pin: !PC7
microsteps: 16
rotation_distance: 40
#endstop_pin: ^PC0
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 0
position_max: 235
homing_speed: 50
homing_retract_dist: 0

[tmc2209 stepper_x]
uart_pin: PB12
run_current: 0.700
stealthchop_threshold: 999999
diag_pin: ^!PC0
driver_SGTHRS: 255

```

I followed BTT docs and added the jumpers to the J23 , J31, and J40 pins, removed the physical limit switch connectors and put the 2209 drivers in UART mode.

Unless its an hardware fault, i really don’t know how to debug this problem.  
I don’t know if it would help but the physical switches works fine.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [May 23, 2025, 4:16pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/2 "2025-05-23T16:16:09Z")

</div>

You need to adjust your `driver_SGTHRS` value - having at at 255 is much too high.

The value is generally unique to the situation (ie dependent on motor, current setting, pulley diameter, etc.). Start at 128 and change the value by 10 or so until you get good operation. It’s a bit of an art but with some patience you’ll get there.

Remember to restore your `PC0` pin to the original value before changing `driver_SGTHRS`.

---

<div class="post-metadata">

**Author:** ![reaver993](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@reaver993](https://klipper.discourse.group/u/reaver993)\
**Post date:** [May 23, 2025, 4:43pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/3 "2025-05-23T16:43:04Z")

</div>

Resetting ^!PC0 to ^PC0 makes the endstop always triggered, so the printer wont home.  
For the driver\_sgthrs, i’ve tryed starting from 128 got as low as 20 and up to 200, the endstop is always triggered therefore no homing is performed by the printer.

Then i also tryed with ^!PC0 and starting from 128 got as low as 20 and up to 200 and nothing changed, now the homing works, but the stepper motor wont stop.

Edit:  
Can my stepper motors wiring be the problem? the wiring is the stock from ender 3 pro stepper motors, maybe i need to check the connections??

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [May 23, 2025, 6:27pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/4 "2025-05-23T18:27:54Z")

</div>

Do you have the DIAG jumpers in place? You should not need the pull up enabled (the “^”).

---

<div class="post-metadata">

**Author:** ![reaver993](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@reaver993](https://klipper.discourse.group/u/reaver993)\
**Post date:** [May 23, 2025, 6:44pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/5 "2025-05-23T18:44:08Z")

</div>

Yes DIAG jumpers are in place, also removed the pullup from the pin nothing changes, same behaviour

---

<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:** [May 23, 2025, 7:53pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/6 "2025-05-23T19:53:48Z")

</div>

> [@reaver993](#):
>
> Yes DIAG jumpers are in place,

I assume you have the correct ones:

 ![grafik](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/3/f/3fc2295f4132c151bb8b28f17152f7c25d229ad5.jpeg)

Not only those for the stepper voltage:

 ![grafik](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/d/4/d41564a680126c1b919dfb8913c4dfe1dc01774f.jpeg)

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [May 23, 2025, 8:09pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/7 "2025-05-23T20:09:02Z")

</div>

> [@reaver993](#):
>
> Yes DIAG jumpers are in place, also removed the pullup from the pin nothing changes, same behaviour

I presume you mean you removed the pull up from the pin _definition_. You shouldn’t be modifying the board.

Please review what @EddyMI3D put in AND you might want to try lowering the current used during sensorless homing - I use 0.3A to 0.5A on my printers.

---

<div class="post-metadata">

**Author:** ![reaver993](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@reaver993](https://klipper.discourse.group/u/reaver993)\
**Post date:** [May 23, 2025, 8:14pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/8 "2025-05-23T20:14:08Z")

</div>

Yes , by removing pullup i intend removing the ^ from the pin definition in printer.cfg. I do not intend to modify the board as i dont have the knowledge to do so.

@EddyMI3D yes i did put the jumpers on the pins specified in BTT Wiki just above the voltages jumpers , the voltages jumpers where already in that position where i received the board, never touched them.

I will try to change the current of the steppers and give feedback

---

<div class="post-metadata">

**Author:** ![reaver993](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@reaver993](https://klipper.discourse.group/u/reaver993)\
**Post date:** [May 24, 2025, 12:06pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/9 "2025-05-24T12:06:53Z")

</div>

Hi everybody,

@mykepredko i lowered the voltages on the steppers, but no luck its not working

Here you can see the jumpers for the DIAG pins  
(I removed my drivers for clearance)

 ![IMG_1787](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/a/9/a9bf978c18db301b388511f67ea63208ae7dbbc8.jpeg)

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [May 24, 2025, 3:12pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/10 "2025-05-24T15:12:49Z")

</div>

You lowered “Voltage” or “Current”? It should be current.

Thank you for the image of the jumpers - they appear to be set correctly.

Could you explain the process you’re using to test sensorless homing as well as the values you’re using for the `driver_SGTHRS` and `run_current` parameters?

I would suggest that you just start with the X axis and go on to the Y axis when that is working.

---

<div class="post-metadata">

**Author:** ![reaver993](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@reaver993](https://klipper.discourse.group/u/reaver993)\
**Post date:** [May 24, 2025, 3:43pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/11 "2025-05-24T15:43:20Z")

</div>

I lowered the run\_current on the printer cfg from 0.7 to 0.3.

To test the sensorless homing, i simply change the driver\_SGTHRS starting from 128.  
Lowering or raising the driver\_SGTHRS does not make any difference the result is always the same:

The x axis will go to 0, and then the stepper wont stop, causing the toolhead to repeatedly hit the x axis limit switch (which is not connected to the motherboard and i plan to remove) so i must hit the emergency stop button on the web interface.

Now i tried not to stop to see what happens and the console gives me this:

> No trigger on stepper\_x after full movement

Just for reference i leave here my current x axis configuration:

```auto
[stepper_x]
step_pin: PC6
dir_pin: PA14
enable_pin: !PC7
microsteps: 16
rotation_distance: 40
#endstop_pin: ^PC0
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 0
position_max: 235
homing_speed: 50
homing_retract_dist: 0

[tmc2209 stepper_x]
uart_pin: PB12
run_current: 0.300
stealthchop_threshold: 999999
diag_pin: !PC0
driver_SGTHRS: 80

```

---

<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:** [May 24, 2025, 4:32pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/12 "2025-05-24T16:32:01Z")

</div>

Pease attach a recent klippy.log to your next post.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [May 24, 2025, 4:55pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/13 "2025-05-24T16:55:25Z")

</div>

> [@reaver993](#):
>
> I lowered the run\_current on the printer cfg from 0.7 to 0.3.
> 
> To test the sensorless homing, i simply change the driver\_SGTHRS starting from 128.  
> Lowering or raising the driver\_SGTHRS does not make any difference the result is always the same:

How many values did you set `driver_SGTHRS` to?

In my post above, I wrote:

> [@mykepredko](#):
>
> The value is generally unique to the situation (ie dependent on motor, current setting, pulley diameter, etc.). Start at 128 and change the value by 10 or so until you get good operation. It’s a bit of an art but with some patience you’ll get there.

Again, the current and `driver_SGTHRS` values are unique to each situation. It takes a while and some experimentation to get it right.

When I do it, I set up a table to record the current and `driver_SGTHRS` settings that I’ve tried and use the results as clues as to figure out what values to try next.

---

<div class="post-metadata">

**Author:** ![bozzo](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@bozzo](https://klipper.discourse.group/u/bozzo)\
**Post date:** [May 24, 2025, 8:08pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/14 "2025-05-24T20:08:41Z")

</div>

> [@reaver993](#):
>
> To test the sensorless homing, i simply change the driver\_SGTHRS starting from 128.  
> Lowering or raising the driver\_SGTHRS does not make any difference the result is always the same

Did you try setting it way up to 250? In that case the toolhead should not even start.

---

<div class="post-metadata">

**Author:** ![reaver993](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@reaver993](https://klipper.discourse.group/u/reaver993)\
**Post date:** [May 25, 2025, 5:05pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/15 "2025-05-25T17:05:40Z")

</div>

@bozzo yes i’ve tried , the toolhead moves to get to the zero position.

@mykepredko i started from 128 as suggested, doing -10 steps to until i got to around 28, same for +10 and i reached 228, i also tried 0 and 255 just in case.  
Can you share any guide on how to tune this value? Anyway i thought that lowering would result in a less sensitive stepper and raising it should make the stepper more sensitive am i right?

@EddyMI3D [klippy (3).log](https://klipper.discourse.group/uploads/short-url/589V67aGeNUFeJN8aZRXHQnIbMf.log) (61.3 KB) here my latest klippy log.

I don’t know if a can share links from google drive, but :

> **[IMG\_1789.MOV](https://drive.google.com/file/d/1tlR-hKdd9GuDA1M3qzz8xLRCqfaR-3Qx/view?usp=sharing)**
>
> Google Drive file.

there you go, this a video i made yesterday.

Anyway thanks for the really fast answers and suggestions, never happened to me in a forum before. 🙂

---

<div class="post-metadata">

**Author:** ![nefelim4ag](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/nefelim4ag/32/2387_2.png) [@nefelim4ag](https://klipper.discourse.group/u/nefelim4ag)\
**Post date:** [May 25, 2025, 6:08pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/16 "2025-05-25T18:08:10Z")

</div>

FWIW,  
It could be tricky if done blindly and without at least knowing the motor characteristics.  
Also, Klipper literally enables and disables diag pins on homing, which adds confusion on top of that.  
And because it generally works, it is really hard to redo this thing, I suspect there will be no functional changes until homing is reimplemented in Klipper.

There is a PR with the Stallguard monitoring tool which could shine light on the actually SG values while motor is spinning.

> <https://github.com/Klipper3d/klipper/pull/6592>
>
> Hi, as https://github.com/Klipper3d/klipper/pull/6139 is merged, I can now show …the stall guard measurement stuff.
> I'm not sure that it is the perfect solution to poll without batch processing, and not sure about timings/frequency.
> I try to mimic ADXL345 code, to avoid adding any new complexity.
> My \[discourse thread\](https://klipper.discourse.group/t/tmc-coolstep-and-how-to-make-it-works) with more graphs, and some comments.
> 
> So, there is the problem that I'm trying to solve:
> Coolstep is simple and hard to configure because there is no near real-time visibility from the user side.
> The original TMC solution is to directly reproduce and measure your load.
> We can't see Stallguard pin output outside of homing actions, to track stalls.
> But we can poll it.
> 
> \*And there are many different printers and half of them now are CoreXY, which makes things tricky here.
> 
> High-level solution:
> \- Monitor driver for status
> \- Store History with stallguard/speed/current data.
> \- Make it human-readable.
> 
> For now, I added the command: \`MEASURE\_STALLGUARD STEPPER=\<stepper\>\`
> It will start to poll/filter/store data, and on the second call - store them in csv.
> \`\`\`
> cat /tmp/stepper\_y-20240515\_024227.csv 
> \#time,velocity,sg\_result,csactual
> 43668.927338,191.3,67,30
> 43668.952901,203.8,67,28
> 43668.977954,203.8,67,28
> 43669.003832,203.8,67,28
> 43669.363363,203.8,74,27
> \`\`\`
> 
> There is a dump script for data processing:
> \`\`\`
> scripts/calibrate\_stallguard.py /tmp/stepper\_y-20240512\_010858.csv -o ~/klipper/stepper\_y-20240512\_010858.png
> \`\`\`
> Example output for one hour print with CoolStep enabled, unfiltered, cumulative graph.
> \`\`\`
> ~/klipper/scripts/calibrate\_stallguard.py stepper\_y-20240515\_004650.csv -o stepper\_y-20240515\_004650\_cumulative\_unfiltered.png -e 100000
> \`\`\`
> !\[image\](https://github.com/Klipper3d/klipper/assets/3943460/63123584-197e-484f-be7b-55d1fb596335)
> As you can see there is crazy noise on low velocities, also there are crazy speeds calculated from step timing - possibly because of step compression.
> 
> Let's filter that, and analyze it together. (min 1 mm/s, max 200 mm/s)
> \`\`\`
> ~/klipper/scripts/calibrate\_stallguard.py stepper\_y-20240515\_004650.csv -o stepper\_y-20240515\_004650\_cumulative\_low.png -s 1 -e 200
> \`\`\`
> !\[image\](https://github.com/Klipper3d/klipper/assets/3943460/bf85e671-cad7-45fb-b13f-5253ecd1e94f)
> There is StallGuard noise below ~35 mm/s - not enough back EMF.
> The suggested SG range for StallGuard2 is in range 0..100, assuming there is more or less correct SGT (-10..0..10) value (mine is 1 or 2, depending on the motor).
> We can track min & mean SG value, till they stabilize.
> Min becomes zero on speeds above ~125 mm/s (\> 3 RPS)
> Mean becomes acceptable slightly early at ~80 mm/s. (2 RPS)
> \*CS is 31 on TMC5160 with reasonable sense resistor and equal CS max here.
> The minimum threshold for Coolstep is 32, because SEMIN must be \> 0, SEMIN = 1, (SG = SEMIN \* 32)
> 
> So, I picked up the value 150 mm/s as a threshold with a safe margin, and I know my printer is limited to 1000 mm/s.
> (let's just ignore high-speed diagonal moves here)
> 
> So, the last one with adequate range.
> \`\`\`
> ~/klipper/scripts/calibrate\_stallguard.py stepper\_y-20240515\_004650.csv -o stepper\_y-20240515\_004650\_cumulative.png -s 130 -e 1000
> \`\`\`
> !\[image\](https://github.com/Klipper3d/klipper/assets/3943460/b8dcfb98-824f-4eac-976c-2b2d4a328d36)
> Mean SG is around ~60, if SG is above 64 current can be reduced SEMIN=1, SEMAX=0 ~ (SEMIN + SEMAX+1)\*32
> If below 32, the current should be bumped up.
> 
> There we are, with enabled CoolStep there is a mean CS of around 25 and min down to 16, because of SEIMIN=0 (50%).
> 25/31 \* 100 = 80 %, 20% current reduction on medium velocity moves.
> 
> There is missing part, I didn't test the "high" velocities where backEMF is too big, because for me they are \[too large\](https://www.reprapfirmware.org/emf.html).
> !\[image\](https://github.com/Klipper3d/klipper/assets/3943460/6a2422d0-ba21-4bc6-861b-d43d3f350f6c)
> So, I can suggest assuming half of the supply voltage as back EMF is a safe margin, according to the graph.
> Because up to 1000 mm/s there is still adequate response from CoolStep in my test.
> 
> \---
> My 2 cents:
> I have only TMC5160 48V & TMC2209, so only this combination was tested.
> The motors are LDO 2504AC.
> I initially tuned SGT values by sensorless homing.
> I so far have no issues with Coolstep, with almost default values.
> CoolStep threshold will control sensorless homing, and IIRC, sensorless homing speed must be above that threshold.
> On my printer, sensorless homing works fine with 50 mm/s, but with CoolStep at such a low threshold and with allowed reduction SEIMIN=1 (25% of CS) leads to skipping steps.
> With an extruder, CoolStep can work, but its usefulness really depends on setup and extrusion flow.
> On orbiter 2, flow shall be above 25 mm3^s. to get 2 RPS.
> 
> Will be happy to hear any feedback, even if these things are useless.
> Thanks!
> 
> Raw data:
> \[stepper\_y-20240515\_004650.csv\](https://github.com/Klipper3d/klipper/files/15315327/stepper\_y-20240515\_004650.csv)

From a configuration tuning perspective, it is more or less straightforward.  
You first need to get the diag pin working, it could be hard, but it should start to at least trigger on high sensitivity, and it does not trigger on low.

Then, the only problem that you would have is literally the sensitivity configuration.  
You generally want to have backEMF not zero, around 1V is already nice.

> **[RepRapFirmware.org](https://www.reprapfirmware.org/emf.html)**

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/4/a/4a22a20573b8ca16db6f4e1df8f95e2b8730ce42.png)

You generally want to understand how your SG value behaves.  
Because, as stated in the PR and in the initial topic, it is tricky and speed-dependent, obviously.

> [@TMC Coolstep and how to make it works](https://klipper.discourse.group/t/tmc-coolstep-and-how-to-make-it-works/16259):
>
> Hi, I spent some time under the hood, klipper has a nice codebase. So, I made TMC CoolStep work and also made some tools to measure live driver values (similar to ADXL345). There are some graphs of XY. A bit of explaining: They are cumulative - no time here only value distribution CS is the actual current scaler max value 31 (or IRUN) SG is stall guard live measurements. I had TMC5160 with ~48V power for reference, LDO…

Also, you have to be aware that Stallgurad4 used in TMC2209 is different to Stallguard2 used in TMC5160/2130, so they works and tunes slightly differently.

Also, because SG4 uses the StealthChop, there could be a minimum current limitation.  
Like, with high probability, your low current settings have zero effect.

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/1/3/13161115ecb268a66d0e5b5c503f96f7c5830ffa.png)

So, for example, with current defaults, where PWM\_FREQ==0 (2/1024) and TBL == 2 (32).

```auto
Vm / VoHm * PWM_FREQ * TBL = Imin
24 / 2 * 2/1024 * 32 = 0.75A 

```

(I don’t know your motor parameters or supply voltages, so you could verify it for your installation).

Also, there is a trick, like with high motor inductance and high acceleration, the motor could trigger early. It could be workarounded by decreasing current, by setting the COOLSTEP threshold \>20mm/s as is done on some Prusas.

Hope that helps a little.

* * *

BTW, it obviously should be generally easier to do on the Cartesian machines where the 1 motor drives one axis.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [May 25, 2025, 8:03pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/17 "2025-05-25T20:03:43Z")

</div>

Just looking at your latest `klippy.log` - why are you inverting the `DIAG` pin:

```kcfg
[tmc2209 stepper_x]
uart_pin = PB12
run_current = 0.300
stealthchop_threshold = 999999
diag_pin = !PC0 # <=== Why is this inverted?  
driver_sgthrs = 120

```

You should just leave it as:

```kcfg
diag_pin = PC0  

```

I’ve watched your video - what happens if you start with the gantry in the middle position, not close to the end?

Finally, are you using TMC2209 chips on the Z Axis and Extruder? If you are, why don’t you specifiy the `[tmc2209` statement?

---

<div class="post-metadata">

**Author:** ![reaver993](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@reaver993](https://klipper.discourse.group/u/reaver993)\
**Post date:** [May 25, 2025, 9:23pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/18 "2025-05-25T21:23:13Z")

</div>

@nefelim4ag thanks for the detailed infos, honestly i dont know much about 3d printers stuff just a beginner so it would take some time to understand everything you wrote anyway appreciated.

@mykepredko the DIAG pin is inverted because otherwise querying its status show that the x endstop is always triggered, and the result would be that when clicking the homing x button the current head position will become the new home position.

I am using tmc2209 on every axis and extruder, dont mind y,z and extruder because i am only testing on the X axis.

But i could try to complete the configuration on every axis and then test every axis, maybe the problem is isolated only on the x axis… i’ll test and give feedback in the next days.

EDIT:  
this is my current x axis stepper motor:

> **[All You Need to Know about Bj42d15-26v09 Stepper Motor Datasheet](https://infodatasheet.com/bj42d15-26v09-stepper-motor-datasheet.html)**
>
> All You Need to Know about Bj42d15-26v09 Stepper Motor Datasheet

on my y axis i have this:  
[https://electrowizard.net/bj42d15-26v10-stepper-motor-datasheet](https://electrowizard.net/bj42d15-26v10-stepper-motor-datasheet)

and for z axis i need to unmount them from the frame, i dont have time right now.

So now that i have the datasheet i will try to check every wire to see if the pinout is correct compared to the manta m4p pinout for the stepper motors, just in case to exclude any hardware related problem. i’ll let you know in the next days

---

<div class="post-metadata">

**Author:** ![nefelim4ag](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/nefelim4ag/32/2387_2.png) [@nefelim4ag](https://klipper.discourse.group/u/nefelim4ag)\
**Post date:** [May 25, 2025, 9:38pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/19 "2025-05-25T21:38:09Z")

</div>

> [@reaver993](#):
>
> its status show that the x endstop is always triggered

> [@nefelim4ag](#):
>
> Also, Klipper literally enables and disables diag pins on homing, which adds confusion on top of that.

You can’t query it status from web or from console, like never.  
Because for sensorless homing diag pin on the driver is only active while axis in homing.  
Not before and not after.

This is the sort of confusion what I’ve talked about 🙂

> **[Configuration reference - Klipper documentation](https://www.klipper3d.org/Config_Reference.html#tmc2209)**

```auto
#diag_pin:
# The micro-controller pin attached to the DIAG line of the TMC2209
# chip. The pin is normally prefaced with "^" to enable a pullup.

```

As pointed in the config reference, there is no inversion on tmc2209.  
That is it.

To make it clear, for TMC2209, your diag pin should look like that:

```auto
[tmc2209 stepper_x]
diag_pin: ^PC0

```

---

<div class="post-metadata">

**Author:** ![reaver993](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@reaver993](https://klipper.discourse.group/u/reaver993)\
**Post date:** [May 25, 2025, 9:58pm UTC](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584/20 "2025-05-25T21:58:55Z")

</div>

> [@nefelim4ag](#):
>
> You can’t query it status from web or from console, like never.  
> Because for sensorless homing diag pin on the driver is only active while axis in homing.  
> Not before and not after.

Ok , now i understand.

> [@nefelim4ag](#):
>
> To make it clear, for TMC2209, your diag pin should look like that:
> 
> ```auto
> [tmc2209 stepper_x]
> diag_pin: ^PC0
> 
> ```

This was my initial config, which i copied from the klipper config, but seeing it not working i started to mess around with it. i will now keep it as ^PC0.

[Next page](https://klipper.discourse.group/t/sensorless-homing-on-manta-m4p-not-working/23584.md?page=2)
