Limit switches or not?

I use DevCAD and DevWING for machining model airplane parts, before making the toolpaths I need to specify the size of my workspace and where the reference of my z axis is, at wasteboard level or at the top surface of the material I want to cut. As long as I put my machine in the right starting point it will never hit one of the end switches.

Crashing into the end switches occurs when I use UGS and forget to switch to mm (instead of inches) and give manual feeds. Or when I forget to set the zero position before starting a new job. (GRBL v0.8)

For X and Y axis I aligned the switches in such a way that they cannot break, first they switch, then the wheels hit the end/gantry plate before the switch itself breaks which cannot occur.

The high Z axis is never reached, the lower needs to be lower than the tool to function.

For safety and homing reasons you need switches. Sadly the GRBL developers decided to swap the pinout for the Z limit switch between version v0.8 and v0.9 as my hardware cannot cope with this change I decided to stick with v0.8

I put in the wiring when I first built my XCarve, and mounted the Z Axis switch. I didn’t mount the X and Y switches as I had forgot to order mounting hardware. I promptly smashed the Z Axis switch it when I was first setting the machine up, bought and installed another of them and again promptly smashed it, and haven’t re-installed again.

It would be nice to have the machine be able to “self probe” to know where it is at, but I can’t see how that helps with actual carving. I can’t see how the homing switches are accurate to 0.001 inch so you can’t use that to reset on an intricate carve. The switches also don’t help with work position so you still have to go through the zeroing process when you change bits or work pieces. Finally, since the switches aren’t limit switches, they don’t keep the machine from running into the ends of the machine (unless you do something like Brian refers to above, which I had previously missed).

I’m sure having the switches functional would be nice… but you can certainly run the machine w/o them if you so choose.


This implies that hard limits are better than soft limits, however, soft limits are just as good as hard limits, for the X-carve soft limits are even better than hard limits. Soft limits are always active.

Both rely on software and machine integrity, which means if your system is broken then neither method will help you.

Soft limits stop the problem before it happens, hard limits just reduce the damage when the problem happens.


On the surface, yes, homing switches don’t stop crashes… With homing and soft limits you don’t crash.

1 Like

I would not want to operate without mine. My Z-axis switch crashed because a wire broke but other than that I’ve been using them for almost a year without a problem (still have my original X-Y switches). I’ve had numerous occasions where UGS crashed and I needed to get back to the exact X-Y-Z work position. The homing switches saved my bacon. I’ve got a new computer and use the UGS nightly build so I don’t have crashes as often but it saves a carve when I do. If you are doing a 3D carve it is particularly important to get back to the same position.

1 Like

You will never smash them in any program with one of these, it uses hard limits not soft limits so it’s always active.

The major difference is Hard limits don’t require you needing to home your machine in order for it to work. Correct me if i’m wrong but soft limits only start working once you home your machine and the machine knows where it is, so if you forget to home your machine, which takes away human error.

And to whoever flagged the post, you should let the guy see the info so he can decide on his own and make a board if he wishes, I have always offered the schematics to the community for free from day one and thanks to the thread many have received the info.


1 Like

You are correct that soft limits require homing for them to work, but if you have homing enabled, grbl takes care of the human error by locking the system until the homing cycle is run. If you override the lock then you take responsibility for soft limits not working.

But without a filter the hard limits will not work, the alarm will sound immediately from noise (although it’s been said rewiring your machine with shielded cable works, haven’t personally tried).

1 Like

The normally closed configuration is much less susceptible to noise (but it can happen).

Just as a side note, I’m running with normally open switches, shielded wire and no filters, without any issues.


Same, broke z-limit Day 1. Might install real limit switches on each end of axes someday. Maybe. Probably not.

PhilJohnson and LarryM,
I’m not trying to be argumentative, but really wondering how soft limits and homing switches would help in many of my crash situations, as well as how does it help re-start a carve.

Take my recently completed DiReista stool for instance… Sat the carve up, watched it cut out the first piece and since everything was looking fine, and the carve was going to take another 2+ hours, I left the shop to take care of other responsibilities. Somewhere in cutting out the arcs to be glued together for the foot rest, the pieces started coming loose from the carve and the router pulled them up and tossed them, apparently blocking the wheels and router travel. This caused the router to miss steps and the router ended up about 6" ‘north east’ of where it the xCarve thought it was. It then dutifully carved the rest of the arcs right on top of the legs. If the X axis was then sent close to the right limit, the router would get there before the soft limits thought they should be there (i.e. the code was correct), but the axis would still slam into the left edge of the rail. If there was a switch there, the movement would smash the switch. Hard Limit switches like BrianSaban uses would cause the motion to stop and the carve to be aborted, but depending on the travel speed, still may result in a smashed switch before the movement stops.

