Skip to content

Limit Switches and Auto Squaring

bdring edited this page Apr 22, 2019 · 2 revisions

Home/Limit Switches

Limit/Homing switches are a great addition to your machine. While they are not required, your machine will never be a professional tool without them. Beginners who start with a machine without switches often never fully understand how to use machine and work coordinate systems. It is also very difficult to recover from a crash or repeat a job without them. Just about any well mounted switch is repeatable to a few hundredths of a millimeter.

Many people skip the Z home switch. I feel this is just as important as the X and Y. during homing. You want the Z to home first. This makes sure the bit will clear you work and clamps. It also can restore your Z.

Helpful Part Files

Auto Squaring

On machines that use gantry type designs with motors on each end like the MPCNC, you can use the motors to square the machine. In order to use this feature, you must have limit switches on both sides.

Squaring occurs when you home the machine with the $H command. Both motors will drive the axis towards the switches. As soon as one switch is touched, each side will then home independently. Tweak the location of the switch touch points until you are happy with the squareness of the machine. The motors need to stay energized to hold the squareness, so the $1 setting (Step idle delay) should be 255. Note: Grbl supports homing one axis at a time with commands like $HX to home the X axis. These work, but auto squaring only occurs during the full $H homing.

While it appears that the controller has 5 independent axes, it does not. The limited I/O pins of the ESP32 are used in a special way to accomplish this. The (2) motors on each axis use (1) direction pin, (2) step pins and (1) limit switch pin.

Coordinate Systems (G53 though G59)

I have heard a few people say they never use work coordinate systems. They are wrong. Every time you zero an axis, you are using a work coordinate system. If you want to learn more, watch this video.