Grbl tilt compensation

Talk about all things CNC
Post Reply
DRobs86
Posts: 148
Joined: Fri Jun 05, 2015 4:19 am

Grbl tilt compensation

Post by DRobs86 » Sat Jun 20, 2015 8:33 pm

I'm looking for some info on performing tilt compensation prior to running my work. I'm looking for something like what Marlin
Auto Bed Level" does for 3d printers. For those that aren't familiar, Marlin Auto Bed Level probes the print surface, calculates the plane, and compensates for tilt at run time by adjusting Z height as the machine moves along the XY plane.

There are several ways that the probe can be implemented in Marlin, but a servo arm controlled switch is the most common. I know later version of grbl have a probe command but I'm not sure how it's often used beyond zeroing z height at one point.

If this can't be done at runtime, is there anything out there that modifies the Gcode file based on a calculated plane from probing operations? I'm thinking beyond just metal engraving, but also large wood pieces.... perhaps something that let's you define probe points, moves to position one, waits for the user to confirm that the touch plate is positioned, probe, move to next point, waits again for the user to confirm that the touch plate is positioned, probes, and so on, until probing is complete. The user would then select the gcode file which would be modified for tilt compensate.

Is there anything (free) like this out there?

Thanks

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: Grbl tilt compensation

Post by chamnit » Sat Jun 20, 2015 9:19 pm

It's not that Grbl can't do the calculations to compensate for table tilt like Marlin does. It's easy. The problem is that the way 3d printers work versus how CNC milling work is different. With a 3d printer, you are laying a bead. You can tilt all you want and it doesn't effect how the plastic is being laid down. With milling, it's a different problem altogether. You have a bit that has some length with a cutting edge. If you compensate for tilt in a mill, you end up tilting the cutter and it no longer is perpendicular to the bed. If your operation is doing side milling, cutting along the side of the cutter, you will have a part that is tilted along the sides.

What you can do is adjust for Z, based on probing locations. It's better to do this since this ensures the cutter is perpendicular to the machine at all times. A couple of Grbl GUIs do this already. Chilipeppr is one. The other is bCNC. I'm sure I'm missing one or two, but these two are the most popular.

WillAdams
Posts: 8489
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Grbl tilt compensation

Post by WillAdams » Sat Jun 20, 2015 9:24 pm

It's one of the features of bCNC and I believe Chili Peppr

http://www.shapeoko.com/wiki/index.php/ ... o-leveling
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

Gadgetman!
Posts: 1061
Joined: Sun Aug 25, 2013 12:44 pm
Location: Norway
Contact:

Re: Grbl tilt compensation

Post by Gadgetman! » Sat Jun 20, 2015 9:48 pm

What you need isn't a way for GRBL to compensate, but a way to ensure that your bed is level to the rest of the machine.

One way is to level it is by running a large endmill across it and shaving off a thin layer every now and then.

Or you could do as I do when I need the extra accuracy...
I position the endmill over the corner of the workpiece that I believe is higher than the rest, make certain it's a measurable distance off(feeler gauges are nice), then move the spindle to other corners, measure the gap and stuff shims under the workpiece until the gap is correct.
(A couple of sets of feeler gauges works well for shims.)
It's a pain to get right on large pieces, though, since they usually need shims in the middle, also.
Weird guy...
Shapeoko 2014F: 1000mm X/Y, 300W Quiet Cut spindle, Arduino Uno/G-shield and GRBL 0.9i
15x30 drag chains, custom spindle mount, 9mm belts, 8mm endplates, 6mm motor plates.

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: Grbl tilt compensation

Post by chamnit » Sat Jun 20, 2015 9:54 pm

Gadgetman! wrote:What you need isn't a way for GRBL to compensate, but a way to ensure that your bed is level to the rest of the machine.

One way is to level it is by running a large endmill across it and shaving off a thin layer every now and then.

Or you could do as I do when I need the extra accuracy...
I position the endmill over the corner of the workpiece that I believe is higher than the rest, make certain it's a measurable distance off(feeler gauges are nice), then move the spindle to other corners, measure the gap and stuff shims under the workpiece until the gap is correct.
(A couple of sets of feeler gauges works well for shims.)
It's a pain to get right on large pieces, though, since they usually need shims in the middle, also.
That's definitely a good way to do it. But, I think he's talking about for engraving on a non-flat surface as well. To get a good result, you have to adjust for minor fluctuations in the surface of the material or it won't look right. Milling PCBs has this same issue.

DRobs86
Posts: 148
Joined: Fri Jun 05, 2015 4:19 am

Re: Grbl tilt compensation

Post by DRobs86 » Sun Jun 21, 2015 2:34 am

chamnit wrote:It's not that Grbl can't do the calculations to compensate for table tilt like Marlin does. It's easy. The problem is that the way 3d printers work versus how CNC milling work is different. With a 3d printer, you are laying a bead. You can tilt all you want and it doesn't effect how the plastic is being laid down. With milling, it's a different problem altogether. You have a bit that has some length with a cutting edge. If you compensate for tilt in a mill, you end up tilting the cutter and it no longer is perpendicular to the bed. If your operation is doing side milling, cutting along the side of the cutter, you will have a part that is tilted along the sides.

