Skip to content
Home » Home » Coordinate systems & workpiece alignment

Coordinate systems & workpiece alignment

To get the most out of the laser, you should be familiar with the basics of coordinate systems and different modes such as “absolute coordinates”, “current position” and “user origin”. All of these functions have their intended use and are the best choice depending on the project. There is no “right” method here, either; as always, you should use what you are comfortable with. The more familiar you are with it, the easier it is to “just” place and laser a project correctly. That’s why we’ll start with a section on theory and terminology. Procedures that can be used are presented further down.

If you are looking for a quick method to “just laser a design in the center of an object”, you should take a look at the section Positioning without absolute coordinates.

Theory and background

The most important links to the topic of coordinate systems:

LightBurnGRBLLinuxCNC CNCCookbook’s G-Code Tutorial & CNCCookbooks Offsets

Clarification of terms
There are two coordinate systems to distinguish. The machine coordinate system and the workspace coordinate system. These systems can be the same, but they don’t have to be. The firmware takes over the conversion of the coordinates if both systems are different.
Machine coordinate system: This coordinate system is the internal coordinate system of the firmware. It is set either at start or by a reference ride (if set). As a rule, the coordinates do not have to interest the user. They can be (and by default are) negative.
Workspace coordinate system: In this coordinate system (also known as the G54 coordinate system), the user’s control commands are executed. This allows the user to set different coordinates or limits than are available in the firmware. It is even possible to use other working coordinate systems and set two different positions as their zero points. But this usually leads too far for normal use. It is important that you can change the “normal” zero point of the system, which is necessary in different constellations. If you are interested in checking this further, here is a nice video about that: https://www.youtube.com/watch?v=fGtbkVJBXyE

Laser / Firmware

The following picture shows the coordinate system of grbl or CNC machines in general. The origin of the coordinate system is at the back right and goes in the positive direction to the back and right. That is, the work area is completely in a negative coordinate space. The further forward and left you move, the more negative the coordinates become. Ultimately, the front left corner corresponds to the maximum workspace size in a negative form: -Xmax and -Ymax.

Coordinate system of grbl

Set Zero Point

There are two ways to set the zero point of the machine (machine coordinate system):

  • With limit switches and a homing cycle
  • By moving the laser to the desired [0,0] position BEFORE switching on (at the moment of startup, the firmware sets the current position (work area and machine) to [0,0]). This is also maintained until the laser has been switched off or a reference run has been carried out. [Note: The laser will not turn off if you only press the power switch. In addition, the USB cable must also be de-energized, see chapter Firmware-Update]

You can manually tell the firmware at a certain position that the zero point for the work area should be set here. This makes it particularly easier to work with LightBurn, as LB sets the origin to the bottom left (see below). The command to set the zero position at the current position where the laser is currently standing is

G92 X0 Y0

The above command is non-permanent, meaning if you reboot the laser, this setting is gone. If you want to have a permanent setting, use:

G10 L20 P1 X0 Y0

So this is best done after moving the laser to the bottom left. However, this only sets the work area to [0,0] , the machine coordinate system is not. This keeps its zero point where it stood when it was turned on. If you have the position of the laser output, you get accordingly other (e.g., negative) values. You can change this by issuing $10=0 in the console. This sets the reporting to the workspace coordinate system.

In addition, it should be noted that the latter command (G10) stores the coordinates permanently. So, it only makes sense to use it if you use the automatic homing because otherwise you have to run it every time after switching it on or moving the laser by hand (since the start coordinates have most likely changed). This is because the zero position is stored relative to the position where the laser has been turned on.

If no limit switches are mounted and therefore no homing is possible, you should move the laser head to the front left before starting and then switch on the machine. This is the only way to use the entire working space without further tinkering.

LightBurn & LaserGRBL

LightBurn and LaserGRBL work with the coordinate system origin at the bottom left. This is the most intuitive from the user’s perspective, as coordinate systems often start at the bottom left.

LightBurn coordinate system

In these screenshots, you can see the coordinate systems of LB and LaserGRBL. In LightBurn, it is important to set the origin in device settings and the laser window to bottom left. Otherwise, you might have mirrored output.

So, when LB or LaserGRBL send a command to the laser, it is sent in the workspace coordinate system. Suppose the laser is in position [0,0] (regardless of where the head actually stands, the decisive factor is where it stood when it was switched on, whether a homing cycle was made or whether a working coordinate system was manually set). In LB or LaserGRBL, if you give the command to move to the position [20,20], the laser will move 20 mm to the right and 20 mm to the rear. As discussed earlier, this is done in its workspace coordinate system. If the laser is already in the back right, it will drive into the frame. If it stood in the middle, it then stands 20 mm next to and behind the middle.

