CNC Router Z

Hello,
I’m doing a project with my 500W 3018 router. Doing the design with FreeCAD and controlling the router with Universal Gcode Sender.

I’ve got it properly tracing out the part - with no bit installed. Next step will be to route it on cardboard or maybe MDF - before I ruin my nice sheet of 1/8" aluminum.

My problem now is …what about the Z axis? How do I tell it that “zero” isn’t down to the build plate, but rather down to the top of the spoil board?

Just for yuks, here’s the readout of “$$” from the controller:
------------ snip -------------------

$0=10 - step pulse length in uS
$1=25 - step idle delay in mS
$2=0 - Step pulse configuration
$3=6 - Axis directions: Reverse Y, reverse Z
$4=0 - Step enable NOT inverted
$5=0 - Limit pins not inverted
$6=0 - probe pin not inverted. Probe tripped when grounded.
$10=3 - status report = machine position and work position
$11=0.010 - junction deviation aka cornering speed
$12=0.002 - arc tolerance
$13=0 - Feedback units = mm
$20=0 - Soft limits disabled
$21=1 - Hard limits enabled
$22=1 - Homing cycle enabled ( requires limit switches )
$23=7 - Homing cycle direction = 0b111 ( 1 for all axis’s )
$24=25.000 - homing feed 25mm per minute
$25=500.000 - homing seek 500mm per minute
$26=250 - homing debounce 250 milliseconds
$27=2.000 - homing pull-off 2mm
$30=1000 - max spindle speed 1000 RPM
$31=0 - min spindle speed 0
$32=0 - laser mode OFF
$38=10 - spindle encoder 10 pulses per revolution
$100=800.000 - 800 x steps to move 1 mm
$101=800.000 - 800 y steps to move 1 mm
$102=800.000 - 800 z steps to move 1 mm
$110=2000.000 - X max rate 2000 mm per minute
$111=2000.000 - Y max rate 2000 mm per minute
$112=100.000 - Z max rate (only) 100 mm per minute
$120=20.000 - X accelleration 20 mm per second squared
$121=20.000 - Y accelleration 20 mm per second squared
$122=20.000 - Z accelleration 20 mm per second squared
$130=500.000 - X max travel 500mm ( only homing & soft limits )
$131=500.000 - Y max travel 500mm ( only homing and soft limits )
$132=200.000 - Z max travel 200mm ( only homing and soft limits )
------------ endsnip --------------

I’m starting to think that maybe limit switches aren’t such a good deal. Because the bit
will dip BELOW zero to turn on the switch ( digging into the spoil board ) and then go back
up to zero.

       - Jerryk

Hi Jerry.

Just for context, is this the first project you’ve done on CNC?

CNC machines would normally home (with a limit switch) away from your spoil board. You then manually move the Z down so the bit is touching the top of your work piece, then your design cuts to the depth of the piece. If you do not get this depth right, you will cut the spoil board (hense the name).

Does that make sense?

1 Like

Pretty much. I did do a bit of engraving with the same outfit. And I’ve done a fair amount of 3D printing. I just spent a few days fighting with the FreeCAD “Path” workbench.

I was editing my reply as you replied.

CNC machines would normally home (with a limit switch) away from your spoil board. You then manually move the Z down so the bit is touching the top of your work piece, then your design cuts to the depth of the piece. If you do not get this depth right, you will cut the spoil board (hense the name).

Does that make sense?

Don’t think that’s how this one works. The limit switch is at the very end of the possible run. The equipment is not supposed to go past it. If a limit switch is hit - other than during the Home operation - UGS shows a red “ALARM”, and everything stops.

Limit switches (also used for homing) on cnc rmills, routers, etc are supposed to be in the positive direction. They can be changed and you can modify the grbl settings to coincide with these changes, but there is a reason the industry standard is up. It is so the z can clear clamps/fixtures, and to move the cutting tool back away from you (+y), and to the right (+x) for safety. This “home” position is the machine coordinates system 0,0,0 point. Once the machine is homed like this, you move it to where you want to cut and you set the work coordinate system 0,0, 0 point. You can always (and I would) move the limit switch up to the top. Your $23 value should be zero ($23 = 0) if you go with the industry standard. This will keep you from burying your endmill into the spoil board.

1 Like

@Cg_Mullr is exactly right here.

There are many cuts where you need to be able to cut into the spoilboard, so a negative Z limit at the spoilboard would make no sense. It is absolutely normal to home Z in the positive direction for routing and milling. It’s also common to home only X and Y, and not home Z at all. For milling and routing, you have different lengths for different tools, and either manual or automatic probing to set your Z is necessary at every tool change unless you have a tool system that records relative offsets; not something that’s normal in home routers.

You can set your Z offset like a 3D printer by using a feeler (I’ve used .001" shim stock) or with a plate of known thickness and completing a circuit from the tool to the plate, and then setting that offset, but setting your Z zero to the top of your stock is the way milling and routing is the way it is done.

When you are toolpathing, you normally account for variation in part height by a “safe Z” that will clear the stock which is used for rapids above the stock. So you’ll end up with, say, 2mm safe Z which will result in a G1 Z 2 and then G0 to the next cut location, and then say G1 Z -1.0 to start a cut 1mm below the part surface.

OK, I set my home Z at the top of its travel. Very practical - makes it much easier to change tools. Right now $23 is 3. That puts the home position at the lower L/H corner - just the same as where I put my freecad drawings.

I measured the distance from the top of Z to the top of the spoilboard by just giving the machine G0 commands until it was just right. Came to 42.5mm.

For some reason, FreeCAD sticks an “up 8.2mm” instruction at the beginning of the gcode. This hits the up limit switch and everything comes to a halt. I worked around it by deleting it with a text editor.

Right now, it seems to be properly tracing the outline of my part. Well, almost. For some reason, it insists on tracing the entire part, even though I put the part so two edges coincide with the edges of the stock. Maybe I wasn’t selecting any edges when I created the job? The controls for moving the job with relation to the stock - are all greyed out.

Can anybody supply a clue? Thanks in advance,

             - Jerryk

back panel.FCStd (1.2 MB)

Check the safe height for your job.

It’s normal to trace all the edges. I think you can select only some edges for some ops, but I’m not aware of FreeCAD Path workbench having an option to not cut edges that correspond with stock edges.