Autobed leveling not working on my Prusa I3! I have installed and connected a

Autobed leveling not working on my Prusa I3! I have installed and connected a SN04-N2 proximity device. Wiered as below. When triggered it goes from 0 to 4.4v, so that should be good. I have connected the Zmin to my zmin’s “S”. Nothing happens. Sending M119 it always shows as open. Attaching a swich I get triggered when pushing that. What have I misunderstood ? I would have assumed that the 4.4v would count as high/triggered!

a1c2cf5bd657289db85acd614ac9c1ef.png

Its maybe to low, 4,4v. Its not better to have 5v?

I think anything above 3.3v should be good ?

You could also replace the 10k resistor with a 4.7v zener diode.
Your logic levels should be ‘low is below 1/3 of Vcc, high is above 2/3 of Vcc’

Hmm, when not triggered I read 3v when triggered I read 4.75v… So guess I might need to pull the 3v down some ?

@Mads_Storm_Andersen that’s what it sounds like. Almost like you’ve got some gate leakage on the sensor. The arduino will read voltages as low as 2.7v as a logic high. (Honestly, this is why I like PNP sensors - literally just a 1N4001 diode on the ground-triggered line and any input voltage. No need to do voltage dividers, etc.)

Sounds like I need to “upgrade” to a pnp sensor. Since this is driving me mad:)

But got it to work. But with low 1.3 and “high” is 2.3