LB also offers the option of taking the “current” position as the starting point instead of the absolute position. This makes it possible to easily find the target point by manually positioning the laser at a corner or center of a workpiece and then starting the process. Then the coordinates are not used relating to the frame of the laser, but to the current position. For more information, see the LightBurn documentation or the following video:

LightBurn tutorial

Necessity of automatic homing

A question that often arises is whether you need limit switches / automatic homing at all. There is no general answer to this question. Theoretically, this is not necessary for operation. As described, there are also manual methods for aligning the laser. From my perspective, there are the following points to consider:

  • Monitoring / securing the working area: If the laser has a defined and known position at all times, you have the possibility to secure the working area. By using the so-called soft limits, the firmware can cancel commands that would guide the laser outside the working area. So, you can no longer crash into the frame, which is very gentle on the mechanics. However, this can also be achieved with the hard limits, for this purpose, a limit switch must be installed at each end of each axis, and the laser stops automatically when touched.
  • Repeatability: Since the laser with automatic referencing always starts at the same point, it is easier to create series of objects or stop and resume projects. The laser always has the same position during lasering.
  • Intuitive operation: If the coordinate system is set up parallel to the control software, the laser will also laser exactly where the object is displayed in the software’s work area. This usually makes operation easier, but is probably also a question of habituation.

Sometimes, people are still upset using homing with limit switches because there is still a minimal offset between two runs. This is usually caused by the non-industrial-grade mechanics lasers use. But – there is also a small detail you should take care off: If the motors are stopped, they are typically disabled. This means, there is no power to hold them in position. That’s why you can move the laser head manually. Due to the lost power, the laser is losing some control steps, the next time it is turned on. If you want to avoid this, set firmware parameter $1 to 255. This means that the motors are never deactivated. If the laser stops, the motors hold position. Movement will be more precise / repeatable with this setting, but you can’t move the laser head manually anymore.
Another option is to reduce the homing speeds ($24 and $25) because the slower the laser touches the limit switches, the better the position accuracy.

Repeatable positioning without absolute coordinates

[Do you have a better / different workflow / method? Let me know and I’ll update this page! ⇒ diy@melvin-isken.de]

Often the question arises how to work with the coordinate system if you cannot use absolute coordinates (if no automatic homing can be done). I would recommend the following procedure in LightBurn if you need repeatable motion of the laser:

It is essential that the laser is NEVER moved by hand. The system has no sensors to determine the position and does not get this shift! It continues to start from the old point!

  • [Optional] Move the laser by hand to the position that is to serve as the starting position and switch it on. The following procedure only works in positive coordinate space, so in the area to the top and right of the laser head. Therefore, you should move the laser down to the left before turning it on.
  • [Move window] With the button “Set Origin” you can specify the starting point for all work. To do this, use the arrow buttons to move the laser to the desired position (if you didn’t do this by hand before turning it on) and then press the button.
  • [Move window] [optional] With the button “Set Finish Position” you can set the position that will be moved to when the job is done. This is helpful, for example, if you have to work on the workpiece between two jobs, but want to continue at the same position afterwards).
  • [Laser window] You can now move the laser back to the position that you defined at the beginning at any time with the “Go to Origin” button.
  • [Laser window] As starting point, you select “User Origin”. That means, jobs always start at the defined “Origin” position and end at the defined “Finish Position” if necessary.

