Well I blew up my first homing switch - but how?

I’ve had my XCarve up & running for a while, but this weekend I add extra wire so I could relocate the electronics. Up until yesterday, Z & X worked fine, but Y didn’t. I didn’t sweat it since I knew I was going to be changing things up and I just homed things manually.

Skip to yesterday, I added a few feet of shielded 18/4 for the steppers and a few feet of 20/2 for the homing switches. I used soldering sleeves to make the splices and then added head shrink tube around those, then zip tied everything together to (hopefully) minimize any flex in the connection. I also swapped out the g-shield because I’d done a crappy job of soldering on the original and didn’t know if maybe that was causing some of the problems with the Y switch.

Once I got done I went into Easel and my X, Y & Z movements worked fine, then I started the homing sequence, and let’s just say I didn’t get any farther than pieces from the Z-axis raining down around me. How can such a small piece bust into so many smaller pieces? Impressive!

So my question is where do I start in troubleshooting this once the replacement switch (and a bunch of spares) comes in? (I did label all my wires so I wouldn’t mix anything up) Is there some way to independently test the X & Y switches to see that they work instead of running the sequence through Easel again?

You can check the physical wiring by using a multimeter to verify they are normally open, and close only when the switch is pressed. Be sure you press all the other switches when checking wiring for one, just to make sure you don’t have a short somewhere.

If the tests that Robert suggested don’t solve the problem there is a way to get grbl to tell you what values it sees on the homing switch pins.

In addition to checking the switches you need to do an ohms test end to end on the homing switch wires to make sure that you didn’t cross any wires when you spliced in the new wire.

Thanks for the suggestions!

****Make sure you wired it to the gshield in the correct order so Z is being read first.

I havent blown up my limit switches, but i’ve had my axes run into them and keep pushing against them until i turn off the power supply. the weird thing is the limit switches work and it can be homed and what not, both in easel and chilipeppr. the issue happens whenever i’m not doing a homing cycle… kinda like whenever the limit switches need to actually do their job (jogging or in a program) and “limit” the machine its like they aren’t there.
anyone else seen this issue? anyone know how to make chilipeppr aware the limit switches are active and it’s time to stop the stepper motor??

Is this enabled in your grbl settings?

$21 - Hard limits, bool

Hard limit work basically the same as soft limits, but use physical switches instead. Basically you wire up some switches (mechanical, magnetic, or optical) near the end of travel of each axes, or where ever you feel that there might be trouble if your program moves too far to where it shouldn’t. When the switch triggers, it will immediately halt all motion, shutdown the coolant and spindle (if connected), and go into alarm mode, which forces you to check your machine and reset everything.

To use hard limits with Grbl, the limit pins are held high with an internal pull-up resistor, so all you have to do is wire in a normally-open switch with the pin and ground and enable hard limits with $21=1. (Disable with $21=0.) We strongly advise taking electric interference prevention measures. If you want a limit for both ends of travel of one axes, just wire in two switches in parallel with the pin and ground, so if either one of them trips, it triggers the hard limit.

Keep in mind, that a hard limit event is considered to be critical event, where steppers immediately stop and will have likely have lost steps. Grbl doesn’t have any feedback on position, so it can’t guarantee it has any idea where it is. So, if a hard limit is triggered, Grbl will go into an infinite loop ALARM mode, giving you a chance to check your machine and forcing you to reset Grbl. Remember it’s a purely a safety feature.

Thanks for the ideas! i didn’t know about $21, so i changed that =1 and now if i try to jog or home in either chilipeppr or easel i get ALARM: hard limit. This is confusing because when i had $21=0 the limit switches worked during a homing cycle.
It is asking to be reset. Is it possible it needs to be reset to realize the switches aren’t actually tripped? And what kind of reset is it talking about?

Thanks in advance!

X-Carve does not implement hard limits. What you need to do is enable $20 and then adjust $130, $131, and $132 so grbl knows haw far the X, Y, and Z axes can travel from home. The limit switches on the X-carve are used to tell grbl where “home” is. My X-carve is a custom size so I had to adjust $130-$132 so grbl would know when to stop travel.

To get $21 hard limits working you need a filter to clear out the noise (here is the link) or I posted the schematic in the limit switch thread if you want to make a board on your own)

@ToddLumpkin Hard Limits ($21) work fine with a filter

Yes Brian. I agree. I was speaking of the stock X-carve.

To summarize –

Looking at things from the grbl perspective, the term “limit switch” only applies for the X-carve if you use hard limits ($21=1) .

Looking at things from the grbl perspective, all other cases for the X-carve the switches are “homing switches”.

Homing switches allow soft limits ($20=1) to work. For this case the “limits” depend on having done the homing cycle and on the low end the limits are 0,0,0 and the limits on the high end are set by $130, $131, and $132. After the homing sequence the switches are ignored. Cannot get a false trigger after homing sequence is complete.

For soft limits the destination of your G-code commands are checked to see if they are out of bounds - if they are out of bounds, grbl alarms without moving the machine.

For hard limits the error is only detected if the machine actually does a move that trips a “limit switch”.

You can have both soft limits and hard limits turned on at the same time. This configuration is susceptible to false triggers without either, shielded switch wiring or a low pass filter on the switch input to the gShield.

Both soft limits and hard limits with the Arduino/gShield electronics depend on the integrity of the electronics. In other words if your electronics don’t function properly then neither will your soft or hard limits.

LarryM thanks a ton! i feel like a limit switch pro