[Guide] Using Grbl to debug your homing switches

That’s different. If you have access to an oscilloscope then it should be an easy exercise. It would be even better if the oscilloscope had a transient trigger mode.

I have been having trouble with the limit switches recently too. I didn’t have any for the first few months, who knows what’s going on.

I’ve wasted a few carves and I wasn’t too sure how to handle it when it occurred to me that I don’t really need the limit switches to work as actual limit switches, I only use them for homing.

So I just turned off hard limits.

This way I have a repeatable homing position but I don’t have to worry about the limit switches (and wiring) causing the machine to stop.

Yes, definitely!

1 Like

Hello, I am having trouble with my Z-axis limit. I haven’t been able to get my z axis limit switch to work, but all the other limits work. I am using an CNC arduino shield, version 0.9. Following your instructions i can monitor the limit switch states, and I cannot get the z limit to trigger, even after disconnecting everything and simply bridging a wire between the z limit pins. Any ideas why my z limit dosnt work?
p.s. I have tried multiple arduino boards, on all of them I have found pin 11 to be in a low state via a digital probe
Any help is appreciated

@EricCarkin

If you are using grbl version 0.9 then the Z axis homing switch connection is D12 and D11 is the PWM connection.

If you are using grbl version 0.8 then D11 is the Z axis homing switch connection.

Thank you so much I completely missed that

still error with your homing switch? try to change homing pull-off to go little far from your limit switch… i change my homing pull of to 5mm from switch ($27=5)… and done, it works…!!!

1 Like
1 Like

Hi Phil. I’ve been reading through this long thread. I think I might have some homing switch issues myself. I frequently get a homing fail. I’ve done a few things to track down the issue as suggested here, but I don’t think I’ve completely cleared it up. It’s usually my X-axis that stops first, so I’m putting a new switch on it. I wonder if I don’t have some of the “ghostly” issues it seemed like you were having. I am running LarryM’s Grbl 1.0c. Settings below. But, what I would really like to know is how you fixed up your machine to work and how you do the “normally closed” limit switch setup. I think that might solve my problem as well.
Grbl 1.0c [’$’ for help]
modified by Larry Mayberry
[’$H’|’$X’ to unlock]
$0=10 (step pulse, usec)
$1=255 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=3 (dir port invert mask:00000011)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=19 (status report mask:00010011)
$11=0.020 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=1 (soft limits, bool)
$21=0 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=3 (homing dir invert mask:00000011)
$24=750.000 (homing feed, mm/min)
$25=750.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$30=12000. (rpm max)
$31=0. (rpm min)
$32=0 (laser mode, bool)
$100=40.000 (x, step/mm)
$101=40.000 (y, step/mm)
$102=188.947 (z, step/mm)
$110=8000.000 (x max rate, mm/min)
$111=8000.000 (y max rate, mm/min)
$112=500.000 (z max rate, mm/min)
$120=500.000 (x accel, mm/sec^2)
$121=500.000 (y accel, mm/sec^2)
$122=50.000 (z accel, mm/sec^2)
$130=781.000 (x max travel, mm)
$131=785.000 (y max travel, mm)
$132=85.000 (z max travel, mm)

Well, I rewired my homing switches so they all have shielded wires. My switches were also different from each other; they were from different stores and different specs. (Could that cause issues?) I did a little rewiring of at the gshield, arduino and power supply as well. For now I left it normally closed. I wanted to make incremental changes to see what solves the problem. So far, it looks like shielded wires did the trick.

It sucks attaching those limit switches and rerouting wires.