Correct 'z' zero method?

I mounted a switch, just under the homing position.

I made sure the switch was at the perfect spot then attached it with screws.

Now I call some G-Code to:

G21 ------------------ Set to metric, as I use MM
$H ------------------ Home the spindle
M00 ----------------- Pause for tool change
G92 Z0 -------------- Set z to 0
G01 Z-20 F1000 ----- Feed down to -20 mm (about 3/4") at 1000mm per min. to save time.
F500 ----------------- Slow things down to 500mm per min.
G38.2 Z-60 ----------- Send the spindle down max -60mm to zero tool tip.
G92 Z0 --------------- Set switch point to 0
G01 Z5 --------------- Move spindle up 5mm to release switch
F50 ------------------ Slow things way down to make an accurate zero point.
G38.2 Z-7 ------------ Send the spindle down to -7mm at
G92 Z??? ------------- Offset the switch point Z to the actual height of my table Z.
G01 Z30 F1500 ------ Raise the bit to 30mm above my surface.
G01 X0 Y0 F4000 — Move the bit to X0, Y0 (Optional)

The most important thing now is to set the bottom of your material or stock at Zero when you program your code.

Then measure and enter the thickness of your stock.
I didn’t think I could get use to this but it’s very easy with the software I use.

Im not using a tool offset, just re-zeroing the tip of the tool with each change.

I can understand it’s not for everyone, but man it sure takes the guess work out of setting 0.

Requirements:

  1. You must have a machine :smiley:
  2. This tutorial is only for GRBL 9G or later, others may be still able to use it.
  3. You must have homing setup on your machine.
  4. You will need to do some wiring.

Setup - Electrical

Just like using the probe, you must make contact from pin A5 on Arduino and Ground.

	Pin A5 on Arduino to the normally open (NO) contact on the switch.
	Pin GND to common (COM) on the switch.

When the call G38.2 Z-(??) is called, the machine will drop the z-axis down up to the amount specified with (??)

With the switch working, you should be able to hook the probe wires up to the wires on the switch and continue to use your probe also.

Setup - Mechanical

To set the offset of the switch point and your table height, you must manually set zero the old fashioned way.

I use paper under the tool method. 

1. Load a thin tool into the spindle.
2. Home your machine using $H or (Home) on your sender. 
3. Move the spindle down to just touch the switch
4. be sure the tool is centered on the switch.
5. Zero your Z-Axis on your sender.
6. Set the feed rate very slow. (About 10 inches per min or 250 mm per min.) 
7. Using the G38.2 Z-(??) G-code. Set?? to a safe distance, 6.35mm = .25inches.
	G38.2 Z-.25 (inches per min)
	G38.2 Z-6.35(mm per min)
8. Zero your Z-Axis (Set Z to 0), Again.
9. Using your sender or controller, move the machine up and over your waist board in the cutting area.
10. Set the height of the tool so a piece of paper is just touching the tool. 

(We can adjust for +/- later in the zero offset)

11. Take note of the height of Z on your sender. (Mine is -3.5mm)
12. Now you know the offset of the switch point to your table top. 
13. You can call (G92 Z[your offset inverted]). [Mine would be G92 Z-6.5]

Explanation
My switch point is 3.5mm above my table top.
G38.2 Z-60 starts the z-axis moving down for 60mm.
When the switch makes contact Z stops.
(G92 Z3.5) sets Z at 3.5mm above the switch point.

I know its long winded, but there you go!

Remember Inches are 25.4 mm.

Good Luck

4 Likes