Z-Zero

Bill Arnold

1974
Staff member
Messages
8,622
Location
Thomasville, GA
One of the recent updates I did to my CNC is automated zero of the Z axis. It's a fairly simple process and I finally took time to get it done.

I planned to use a cutout from a PC board blank as the conducting part and place it in a 1/2" piece of wood. The hole at the peak of the piece is for hanging the assembly on the wall. The small hole in the pocket is for a wire that is soldered to the bottom of the PC board.

Z-Zero_crv.jpg

To operate the function, one lead is connected to pin A5 of the Arduino; the other to ground. In my case, the alligator clip goes to ground and the red wire to pin A5. A series of commands is then sent to the system to lower the bit to the plate. As soon as it touches, it stops and the position is stored in the system. I added a command to raise the bit 1/4" above the plate for clearance.

Z-Zero_b.jpg

I use UGS for most of my projects, so I set up a macro to send the commands to zero the Z-axis.

Here's a short video of it doing its thing:

[video]https://www.dropbox.com/s/7vy0brmq6spc337/Z-Zero_a.wmv?dl=0[/video]
 
Speaking of the macro, here's the one that makes this work in grbl:

G20 G38.2 Z-.5 F2; G92 Z.5; G91; G0 Z0.25; G90

Breaking it down:

G20 = set system to inches

G38.2 Z-.5 F2; = move Z down to Z-0.5 at 2ipm until it touches the plate (it never reaches -0.5, of course)

G92 Z.5; = set the coordinate offset to 0.5", the thickness of the plate

G91; G0 Z0.25; = set to relative mode and raise Z by 0.25" for clearance

G90 = set system back to absolute mode
 
I will need to look at the code in Mach3. Might be a little different.

I will want at least two touches.

Most of the machines touch 2-3 times. First at a little faster feedrate, then back off then touch again at a slower feedrate.

Even in manual touch off, I like to hit the probe 2-3 times.

I do like the coding, and I will set it up, but I need to work through my list.
 
I don't use a piece of paper anymore. I just turn the spindle with my fingers as I lower the "Z", until I feel the cutter touching the wood. Been doing that for about 3-4 years. I get it within a thou or 2 and it is really fast. Still the auto will be a good to have.
 
I've been doing the z-zero for a little while now on mine, Kind of had to when I was doing shallow engraving on aluminum when I was fooling around making 'coins'.

I've fallen down a rabbet hole now and I want to set mine up to do X, Y, and Z probing to set the zero. So I created a jig for making my coins.

Basically, it's piece of aluminum angle fixed into the tempate board that I will use to probe the x and z dimensions to set the center of the workpiece exactly everytime.

The deeper rabbet hole I'm diving into is creating a 'widget' for Chilipeppr that will automate the probing of the x and y dimensions. It already has a real nice one for doing Z, but I need more.

I've done some testing and the G38.2 command works just as well with the X and Y dimensions. Too bad I got started programming this widget before I finished testing out the other stuff. LOL.


xyz_zero.jpg probexyz.png

If you haven't given Chilipeppr a shot, I'd highly recommend taking a look at it. It's been working really well for me.
 
Last edited:
I've been doing the z-zero for a little while now on mine, Kind of had to when I was doing shallow engraving on aluminum when I was fooling around making 'coins'.

I've fallen down a rabbet hole now and I want to set mine up to do X, Y, and Z probing to set the zero. So I created a jig for making my coins.

Basically, it's piece of aluminum angle fixed into the tempate board that I will use to probe the x and z dimensions to set the center of the workpiece exactly everytime. ...

If you haven't given Chilipeppr a shot, I'd highly recommend taking a look at it. It's been working really well for me.

I use the center of the project as X0, Y0 so I've been manually moving the router to that point. I can see where a jig would help that process also. I'll have to work on that - maybe leave the inside angle open so I can sit it over my center mark, run X and Y, then move it to run Z.

I tried Chilipeppr a while back but had an issue I have since forgotten - senior moments! I'll give it another shot.
 
I think they've probably worked out a lot of kinks since then. The ONLY thing I don't like about it is that it's online only, but the nice thing about that is any fixes/upgrades you get immediately.

I got the XYZ probe working today. They even give you a custom URL to publish your own version of Chilipeppr if you so desire. I did and added my widget to that workspace.

