Problem when adding limit switches, I have a VERY high U value

Hi, I’ve recently added limit switches to a machine running an MKS DLC v2.1. I can’t get the homing to work. The x & y steppers lock while Lightburn is attempting the homing. If I send a move signal to either axis I get an ‘alarm 2’ error.

I have not noticed it before but there is a U value in the get position list. It is an inconceivably high number. Is this coincidence or have i got a setting wrong somewhere.

I seem to be running around in circles with this but I can affirm that if I disable homing I can move both axes without problems.

Frustratingly I can sometimes click get position and the U value resets to 0 but not always and haven’t worked out the conditions when it does. However, even after it is zeroed, if I move an axis the U value returns to the high number.


I am using the red 3 wire limit switches and as far as I can see I have the V, G, S running to the correct pins on the board.

I have the switches positioned for bottom left homing.

I set the homing cycle direction $23 the same as Axis direction $3

Not sure what these are, but if there a switch that can either be wired as N.C or N.O. it could be your problem.

Your description of the home switches could be anything, a mechanical, optical or inductive switch… A link is always best, but a photo would due.

As @Dskall pointed out these can be configured where the switch pulls the S pin to ground or to V+. Most machines use low as active, meaning the switch S and G pins are connected… assuming a mechanical switch.


I thought the S30 Pro came with limit switches. Extended frame does not matter.

This particular set up is an S9 module not a whole machine. I have it mounted on a no-brand frame and my controller is an independently purchased MKS DLC v2.1. I understand it is similar to the controller in some of the Sculpfun machines.

I have happily been using this ‘franken’ laser for sometime without endstops so it is frustrating that I can’t seem to overcome this issue.

I have another laser which is an S30 Pro module mounted on a Sculpfun x/y extension with an MKS DLC32 v2.1 controller. When I recently built it I also added limit switches but of a different type. The homing on this set up works without issue.

I have tried these ‘black’ limit switches on the MKS DLC v2.1 machine but it made no difference. I haven’t tried the ’red’ limit switches on the bigger machine.

Thank you, I have added a picture to my original post.

How are they wired to the DLC, no or nc?

Normally they are used to pull the input to the DLC low when active.


I wired them as in this illustration

@jkwilborn is correct, you have a wiring issue to solve. The additional info you provided helps a lot.

There is no S-G-V on a mechanical limit switch. That translates to signal-ground-volts. Unplug the switch and check continuity to the switch COM-NO-NC terminals, to identify the wire colors.

COM goes to a GND pin on the controller board.
NC goes to the axis input pin.
NO is not connected.

If this does not clear your problem, hook the NO wire to the axis input pin instead.

With Homing enabled, you must complete a homing cycle to enable motion. If homing is not enabled, Home is where the machine is sitting when powered up. Then you have to change the origin as needed. Location repeatability here is poor.

Make sense?

That is true of a bare switch, but the ones in question look to be old-school Makerbot switches with internal pullups and an LED to show activation.

If the machine has a home switch at one end and a limit switch at the other, with the two switches wired in parallel, then Makerbot switches have the charming feature of shorting the power supply to ground when either one is tripped:

If none of the switches are paralleled, then ignore that suggestion.

Do you have a home switch on the Z axis and does it home correctly? Although I’m not up to speed with the DLC v2.1 variant, bone-stock GRBL firmware attempts to home the Z axis first and, if that fails, never homes X and Y.

Github DLC32 has a version for a laser. I think the Z home operation has been removed from that version.

I’d suspect something besides the current firmware.


I don’t have any switch for the z axis.

I know there are options for other z axis functions in the GRBL settings so I will look for the alternative firmware.

Thank you

I will definitely check that out. I don’t have a z axis so I can see how that might be an issue.

Thank you

I’d suggest you figure out what’s wired wrong before messing with firmware that apparently works. At least until you chance down a more diventitive reason for doing that.

If you’re trying to fix things, don’t make random changes or you end up with not only the original problem but can be many more.

I’d say most of the time, it’s a configuration issue … rarely does it turn out to be firmware…

Have fun, whichever road you choose.


1 Like

Check this guide:

I’d first recommend disconnecting the VCC line from the switches and only using GND and S. That works for many users.