Homing the axis

Hi all… couple of items I could use some advice on. I now have a running machine and I want to add limit switches so that I can home the axis. I am using these switches: https://www.amazon.com/gp/product/B06XTB7WMK/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1

  1. How do I reverse the Z home direction? Right now it is going.
  2. Are there any existing limit switch clamps for 23.5 build... something that can be attached without removing my pipe?
  3. Z limit switch mount suggestions?
Thanks in advance!


I mounted my limit switches to the rollers and made a “flag” that clamps on to the rail. My MPCNC is a 25.4 size.

@Ryan has a better way to mount the limit switch to the roller bolts. I prefer my “flag” because it is a fixed distance along the rail (although not adjustable like Ryan’s)

Here is a picture of my setup

[attachment file=64192]

thx JD… I have already spent a lot of time bundling my wires so adding the limit switches to the rollers is not my first choice. I am working in Fusion 360 to create a switch mount that attaches to the rail AND lets me add it without removing the rails. There is one version on Thingiverse that works but requires me to remove the rails. I am going to leverage that approach but make it in two pieces. I did add the dual mount stops so I might use them as the stop. GG

I’m pretty sure Ryan has one that clips on to the rail without removing the rails.

1 Like

This one. It works well, just don’t go gorilla tight on the clamping screw. You really don’t need much force to keep it from moving.

Thx Mike… I ended up designing a two piece clamp with an offset for the switch so that the switch makes contact before hitting the roller. It works well. I didn’t have to remove the rails to put it on. As a side note, all my feet need to be replaced because I tightened & loosened the screws several times. I ended up cutting my legs down to 8 1/2 inches to minimize flexing. In the processes of removing twice the feet and corners have suffered. thx again! GG

OUCH… I was not aware that there had to be a limit switch for each motor on an axis. I thought because they are wired in parallel (I think… I just connected them as is) that they would both stop. Now each time the limit is hit the axis goes out of square. Any suggestions before I add more switches?

Thx in advance!


It is best not to use them, really. The only way they make sense is with the dual endstop firmware, there is no other way to get it that accurate. We all used it for years with no endstops. It does 99% of common things without them.

Ok got it… I am just geeking out…

I have also set up endstops for X and Y axis primarily to ‘home’ to and they work fine with the limit switches. However the Z home is a puzzle. I can manually place it where I want it, turn on the Rambo 1.4 board, connect to Repetier Host and send a G92 X0 Y0 Z0 for Rambo, as well as @isathome for Repetier. If I push Z home in Repetier or on the Rambo controller that axis will try to find its way through the floor before it’ll stop. I’ve also made a little button endstop for the printer head, mapped out an auto level grid of my build surface and stored it with M500 to the EEPROM and designated -8.2 mm as a Z offset in the firmware. If I hit Z home or All home, that Z will head to The Floor again. Much unhappiness and emergency stops. Any suggestions?

Can you test the Z endstop with M119?

Just to clarify, you do have an endstop or touch plate connected to the Z axis endstop connection of the controller right? The homing function actually has to trigger some form of electrical contact to stop the movement.

I found a little printable mount for a mini button endstop switch on Thingiverse and can mount that right on the end of the extruder hot end. That adds 8.2mm to the end of the extruder. Activating G29 for mesh bed leveling works very well apparently as it touches 9 points on the build surface. Then I send a M500 to store the info in EEPROM

M119 reports the switches as all open

09:55:42.674 : N17 M119*28
09:55:42.680 : Reporting endstop status
09:55:42.680 : x_min: open
09:55:42.684 : x_max: open
09:55:42.684 : y_min: open
09:55:42.684 : y_max: open
09:55:42.684 : z_min: open

I wired my ZMin/probe endstop button as NO so I don’t have to leave it plugged in and can use a different switch configuration for a router.

Configuration.h file for Endstops:

//============================== Endstop Settings

// @section homing

// Specify here all the endstop connectors that are connected to any endstop or probe.
// Almost all printers will be using one per axis. Probes will use one or more of the
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
//#define USE_ZMAX_PLUG

// coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined

// Mechanical endstop with COM to ground and NC to Signal uses “false” here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. MPCNC
#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. MPCNC
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. MPCNC //JeffH
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. MPCNC
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. MPCNC
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. MPCNC //JeffH
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.

// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.

Cute as a button…

You should use a touch plate, the tip of the collet doesn’t give you any Z information. An alligator clip and some metal will locate the tip of the bit, which changes every time you load a new one. Buttons and switches only work for a stationary work point (extruders and lasers).

Sorry, didn’t register with me that this was with an extruder, I don’t know if that changes anything firmware wise. I have only used with router or laser.

But, M119 while you are holding the button closed reports open still or showing closed? I use NO for Z axis as well, that way when the bit contacts it goes closed.

Use an alligator clip on the extruder nozzle and a piece of aluminum foil on the surface. That’ll give you a Z home that works perfectly, less the thickness of the foil (not large enough to even adjust for). If you’re going to setup only for printing you might be able to replace the alligator clip with something more permanent. The key is to have conductivity between the nozzle and the bed when at Z0.

Thanks for the comments. I have tried an alligator clip on the extruder nozzle after brushing it off with a brass brush and touched it to the grounded aluminum build plate but even a tiny bit of plastic over the nozzle would be a problem, hence trying to use an endstop button switch and a Z offset. Either way when that axis is asked to go to Z0 it tries to pound through the build plate causing much unhappiness. If I’m not doing anything obviously wrong with this extruder or the code, then I will persevere until I beat it into compliance.