Setup a touchplate with Dual Endstop MPCNC

Dear all,

As I couldn’t find (maybe I am to dumb for searching) a simple description on how to setup a touchplate, I wrote something together to help others!

As you may know, I am running my MPCNC with Dual-Endstops and it works great.

For the time being, I didn’t use any Z-Endstop or touchplate yet and I always set my worksurface manually.

Today, I had a bit of spare time and I attached two wires to the Z- endstop pin and GND.

I went into the firmware configuration.h and set

Z_MIN_ENDSTOP_INVERTING =true,

I flashed and tested by initiating a Home Z from a save height and then connecting the wires. Z-Homing worked as expected.

Now I attached one wire to the endmill and one to a 2.1 mm thick flat piece of metal.

Then I went to the firmware configuration.h again and uncommented

#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN

and

#define FIX_MOUNTED_PROBE

After that, I set

#define X_PROBE_OFFSET_FROM_EXTRUDER 0
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0
#define Z_PROBE_OFFSET_FROM_EXTRUDER 2.1

This will automatically compensate for the 2.1mm thickness of my touch plate. If your plate is thicker, change this value accordingly.

Now I flashed the firmware again.

VERY IMPORTANT!!

After MPCNC boots up, go to Configuration -> load factory defaults

This sets the correct probe-offset! If you forget this step (like I did), you won’t have the correct Z-height after homing with your touchplate.

 

I homed Z, took the touch plate away and checked the actual Z-position on the display. It showed 2.1 as expected.

Done!

Using my joystick-controlbox https://www.v1engineering.com/forum/topic/manual-joystick-control-fro-mpcnc/, I now can do the complete setting for a new job without using the screen and rotary knob. Love it!

Another hint:

I used a pair of very long, almost untwisted 28 gauge wires to hook up to Z-min.

I faced the issue that my gantry only came down 1-2cm and the went up again. Homing failed. Turned out that I caught noise in the wires which prevented correct homing. First I twisted the wires which helped a bit. Then I went to the firmware again and enabled

#define ENDSTOP_NOISE_THRESHOLD 3

This totally solved the issue for me.

So I hope this helps people to easily get the touchplate going!

 

Cheers

Armin

 

5 Likes

My firmware should work as is, If you use a G92 command with the thickness of your plate it can all be done without touching the firmware. I have a little blurb on the milling basics page I believe. Unless maybe you are doing something different I am not seeing?

Ryan,
if I understand correctly, you issue a G28 Z first (or a G28 X Y Z) and then a G92 Z(thickness) which works fine but needs a terminal input.
With my method, the height adjusts automatically with the homing command (like on any 3d-printer with a probe for the Z- height).
As my machine is not connected to a PC directly, I only have the display and my joystick box. The lesser (correct English?!) inputs I have to make, the more convenient it is for me.

And I am coming from printing! G92 is not very present in the back of my head! LOL!
I totally overlooked the start G-code section in your milling basics with the Z- homing. Sorry for that. And I am also not using a start gcode in Estlcam yet, which would have solved my issue for sure. Still new to CNC machining! Maybe, you can address the Z homing a little bit more prominently and in more detail and maybe you even consider my solution as an alternative way.

Cheers
Armin

I add G92 in my start G-code. That way if I change touch plates for some reason I do not have to reflash the board, I just change it in CAM (starting gcode section). When I am doing metal there is no need for an offset, so for me the value varies.

When using probe mode, you can change offset from the printer menu and save it.

Cheers

Armin

I think you can also do M851 Z-2.1 to save the value in the EEPROM without modifying the firmware. M851 from the Marlin Docs.

Edit: You need to enable EEPROM in the firmware to do this. Looks like EEPROM is disabled by default in github.com/allted/Marlin