Notice
Set Origin and Set Finish Position only work in positive coordinate space. You can easily set a zero point if you started at a different position and now want to select a position further left / down:
– the laser is moved (by direction buttons) to the place which should be taken as zero position
– in the console, one enters the command “G10L20P1X0Y0” (see also chapter about limit switches). This sets the working coordinate system at this position to [0,0].
– enter the command $10=0 in the console. Thus, the firmware transmits the coordinates in the workspace coordinate system from now on, which is now [0,0] at this position.
Be aware: the G10…-command is storing this position permanently. So you need to either update this at every restart, or revert it after you are done (issue $10=1 and $RST=# in the command line).

At the top of the move window, you can also save several positions, but this only makes sense if you can always start the laser at the same position.

Move and Laser windows in LightBurn

Positioning without absolute coordinates

Usually, it is not required to work with absolute coordinates. Just select “current position” as starting position in LightBurn and you can start right away. The following videos show some methods on how to align objects in such cases.

Simple method

Here is my method, which has proven itself many times and in my opinion is one of the simplest methods (of course, this depends entirely on your own preferences). Starting point: you have an object (e.g. a coaster) on which you want to laser an engraving either in the middle or at a specific position. Then proceed as follows:

  • Measure the object and create a corresponding shape in LightBurn (oval breakfast tray in the example below).
  • Place this shape on tool layer 1 or 2 (this shape will never be lasered, it is only intended as a guide)
  • Place the design as desired within the tool frame.
  • Set all options as in the screenshot.
  • Place the object in the laser. It is best to place it at a guiding rig or similar (in this case the honeycomb).
  • Move the laser to the corner of the rig (this can be done either with the arrow keys or manually, it doesn’t matter).
  • Select all the desired objects in LightBurn (including the tool frame!)
  • Use the framing (either rectangular or as a rubber band frame, depending on the shape) to check whether the object is correctly positioned in the frame. If not, move the physical object or laser head.
  • If the alignment is correct, start the job.
A: The tool layer must have “Frame” activated; B: these two options mean that only the selected objects are sent AND the origin of the selection is used; C: “Current position” must be selected here; D: this can now be used to check the correct position of the object; E: if all options are set in this way, then this green box is the current position of the laser. No matter where it is in the working area! Therefore, you can also move the laser manually, it doesn’t matter. I have deliberately positioned the graphic next to the grid to show that it doesn’t matter where you have the graphic, only the selected objects are lasered and directly at the point where the laser is currently positioned.

Object in the laser. The laser head must now be placed on the 0,0 position of the honeycomb so that the origin matches that in LightBurn (green box).

This is what it looks like when the object is well-placed and the laser head starting at 0,0 of the honeycomb:

Now just press Start and the design will be lasered in the perfect position. LightBurn recently published a video explaining some of the abovementioned techniques as well:

Other methods

Here is video of a method to place a piece of material right in the center of the object

Here is another video from Mike, demonstrating some practices:

And here are two videos provided by Eelko for the official Sculpfun user group at Facebook:

Alignment tools

You can also simply use a mechanical stop so that you can always manually move the laser to the same place and thus have the same starting position.

Another option is to use a 3D printer to print out a support for the laser. You place this part on the laser, and then you can align the part exactly with the laser focus. Found on Etsy: https://www.etsy.com/de/listing/1159431135/laser-cutter-engraver-40mm30mm-laser. The free version shown below is created by Andre Champoux. There is another version from Stefano Maltauro: https://www.thingiverse.com/thing:5540992 (picture to the right).

If you don’t have a 3D printer, here is the version of Lydie Du, which can be created with the laser itself. The file can be downloaded here: Download-Link (LightBurn + SVG file; you might need to adjust the parameters in the LB file to your material!).

Here’s Lydies description how it works:

  • The inside corner of the ruler indicates where the laser beam starts (I’m not a pro, so maybe there is a slight deviation). (Photo 3)
  • Where the dot is in your design space (I’m using Lightburn), this is where the laser beam will start. Sometimes it is useful to place a guideline around your design. This is where you should place the inside corner of the ruler on your surface to be lasered. (Photo 4)
  • Place the bar with the inside corner on your surface to be lasered where you want the laser to start. (Photo 5)
  • Slide the laser head all the way to the corner of the ruler. (Photo 6)
  • It’s precisely where I want it. I was able to make optimal use of a scrap piece.
  • Remove the bar when you start lasering! Simple, easy, and fast.

“Mass” production

If you need to create many objects of the same type, the easiest way is to create a template to position the objects in. Here are two examples of templates I used. I can align the laser to the bottom-left corner of the wooden plate, then do a framing as a quick check if everything is positioned correctly, and then start to burn as many objects as I like. It’s even possible to do front and backside lasering using this method.

Example for small objects like pendants

Alignment using a camera (LightBurn)

Recently, I published another article about using the camera with some more in-depth explanations. Check it out!

LightBurn offers another very ingenious feature that allows you to align workpieces via camera image. The camera image is superimposed on the workspace, and you can see the real object and align your design to it. Since this only works if LightBurn can correctly superimpose the camera image and the real workspace, a calibration must be performed and saved at the beginning. Afterward, the camera must not be moved; otherwise the calibration must be done again. The instructions can be found here: LightBurn: Using a Camera. In my experience, the manual methods from above are usually faster, as they are much less error-prone than camera calibration. Still, a very cool feature.

Screenshot taken from LightBurn Documentation

Note on camera type / webcam
The most common question on this topic is which webcam you can use for this. The answer is: any camera that is recognized as a USB webcam by the computer can be used! I tested it with a 10€ China webcam from Amazon. The higher the resolution, the better the detail sharpness. Depending on the distance to the laser, a more or less wide angle / fish eye lens is necessary. The rule is: only as much wide angle as necessary! The fewer pixels that have to be perspective-corrected, the better.

Here are a few more videos on how to set up & use the feature: