So now that we have all the software we need (see part 1), we need to get it up and running. There are three parts to this:
- Re-flash Arduino controller with GRBL
- Install LaserWeb
- Configure LaserWeb
To re-flash the Arduino that controls the laser engraver we need to use XLoader. It’s relatively straightforward to use, open it from the download folder and you should see this screen:
The hex file selected should be the GRBL .hex file you downloaded from part one. The device is the Duemilanove/Nano(ATmega328). Com port will most likely be COM5 or 6, but the easiest way to find it is to unplug the laser engraver and see which one disappears from the list, this will be the one you need (when you plug it back in). Baud rate stays are 57600 for the flashing process. Hit upload, let XLoader do its thing and then move onto the next step.
Not too much to this step. Basically just run the installer that you downloaded in part 1.
Now this is the section where I ran into a couple of issues, and things differed a bit from the video I post in part 1. LaserWeb is now a stand alone program and doesn’t need to viewed through a web browser, so just run the desktop/start menu short cut and it should open for you. Now there are few configuration options that need to be setup.
You will need to connect to the laser engraver every time you open laserWeb. This is done through this tab. The options here are “machine connection” which will most likely be USB. USB/Serial Port, this should be the same COM number that used to Re-flash the Arduino controller. Baud rate should be left at 115200.
This section probably looks more daunting than it really is. I only really changed three settings here. The first is to make sure profile is a “Generic GRBL machine.” The second was to set the machine size in the “machine” section. Whilst this is not strictly necessary its nice to have an idea of how big your design looks relative to you machine size. The final and most important one is to set the “Tool On” and “Tool Off” codes in the “GCode” section. This tells LaserWeb what code it needs to send to the engraver to turn the laser on and off. These should be set to “M3” and “M5” respectively (see screenshot below):
Now I had all the above steps completed and I could make some engravings but a couple of things weren’t right. Changing the cut speed in the job settings didn’t seem to make much difference, and my designs weren’t coming out the right size. It turns out that GRBL has a bunch of internal parameters that need to be configured before everything works properly. You can view these parameters by typing “$$” (without the quotes) into the command bar on LaserWeb, and then pressing “Enter”. See image below:
This should return something like the information below (and a few others as well):
The list shown above are the settings I have changed and their current values. This page has a list of what they mean: https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration. Basically $100 and $101 are the number of steps per mm of travel. I worked this out by drawing a 100mm x 100mm square in my cad program and then running that as a job. I then measured the actual dimensions, divided them by 100mm, which gave me around 3.14. The original values of $100 and $101 were 250, so I divided 250 by 3.14 to get a value of ~80. You need to round this to the nearest whole number as a stepper motor can’t really move half a step. $110 and $111 are the maximum cut speeds in mm/min. $120 and $121 are the max acceleration speeds in mm/s^2. These are basically trial and error values that depend on what the motors of your engraver can handle. My values probably need a bit of tweaking as to get to the maximum cut speed I will need to be cutting a straight line for 10s, which would be well beyond the size of the cutting area. With this in mind it is probably best to try cutting your 100mm x 100mm square again with gradually increasing acceleration values until you motors start to miss steps. Then come back about 20%. Then do the same for the maximum cut speeds. As my setup has quite a weak laser (500mW), going to fast means I don’t really engrave anything, so I’m not too fussed about the maximum speeds. People with more powerful lasers will want to put some more time into it though.
Hopefully this helps a few people out and if you run into and issues feel free to leave a comment and I’ll see if I can help. Stay tuned for the comparison and final results post.