# NPN sensor light will trigger but not stop the Z-axis

**URL:** <https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294>\
**Category:** General Discussion\
**Created:** [December 9, 2022, 9:24am UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294 "2022-12-09T09:24:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ondrej](https://avatars.discourse-cdn.com/v4/letter/o/df705f/32.png) [@Ondrej](https://klipper.discourse.group/u/Ondrej)\
**Post date:** [December 9, 2022, 9:24am UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294/1 "2022-12-09T09:24:50Z")

</div>

Printer Model: Tronxy x5SA ro  
MCU / Printerboard: Manta M8P + CB1  
[klippy.log](https://klipper.discourse.group/uploads/short-url/mvZtr7A47qkPTEtFYeUHbQOdTaS.log) (3.9 MB)

I recently switch the board on my Tronxy x5sa pro to the Manta M8P + CB1 I installed Klipper and when i got to the point where you check the configs as temp and Endstops , . . . . i run to an problem when i run the Query\_endstops i see all Endstops as open, when i manually Triger the X and Y it reacts and i see the message that they are triggered except for the Z the sensor light will trigger when i manually Triger it but in in klipper i see it always as open.

---

<div class="post-metadata">

**Author:** ![Nexxusone](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/nexxusone/32/3566_2.png) [@Nexxusone](https://klipper.discourse.group/u/Nexxusone)\
**Post date:** [January 20, 2023, 9:25pm UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294/2 "2023-01-20T21:25:42Z")

</div>

ever resolve this? have same problem

---

<div class="post-metadata">

**Author:** ![smatthew](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/smatthew/32/3593_2.png) [@smatthew](https://klipper.discourse.group/u/smatthew)\
**Post date:** [January 22, 2023, 8:03pm UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294/3 "2023-01-22T20:03:52Z")

</div>

What version of the Manta M8P are you using? 1.0 or 1.1?

---

<div class="post-metadata">

**Author:** ![Ondrej](https://avatars.discourse-cdn.com/v4/letter/o/df705f/32.png) [@Ondrej](https://klipper.discourse.group/u/Ondrej)\
**Post date:** [January 23, 2023, 6:25am UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294/4 "2023-01-23T06:25:07Z")

</div>

Nope, i change the sensor for an 3d touch

---

<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:** [January 23, 2023, 6:54am UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294/5 "2023-01-23T06:54:13Z")

</div>

Try playing around with the `^` before the pin. Such pins typically require a pull-up. Otherwise start a new thread and post the relevant information.

---

<div class="post-metadata">

**Author:** ![ianf](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ianf/32/13900_2.png) [@ianf](https://klipper.discourse.group/u/ianf)\
**Post date:** [January 26, 2023, 9:53pm UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294/6 "2023-01-26T21:53:47Z")

</div>

Ondrej,

This is the exact printer and board that I happen to be working on. X5SA-PRO 400 with a Manta 8P + CB1. I’m still trying to iron out some issues, but this may be enough to get you going. I’ve attached my config for reference but if your only issue is the proximity sensor you’ll just need this:

[stepper\_z]  
step\_pin: PD7  
dir\_pin: !PD6  
enable\_pin: !PF10  
microsteps: 16  
rotation\_distance: 8  
endstop\_pin: probe:z\_virtual\_endstop \<— important  
position\_min: -5  
position\_max: 400  
homing\_speed: 100  
second\_homing\_speed: 2.5

Proximity switch: Add the pullup jumper on the small pins at the THB socket and set FAN6 to use the 24V supply.

[probe]  
pin: !PF6  
samples: 3  
speed: 2  
x\_offset: -38.5  
y\_offset: -10.0  
z\_offset: 4

If you use my config I have the following custom changes:  
[printer.cfg](https://klipper.discourse.group/uploads/short-url/rXckfUkdVAWXR41sGHcUwV60neh.cfg) (6.3 KB)

1. My extruder rotation distance is for a BIQU H2
2. My probe is in a different location due to the upgraded extruder
3. I couldn’t get THB to read the temperature correctly so the bed is TH0 and E0 is TH1.
4. I’m trying to tweak the TMC2209 config to get the motors quieter. The values are based on Marlin 24V chopper settings, so they’re experimental right now.

---

<div class="post-metadata">

**Author:** ![Ondrej](https://avatars.discourse-cdn.com/v4/letter/o/df705f/32.png) [@Ondrej](https://klipper.discourse.group/u/Ondrej)\
**Post date:** [January 27, 2023, 8:46am UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294/7 "2023-01-27T08:46:16Z")

</div>

Hi thank for the reply,

I changed the sensor for the 3d touch. The original was not a good choice for the lattice glass bed. I could not trust it. But if you have the same board do you control the RGB led ? What spec. has the RGB led strip and what macro do you use to enable it?

with regards  
Ondrej

št 26. 1. 2023 o 23:03 Ian Freislich via Klipper \<[notifications@klipper.discoursemail.com](mailto:notifications@klipper.discoursemail.com)\> napísal(a):

---

<div class="post-metadata">

**Author:** ![ianf](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/ianf/32/13900_2.png) [@ianf](https://klipper.discourse.group/u/ianf)\
**Post date:** [January 27, 2023, 1:09pm UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294/8 "2023-01-27T13:09:47Z")

</div>

I’ve only been using Klipper for 3 days now so I haven’t even looked into macros and LED control. Any NeoPixel strip should work.

The proximity probe isn’t bad, but like you, I installed a 3d touch.

Marlin, original probe and board, glass bed:  
Send: M48  
Recv: M48 Z-Probe Repeatability Test  
Recv: Finished!  
Recv: Mean: 0.022625 Min: 0.016 Max: 0.040 Range: 0.024  
Recv: Standard Deviation: 0.007190

Klipper, M8P, 3d touch, glass bed:  
probe accuracy results: maximum 2.892750, minimum 2.885250, range 0.007500, average 2.889375, median 2.890250, standard deviation 0.002565

---

<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:** [April 7, 2024, 7:26pm UTC](https://klipper.discourse.group/t/npn-sensor-light-will-trigger-but-not-stop-the-z-axis/5294/9 "2024-04-07T19:26:15Z")

</div>


