A 2 switch day

So I had a bad day with my x carve yesterday, and possibly discovered an issue with the g shield or grbl.

So first I power up the machine and send a $H from g code sender. I usually check all the connectors before starting, and I did this time. Anyway the Z axis immediately crushed the limit switch. Fortunately I had extras. I went ahead and replaced the switch (I think this is the 3rd). Anyway I moved the z back down a few mm and restarted the homing sequence. This time it worked, and I started the cut. When I got to the end of the first part and changed the tool, I sent another $H. This time, like earlier the Z axis was up near the top, maybe less than a mm from tripping the switch. Again it just chopped down on the switch, and made this a two switch day.

I think if you are too close to the top when you start homing, it doesn’t respond to the switch closing.

Anyway, I need the homing feature, but it is so unreliable, I am afraid if it. How can this get better? Normally closed would be good. Maybe an LED I could use to test the switch before starting. Like the LED would go out when the switch closed.

If anyone set up their switches as normally closed, I would be curious as to how you wired them.

Anyway, these two switch days can be discouraging. Hopefully I can get something more reliable set up. At least I have some spare switches. Although at this point I should probably just order 10 more.

Oh man, that totally blows. After I crunched my first z switch, it’s a little terrifying every time I home it, but so far I’ve only had that one incident. And I’ve homed it multiple times in a row, so I haven’t seen the “short runway” issue you’re having.

Maybe think about moving to a magnetic switch? Something like this:

You’d have to do a little tuning to get the magnet placed correctly, but it should eliminate the dreaded crunch…

More people should be speaking out about this. Crushed my first Z switch last night after my second test. Really frustrating and something that the team needs to look into. Ordering a handful today, at $3 I’d rather have plenty of backups. Someone in another thread mentioned this as well, I don’t think this is an isolated issue. Are you listening Inventables team :)?

Something like this would be good!

1 Like

Very nice solution…

I especially like the LEDs

I too crushed a switch first go :frowning: and nearly a finger. I Think there is a real problem with this an there should be a better testing sequence and help as this seams to be a common and very dangerous procedure as there needs to be a way to test the switches without the damage to the machine.

Yeah, I wonder what would be involved in adding small LEDs to the limit switches. Since we’re running them in a normally-open configuration, it seems like it should be relatively easy. That way before you homed your machine, you could manually tap your three switches, see the lights come on, and know that you’re set. I might have to investigate that this weekened…

1 Like

LEDs would be great. When I was initially setting up my machine I ran the homing sequence and my ‘Y’ limit wasn’t working (bad connection at the g-shield). After just about crashing that switch, I backed all my axes up and ran the homing again.

Instead of nervously waiting to see if my gantrys crashed, I just manually tapped the switches with my finger, seemed to work great!

I think it should also be mentioned somewhere that the default setting for these switch is only for homing, not limits! So basically during a run if your machine trips on of these, it will not stop!

It’s early and I didn’t get much sleep but you should be able to run the switches normally closed with an led that stays on until the switch is hit.

You’d need to run power to the led a resistor to adjust voltage and a relay for each switch. I’d put an led on the gshield side as well for visual indication that the relay is working.

Basically look at machine for visual indication that all led are lit on all axis meaning machine is good to go. Triggering switch opens the circuit turning the led out indicating that switch has been tripped. The now open circuit causes the relay to switch and close. This turns on an led indicating that the switch has be tripped and has closed the circuit to the gshield? I hope that makes sence.

Wouldn’t the LED act like a pull down resistor, and cause the Arduino to read the pin as low, like when the switch is closed?

It also requires editing the grbl config file to read the switches in a NC format and building it, so it’s kind of an advanced task.

Inventables needs to change what they call the switches that ship with a full machine. They are not limit switches as they are configured on a standard machine, They are homing switches and referring to them as limit switches is confusing people that are new to CNC.
As has been said before there is to much electric noise generated by the brushed DC motor that they call a spindle to be able to configure a standard machine for limit switches. You would also need 5 switches 1 at each end of the X and Y travel limits and 1 at the top of the Z travel. Three of those switches can also be configured as homing switches.
You would also need to do something about the noise and use shielded wiring going to the switches.

When done correctly homing and limit switches make a CNC machine safer and easier to run multiple part runs.

FYI limit switches on a lot of CNC machines are configured NC and the 2 X axis switches are in series going to a single input pin as are the 2 Y axis switches in series going to there own input pin. Z axis switch goes to a third input pin.
In configuration pin 1 is Z home and Z+ limit, Pin 2 is X home, X+ limit and X- limit and pin 3 is Y home, Y+ limit and Y- limit. Your pin numbers may be different than the example given.

As also been talked about when testing for proper operation move as far away from the switch being tested and trigger it with a chop stick as the machine moves towards the switch. Set your feed rate low so you have time to react if the switch does not give the desired results. Have your other hand on the emergency stop button just in case.

Hope this helps.


Maybe change “limit switch” to “microswitch”…

As for crushing switches, I simply didnt install the screw opposite of the switches pivot point and snugged the remaining screw down to secure the switch well but not damage it. if the machine crashes the switch it just pivots out of the way. After your heart rate and blood pressure return to normal, just pivot the switch back into position and check the remaining screw’s torque.

And your hands should never me in the machine’s working envelope when it is running!
A bit of simple safety actions icreases the odds of dying with all 10 finger still attatched.

1 Like

You can put some guard to motor mouth plate, stops z axis before break. As seen on pictures. (Sorry boss, no more switch selling :wink: )


If the switch is held rigidly, your homing is not going to be very repeatable.

BTW has anyone actually measured how repeatable the homing process is with these switches?

In theory using the homing switches with soft limits should give you the safety of not crashing into the ends, as long as the arduino know’s its position. Mostly I would like to be able to use the homing process without worrying about breaking switches and machines. (also without messing with chopsticks on every machine init :slight_smile: ).

Switching the switches to NC, and adding the LED sounds like the best approach. From what I read, if the switch is wired from vcc to the pin instead of gnd to the pin, and a resistor is used between the pin and gnd, it will work as a NC limit switch. I could add LEDs between the switch terminals and GND to have a green for go, red for stop kind of indicator. Here is a little diagram of what I am thinking. Does this look like it would fry my arduino?

Looking today, I see already I got the switch and the LEDs backwards, the normally closed side should go to the arduino input, and the LED colors should be reversed.

@AlanDavis - I like the idea of a set-screw limiter. I may have to include that in my design.