Now, how to restart a carve? When you power up the arduino, GRBL has no idea what the current machine position is. My understanding is that homing switches allow GRBL to find (typically) the front, right, top of the machine travel. So, the first thing required would be to open UGS and home the machine using the $H button. (I’m sure you could type a similar command into a terminal window, etc.) Now GRBL knows where the machine is at with respect to the machine, but it has no idea where the workspace is located, nor does it have any idea how far the bit extends. I currently use a 1/4" thick touch probe and a set of macros graciously provided in another thread to set the work piece zero in 3 separate measurements. Typically, I use the lower left of the workpiece and index off of the top. (For through cuts, I need to start indexing from the bottom to keep the spoil board in better shape). Assuming the lower left edge of the workpiece hasn’t been mutilated, I could restart a cut and probably be within a couple thousands, depending on how steady I hold the plate. It seems I would have to do this same thing, with or without the homing switches.

I really would appreciate an explanation of what I am missing in these 2 specific cases, as a solution to these specific scenarios would be most useful to me.


1 Like

V[quote=“RickSchmalzried, post:27, topic:25426, full:true”]
PhilJohnson and LarryM,
I’m not trying to be argumentative, but really wondering how soft limits and homing switches would help in many of my crash situations, as well as how does it help re-start a carve.


Hi Rick,

In scenario 1 if the machine misses steps then obviously it doesn’t know where it’s at. Not much you can do about that. I havent had that happen in a while since I have gotten more experience as to feeds and speeds with the materials I typically use.

As to the second scenario, GRBL remembers the work XYZ. If I have to restart I just home and tell UGS to return to zero and I restart the carve with no adjustments to the XYZ or workpiece. It works for sure. My old computer with an earlier version of UGS crashed about 25% of the time. I rarely have software crashes any more though. Usually if I have to restart its because I’m using a smaller bit and it breaks.

Here is an example. I had a bit break during this carve. Restarted, homed, retained XY, reset Z (because I had to change bits), restarted carve. Betcha can’t tell where it stopped.

1 Like

This is about the best story I’ve heard recently that illustrates the point that you should never leave your machine when it’s running.

More to the point, this is an extreme case and you are correct in that soft limits would not help you when you are losing steps. Keep in mind that both soft and hard limits are meant to be a last ditch effort to save your machine - not the work piece. They do help with saving the work piece also, but that’s not the goal.

In your case hard limits would help, but you have already ruined the work piece and the type of hard limits that would help in this situation are the ones that kill power to the machine rather than signaling grbl to stop.

@PhilJohnson has covered the restart.


Be careful with this. Different versions of UGCS do different things with the “Return to Zero” button.

This may be the biggest point I was missing. Let me make sure I understand. Even in scenario 1… something BAD happens and the machine loses position. The machine may bang into the ends of travel, but if I hit cancel or abort, even kill the power, as long as the arduino stays powered up, I could re-home the machine using the switches, return to zero (which recovers the work position), and resend the gcode file (obviously carving in air until it catches up). How would this work in a power failure situation, or would I just be out of luck then?

One further question… Are soft limits and hard limits exclusionary? i.e. can you use both at the same time? Soft limits would prevent user error from trying to send the machine up 5mm when in inch mode and crashing the top switch, but hard limits on both ends of travel would effectively shut down the machine on a physical error where the machine gets forced out of position.


They would probably work together, but it would be redundant. As for remembering it’s start position, I would suggest searching the forum for a topic that explained g28. It will have all your answers explained greatly, don’t remember the author put give it a search

You can use both at the same time. (Actually all three functions, homing, soft limits, hard limits). You would have to make sure to take appropriate measures to avoid false triggers (electrical noise).

Note the comment that “Return to Zero” does not function the same in all versions of UGCS.

If you use @PhilJohnson 's G28 method the G28 position is remembered even with a power failure.

In his situation the hard limits would provide a bit of added functionality assuming that the runaway condition doesn’t destroy the switches. If you lose steps soft limits can fail, but hard limits would still stop the runaway, assuming that grbl is still running ok.

True. I was thinking of the nightly build I use. Even then I have a macro that just goes to XY. You really don’t have to send it to XYZ, you can just restart the carve and it will use the previously set position,