You can see in this picture the 3d representation of the gcode I used to create the spoil board I'm using to hold the workpiece and my X/Y zero 'block'.

The aluminum bar is 2" wide, so the zero point I want is at 1" in, and 1" up on the bar stock. My zero block is 2" to the left, and 2" down from where the center is.

Since my bit is 1/8" (.125") thick, I need to set the offset to -1*(2-(.125/))

So I just jog the bit over to the block, set the x, set the y, then jog to the aluminum bar and set the z and I'm ready to go.

As long as I have a square cut on the bar stock and place it precisely (well, as precisely as I can, I'm not trying to work to Leo's sub-atomic accuracy) I should be able have a precisely centered position, even if I take the spoil board off and put it back on.

At least that's the plan. Time to go cut some projects.
probexyz.jpg
 
Last edited:
Actually, I had things wrong. The way the spoil board is layed out, the correct offsets were quite simply 2" and 2".
 
Brent, it looks like you have zeroing worked out to a real science and gave me something to think about.

I use a lot of v-carving using bits ranging from 22° to 120°. Doing an X,Y zero with those bits presents a challenge. I've seen one solution where a guy milled a block of aluminum with a beveled section, but I wonder how well that works with different angled bits.
 
I'm planning on making one of those edge finder blocks out of aluminum one of these days as well.

I'd think with the V-bit it would be as simple as setting the offset to whatever the the thickness of the 'edge' is +/- 1/2 of the diameter of the bit.
 
Looking at some of the videos, It appears maybe I'm not thinking of the same kind of v-carving bits as you are. Some of the ones I've seen on the videos are quite large.
 
I have a 1/4 round stock that I had ground to a pencil point. Really the tip is sharp and precisely centered. I use that when I want precise (for woodworking) location of X-Y zero. I move the pointer to my "X" - er - the "X" I draw with a pencil in the center of the work. I am within about .005 - .010 For wood or almost anything I do - that is close enough.

"X" - "Y" is not about the cutter - it all about the spindle centerline. Once the "X" and "Y" are set you can change cutters all day and never need to update the X-Y setting. Setting "Z" is the only cutter dependent setting that needs to be made. (there are other reasons, but not so much on hobby routers).

I do not try to use material to size. I will always try to use oversized material and have a cutout routine. I also set X-Y zero in middle of part. With that, the setting of X-Y zero is not really important. Getting with 1/8" or so is just fine. Much of the time I just set my X-Y with the cutter I am using and eyeball it.

If I want my cutter to be offset from zero, I do that in the programming, or tool setup.
 
As far as the cutter goes, I would think you could set the x-y zero with a straight bit of some sort. Some of those larger V-Cutters I've seen have flutes that would make it difficult to use them to place the x and y if you wanted to.


Ryan, When changing the cutters, you can energize the steppers so that they hold position when you change the bits. So you could set the x-y with a straight bit and the appropriate offset, then swap the bit, and reset the zero.


Leo, for my project however, it IS important that both the material and x-y zero ARE precisely located, as it is a 2 sided project.

I'm trying to make these silly coins with carving on both sides. If I don't have that y zero at the right place, when I flip the material over, the back side will be offset by whatever error there is in the placement.

At the small size of these things, it's very important to have things setup correctly.

I'm getting close to success, but the other challenge I'm having right now is that I need to do a better calibration on my machine so that when I tell it to move 1 inch that it really moves 1 inch, and not 1.025 inches, which is what I think it's doing right now.

Going to do that later today. I haven't spent that much time trying to do it very precisely. But I've got the method to do it, just need to spend the time.

Wish I didn't have to work today so I could continue working on it....
 
For two-sided projects, I carefully measure the center point on both sides of the material, then set up a jig that holds it in place. After cutting one side, I command the router to move several inches to the side. Next, I flip the material, lock it down and command the router back to X0,Y0 which should be center and, so far, that's worked out.

On some items, the center gets a hole cut in it, so I drill a 1/8" hole through the center before starting. I still use a jig for basic alignment, but I zero the first side to the small hole. When side 1 is done, I command the router to the side a few inches. Then, I flip the material, command the router back to 0,0 and make sure the bit is still aligned.
 
Top