What you can do is adjust for Z, based on probing locations. It's better to do this since this ensures the cutter is perpendicular to the machine at all times. A couple of Grbl GUIs do this already. Chilipeppr is one. The other is bCNC. I'm sure I'm missing one or two, but these two are the most popular.
I'm not following completely on your comparison between printing and milling as it relates to tilt compensation. I agree with the issues caused by the end mill not being orthogonal to the workpiece, but I'm not sure how this is exacerbated by tilt compensation on a three axis machine. I think the issue that you are describing exists without compensating for tilt. The compensation which you describe in the second paragraph still leaves the end mill cutting non-perpendicular if the workpiece started unlevel, but you'll keep from going deeper than expected on some portions of the surface. I must be misunderstanding something here.

Thanks for the heads up on Chilipepper and bCNC. I'm looking into those now.

Gadget man: I agree on just leveling right in the first place. It's just that not getting it right to begin with is unforgiving on longer runs. My machine (not a Shapeoko) has about an 18 x 30" cutting area. A quarter of a degree out of level equates to over 3.25mm of Z height error over a 30" run.

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: Grbl tilt compensation

Post by chamnit » Sun Jun 21, 2015 3:35 am

Ok. If you are cutting a deep pocket and the end mill is not aligned with the pocket due to a tilt correction, the end mill will rub against one of the sides of the pocket. This will either cause the end mill to cut extra material out you weren't intending or, more often, the pocket is deeper than the end mill cutter length and the non-cutting shaft ends up rubbing hard against the wall. This causes the end mill to push hard against the workpiece, which results in the workpiece moving, the machine losing steps, the end mill breaking, or a combination of these. With a 3d printer, you don't have the clearance issues with a cutter shaft to deal with. The extruder can be rotated several degrees and no effect on how it prints due how it prints layer by layer.

The best thing to do is to make sure your end mill/spindle is perfectly perpendicular to the X-Y bed of the machine. This eliminates these problems. The auto-leveling feature of Chilipeppr and bCNC allow you to engrave precisely if your work piece isn't perfectly flat. It's also an approximation with its own issues, but ensures that your machine is still perpendicular to the cutter. If you have a workpiece that is tilted you really should model the tilt in your CAM program and have it figure out the correct toolpaths to avoid these issues.

DRobs86
Posts: 148
Joined: Fri Jun 05, 2015 4:19 am

Re: Grbl tilt compensation

Post by DRobs86 » Sun Jun 21, 2015 6:11 am

chamnit wrote:Ok. If you are cutting a deep pocket and the end mill is not aligned with the pocket due to a tilt correction, the end mill will rub against one of the sides of the pocket. This will either cause the end mill to cut extra material out you weren't intending or, more often, the pocket is deeper than the end mill cutter length and the non-cutting shaft ends up rubbing hard against the wall. This causes the end mill to push hard against the workpiece, which results in the workpiece moving, the machine losing steps, the end mill breaking, or a combination of these. With a 3d printer, you don't have the clearance issues with a cutter shaft to deal with. The extruder can be rotated several degrees and no effect on how it prints due how it prints layer by layer.

The best thing to do is to make sure your end mill/spindle is perfectly perpendicular to the X-Y bed of the machine. This eliminates these problems. The auto-leveling feature of Chilipeppr and bCNC allow you to engrave precisely if your work piece isn't perfectly flat. It's also an approximation with its own issues, but ensures that your machine is still perpendicular to the cutter. If you have a workpiece that is tilted you really should model the tilt in your CAM program and have it figure out the correct toolpaths to avoid these issues.
I agree on the part about just making sure it's perpendicular. I was hoping to save myself some time on setting up the workpiece by using tilt compensation. I'm planning on running some jobs that require only loose tolerances where the milling operation might only take perhaps 10 minutes but I'll need to make 10 or 15 at a time; hence the desire to slap a piece on, bolt it down, get a quick tilt compensation calc, and start running.

I'm new to milling and I realize that you are a subject matter expert, but I still have some disagreements.

First, I'll start by agreeing that no amount of software tilt compensation is going to make the walls of a pocket perfectly square. I accept that if there is one degree of tilt in the workpiece in the Y direction that a square pocket is going to have 89 degrees between the XY and XZ planes on one wall and 91 degrees on the opposite wall. My point is that this occurs with or without tilt compensation. The difference is that without tilt compensation the depth of the pocket is deeper than expected on one end by a factor of tan(theta)*pocket length. With tilt compensation, the angle issue remains, but the pocket depth is uniform. I think this mitigates the issue of running the end mill into the work beyond flute length that you spoke of.

I do see your point about how this type of issue isn't present in a tilt compensated printer.

Post Reply