[Guide] Using Grbl to debug your homing switches

Yes. Not likely to be the gShield (it just passes the Arduino pin to the connector), but it’s possible.

1 Like

@PhilJohnson the Customer Success team at Inventables is empowered to solve all problems for customers. Toss them a note here and they will get you fixed up:

https://inventables.desk.com/customer/portal/emails/new

1 Like

No. You still need them for your system.

Doesn’t hurt anything to leave them in place. It does slow down the response to a switch change, but the slow down is very slight.

1 Like

Possibly, but I’d like you to check out the soldering of the capacitors and the soldering of the connector pin to the gShield.

I can’t tell from the picture above where you connected the caps.

@PhilJohnson

Do you have a 10K ohm resistor (or something close to that)?

No. That’s not really necessary. Right now I’m just trying to figure out what the failure mode is.

This test is what I had in mind. I want to see if the 328P internal pull-up is at issue or if there is really a short somewhere pulling the pin low. There is a 5 volt source on the side of the Arduino where the A5 pin is, but in the other group on that side.

But before you do that, since you can’t just pull the connector off, disconnect one of the wires to the Z homing switch to see if the switch is stuck.

Pictures of the 5 pin header installation? Do you have something attached to the header now?

There’s a lot of possibilities that could explain why you may be having much more noise issues than others such as component tolerances, components bad/going bad, where your board is in relation to other electronics and all sorts of other things.

If you wanted to try @BrianSaban’s suggestion the parts are very cheap. If this wasn’t an immediate need you could order 100 of each of those parts from China for $3 but it would take a few weeks to get to you. Or you can buy one of each for $.10 and pay $5-10 shipping from Digikey. It would be a real pain trying to solder it up and get it sturdy but you could rig it up and see if it works and then worry about getting it soldered in to survive.

1 Like

It’s late here. I’m shutting down. I’ll think about this some more and get back to you.

1 Like

I read this several times and I just had to smile. To understand why, you need to know that I was a Physics major in college.

Modern Physics is heavily into particle theory. You can’t actually see the particles being studied, only the evidence that at one time they were there.

So, that is what made this comment bring back some of the old days for me.

Grounding issues are so nebulous it’s usually sufficient to just get rid of them rather than look to see what they are.

To answer your question, I have an Oscilloscope, and an X-Carve. They are not anywhere near each other and I have not taken the time to look at the electrical noise. I just killed it and moved on.:smiley:

1 Like

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.