1
\$\begingroup\$

The GRBL library for Arduino looks very comprehensive but I like to understand how things work before I try to build them. Something I don't understand is how these systems get positional feedback.

I know it is common to set a Z point for a given tool, but this is just an offset. As far as I can tell from my reading it all depends on a combination of timing and stepper motors successfully executing exactly as instructed. I find it hard to believe that nothing ever gets out of synch.

Is there some kind of ongoing reality check other than stop switches to prevent out of bound travel? How does it work?

How do they measure slop and backlash to compensate for them?

I can think of ways I might try to do it but I've never seen my imagined feedback systems on any "real" CNC machine, so I have to ask.


Thanks to Spiro for a fabulous answer, but it led to me finding this response to a request for closed loop support in the GRBL github issues. It's the position of the maintainers.

I think the general idea is to never run into the problem of losing position. The motors and drive system need to be robust enough to handle the cutting forces. For open loop control, like Grbl, this is mandatory. For closed loop, this is still pretty much mandatory. In my view, closed loop control only gives you the ability to catch the error. In a properly size CNC system, the errors willl be nonexistent or very rare.

Well... crumbs. How am I supposed to build a fancy machine that finds the crookedly mounted billet and figures out its own offset and rotation ?

My desire for feedback arises more from fears of belt stretch but as Spiro points out ball screws are a better answer. A really expensive better answer, but that's not Spiro's fault.

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

Many hobby systems these days are completely open-loop. The controller sends pulses to stepper motors and the stepper motors move incrementally a certain number of steps. There are hybrid servos which pretend to be steppers as far as control signals go, but actually have feedback to shaft motion, so they are closed loop at least to some degree. With open-loop steppers it's possible to lose steps because commanded acceleration or speed is excessive for the conditions or if the torque required is too great. That generally results in a ruined part, because remaining motions take place from a position that is not where the cutter actually is located.

The machine is homed on the table, the workpiece is located with respect to the machine coordinate system (manually it can be done with and edge finder, for example) so the machine knows where 0,0,0 is on the workpiece. Big VMCs usually have a probe consisting of a ruby ball on a probe that can locate the workpiece from features that already exist (for example, finding the center of a bored hole).

Good CNC systems at least have ball screws which don't suffer from backlash because they are preloaded with more pressure than the motion will require. It's possible to do limited correction for backlash by always approaching a position from one direction, and that's what manual machinists will do. To get fully closed-loop feedback you need something like Heidenhain scales on the machine to give the motion controller real-time feedback and real servomotors. For that kind of system, the motion controller is a fairly powerful computer, something like a DSP and/or FPGA implementation.

If you're using GRBL, Mach 3, Linux CNC you'll probably use an edge finder, coaxial indicator etc. just like you would on a manual machine. For rougher work, you can home the table to switches and assume the workpiece is accurately enough located wrt the machine coordinate system. If you have a jig to locate the workpiece on the table that can be pretty good for series production.

\$\endgroup\$
0
0
\$\begingroup\$

Is there some kind of ongoing reality check other than stop switches to prevent out-of-bound travel? How does it work?

Negative. Most GRBL stepper drivers are blissfully ignorant of "missed" steps, so will continue to move but with an offset position. One or two steps may be barely noticeable, but more than this can result in a failed part at best, and tool/machine damage at worst.

GRBL assumes that every step will be honored and none will fail. If this is true during all operations, then cutting will commence as planned and the part will be correct.

In setting up the GRBL machine, the maximum speed and acceleration of each axis where missed steps can happen is determined. Then the machine is run some safety margin under these limits, as to prevent them from happening.

Well... crumbs. How am I supposed to build a fancy machine that finds the crookedly mounted billet and figures out its own offset and rotation ?

This isn't really feasible due to the way GRBL code is generated and used. To "correct" existing GRBL code for a crooked billet, every instruction in the GRBL code would need adjusting. This is not trivial; only a CAM software would be able to do that.

Instead, it is much easier (and assumed) that the machine axes are first trammed and squared. Then the billet is installed square to these axes, from a (square) guide or by touching the long billet edge to the cutter at two different X or Y positions (since the cutter axes are square.) Then the offset is corrected, and the machine cuts the GRBL code exactly as instructed. Since everything is square, these operations result in the correct size, shape, and location of part.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.