Z Probe with Piezo element errors
Hi there. I have been having trouble getting Repetier FW to play nicely with my precisionpiezo board, but I can't get it to trigger/untrigger properly. The board is tuned in that it detects taps but not so much as to induce false positives. I have made posts on the RepRap Forum piezo thread to no avail, which I render below. https://reprap.org/forum/read.php?1,767998,850895#msg-850895
I have a 27mm piezo sensor on a Rostock Max, but I can't seem to get it interfaced with my RAMBo and Repetier Firmware properly.
I've reflashed the firmware many times, each time changing a setting. I have tested an entire matrix of probe/endstop settings.
I'm certain it is wired correctly from Piezo20 to RAMBo, as I color coded the connectors, and I verified the piezo is in the proper polarity (no trigger on pressure release)
In Repetier Firmware I've tested all combinations of true/false for Z_PROBE_ON_HIGH, ENDSTOP_PULLUP_Z_MIN, and inverted Z Min logic. No matter what it either gives me Z probe triggered before probing, or the Z probe didn't untrigger on repetitive probe; only in two instances of the second situation did the carriage actually do a probe plunge and not raise instantly.
The only thing I kept constant was that Z probe pin is the Z Min pin, and ENDSTOP_Z_MIN = true. I realize that the Piezo20 works by pulling SIG low, thus requiring pullup, but I wanted to test it anyways.
Result denotes a scenario: 1 is triggered before probe starts error. 2 is probe didn't untrigger on probe. The letter in that column denotes the physical movement made after G30 P0 was sent. P is where the effector actually descended and touched an object, whereas i occurs in a configuration that caused instant raising of the probe.
ENDSTOP_Z_MIN_INVERTING | Z_PROBE_ON_HIGH | ENDSTOP_Z_MIN_PULLUP | M119 TRIGGERED (BLUE) ZMIN/PROBE | RESULT | M119 UNTRIGGERED RED ZMIN/PROBE |
X | X | Y | L/L | 1i | L/H |
Y | Y | Y | L/H | 2i | L/L |
Y | X | Y | L/H | 2p | L/L |
X | Y | Y | L/L | 1i | L/H |
X | X | X | L/L | 1i | L/H |
Y | X | X | L/H | 2i | L/L |
X | Y | X | L/L | 1i | L/H |
Y | Y | X | L/H | 2p | L/L |
Comments
I think the SIG pulldown must last longer than 3 steps because the blue LED which is tied to the signal stays lit long enough for a human eye to see. It's also slow enough to reset that Moriquendi (board designer) suggested a slow multimeter should be able to measure it to some degree.
Since M119 is not a solution for testing try enabling debug endstops if you are using recent version (not sure when I added this).
M111 S71
should enable it and report every end stop change detected. Be aware that this can crash firmware if you have many changes in a row. But at least you know that it gets detected.
I changed the firmware to enable pullup, Z probe on high, and Z min inverting.
It reported during G30 P0 that when I tapped, Z probe was H. It then gave me "untriggered" error; after that message it reported Z probe went L.
Does Z probe on high actually do what I think it does? (makes Z probe logic see 5V as inactive and 0V as active.)
But I think I see what goes wrong. Switching to high is working from your message. Now firmware expects that when you move back the signal is off. But your sensor does not go off directly - it has a fixed time of high signal and when the test is done it is still high causing the error. So you need to wait a bit before retrying next measurement.
must be > 0 in your case. How big is what you need to test. That is quite new, so search in your sources if it is already there in 1.0.2. With the right delay the untriggered message should disappear.
I am aware you added this setting purely for the purposes of piezoelectric sensor users, and this is the behavior that seems to be intended:
https://github.com/repetier/Repetier-Firmware/issues/686
The feature requested by DjDemonD (of precisionpiezo) was a delay BEFORE probing, although he does not use Repetier himself.
Anyways, Moriquendi has said that the output pulse of this board is around 200 milliseconds. During the triggered state, Piezo20 PCB pulls SIG to 0V for 200ms, then returns to untriggered at higher voltage.
Ideas? It appears I need negative logic, so Z_PROBE_ON_HIGH is incorrect despite its seeming to work since you said it makes the firmware see high voltage as triggered.