Z-Probe / Homing not working

Hey guys,

I am somehow not able to make the touch plate work on my double endstop MPCNC burly.
I connected the signal and ground pin (green and black) on my Ramps 1.4 to the touch plate.
In Marlin both Z-Probe and Z-Min are set to being inverted, so they are NO.
When sending M119 to check it says that ZMin is open.
When sending M119 with the clamp touching the plate it says triggered.
So in theory wiring is okay and it should work.

Yet it does not.
When choosing auto home X and Y home and Z only goes up a few centimeters.
When choosing home Z (in custom comands) the Z axis only goes up a few centimetres. Thats it.
I am assuming that it must be a problem in my Marlin config but I dont know where…

I’m assuming you have the signal pin on the touch plate and the ground on the bit?

From the behavior you’re describing, it sounds like it is triggering too early. Can you set everything up exactly as you are to home and send M119 instead? Do you have your router plugged into the wall? Sometimes the bit is already connected to ground through the wall.

1 Like

Hey Jeff,

I have not the signal pin / the clamp connected to anything. Plus I have unplugged the router from the wall. This was for testing purpose. So I would trigger the homing comand and then touch the plate with the clamp manually just to see if it would stop the movement. But it does not.
If I send 119, as I said, I’ll get the output that ZMin is open.

To be honest, I think it must be in the code somewhere. I checked wiring and everything several times and tried different settings and pins.
I even used a 3-Pin Ramps Smart Switch, unsoldered the micro switch and soldered my touch plate to com and NO on this switch. Nothing helped.

So where in Marlin can I setup homing?
I can invert the switches… What else could I do?

Based on your description, everything is setup correctly. I suspect you have an electrical issue. In a recent post, one person said that touching the plate or clip with his hand triggered the probe, indicating to me that there was a problem with the pullup resistor and perhaps the pin was floating. In another post the person ended up diagnosing an intermittent connection as the problem. You can try a couple of things. First, try z probing while you are not touch the metal of the clip or the plate and see if that makes a difference. Also execute your z probe from a file with an M119 at the start and the the end. Something like this in a .gcode file:

M119
G28 Z
M119

Hi Robert,

thanks for the reply.
I did try probing while not touching the metal but it did not change anything.
But as you talked about floating state and intermittent connection, I had the ideo of just testing homing with nothing connected to ZMin - and voila - it did work. If nothing is connected to ZMin the axis moves down.
Now the question is - why?
The 4 other endtops are wired in the exact same way and they work. Why on earth does it not work for the 5th endstop?
Any idea how to solve the problem?

Something is strange here and to me it still reeks of an electrical issue. That is, if nothing is connected and it homes, then the NO configuration is correct. So I see one of three possibilities. First, there is an intermittent connection somewhere in your touch plate wiring. Second, you have the probe incorrectly plugged into the board (which is dangerous for some boards). Or third, the pullup resistor for the pin is not working.

In the Arduino based boards, there are internal resistors that Marlin enables that pull the signal pin high. Shorting between the signal pin and ground (such as connecting to the touch plate) pulls the pin low. If for whatever reason, the pullup resistor is not doing its job, then the pin is floating…neither low nor high and can generate random readings.

You can play with the M119 and various manipulations of the wiring to get an idea of the problem. If you have a couple of Dupont wires, then you can eliminate the touch probe in the circuit and test homing by just touching the connectors together. If it is a floating pin, then you fix the problem by wiring a 20k to 40k resistor between the signal pin and the 5V pin.

I can understand wanting to find an issue in the software. But from my experience, that part of the code is very solid (many mamy people hav had issues with homing and it hasn’t ever been the software that I am aware of). It isn’t impossible, but electrical issues are 100x more likely, IMO.

The M119 is also very reliably exactly the same mechanism as triggering for the homing. If it is showing open in M119, then it will move when told to home.

I think there must be some subtle difference between when you’re homing and when you’re checking M119. Maybe something like where you are touching it. It should be more reliable than that, but that would at least explain the issue.

I would do like 20 more M119s and try to find some scenario where it triggers when it shouldn’t.

Hey guys,

I finally solved it… It was the cable…
The cable I used to connect the board and the endstop/servo was around 1metre long because I used a 6 wire cable and 6 pin connetors to to have one cable/ connector for X1, X2, Y1, Y2 and Z each…
It worked for X and Y but for no reason not for Z.
I now have much shortes cable for the Z-enstop that goes directly from the board to the probe and this works flawlessly!

3 Likes

That’s great news. The XY are wired NC, so they are much less susceptible to noise. But that isn’t possible for the Z. So that solves the mystery, it was intermittent noise.

Thanks for posting back the answer to your problem. Often folks on the forum brainstorm ideas about a a posted problem, then nothing…and we never know how/if the problem was fixed. So my curiosity and future people with a similar problem searching the forum thank you.

2 Likes

Hi Jeff,
in fact X and Y are NO in my build and it still works… The cable here is around 80cm, the Z-cable ist a bit more than 100 cm and that seems to make all the difference! Very strange…

@robertbu
In my opinion the idea of a forum is to collect knowledge… being a database… If I ask for help and get people to brainstorm, I think I do owe them an answer as their help was done voluntarily… But then I guess there are quite a few people who just want their problem solved…

Anyhow, it seems Z-homing seems to trouble many (there are quite a few threads here) and this now is another piece of the puzzle…

I had this same problem that only showed up when I went from a 12VDC to 24VDC PSU. It was rock-solid with 12V but erratic and unreliable with 24V. A shorter cable appears to have done the trick.

Just a followup…my touchplate would work well when I first fired up the machine but would become erratic again after running the machine for awhile. I have a dust shoe and I noticed static electricity around the the vac hose. I grounded (earthed) the negative side of the 24VDC PSU and the touchplate operation has been rock solid ever since. I think without a proper ground reference the PSU DC voltage was floating and possibly being affected by the static generated by the vac system.

1 Like

Hello. I have the same problem. Only when i diconnect the z-probe it works well. I also tried to connect a simple cable but then here is the problem again. X and Y axis woking well. What can i do? I still have changed the ramps board with another one. No changes.

Ramps 1.4 board with dual endstops.

Thanks for helping.

I think you need to explain in more detail what is going on. Reading between the lines, it does not sound like the same problem. Consider opening a new topic with an expanded description rather than appending to an old topic.