Technical - Workshop Notes
CNC coding for Engraving a fixed depth cutting project.
Gary Pope, Life Member of KDWC, has been documenting the use of his CNC 3018PRO Laser/Router unit in recent Ingrained Newsletter articles. It is time to show how to use this machine's ENGRAVING facilities for fixed depth cutting operations.
Fixed Depth, is mentioned specifically, because most TEXT ENGRAVING simply involves cutting each character to a fixed depth (say 1.5mm deep) into the job for instance. This is a totally different scenario to engraving a complex graphics image (like the KDWC Club Logo) where there needs to be layers, with each layer having deeper cuts that others, to give a depth of field feeling. Gary's limited experience in this area has nonetheless been a real fun exercise of learning how to make cheeseboards with family names engraved thereon, and the fixed depth coding was staraight forward.
This article shows how to use free software tools linking a PC to a CNC 3018PRO hobby unit to produce engraving.
The tool bit
A common engraving tool bit is the '30 degree included angle V-Bit'.
It is a 3mm shaft bit, that typically mounts into a CR22 collet.
The cutting edge is a 75 degree (per side) angled cutter
protruding 6m down the bit. The mathematics are important.
The angled tip effective forms a conical shaped hole of 1mm
diameter, if the depth if cut is set to 2mm.
The bottom of the conical hole is zero diameter, and the
obvious hole at the surface level would be 1mm.
In other words, engraving anything to a depth of 2mm deep,
will result in seeing a 1mm wide cut in the surface of the job.
Gary has been experimenting with 10mm MDF board pre-painted
in tough 2-pac paint, making a really durable surface to cut thru.
Having say a white 2-pac finish, with exposed
sandy coloured MDF, allows for staining the MDF as
a contrasting color for the cut away engraving.
Two programs are needed, running on say: Linux Mint v21.
1. Inkscape v1.1.1 from www.inkscape.org
2. UltimateCNC v3.2.2-FREE from ultimatecnc.softgon.nety
1. LibreOffice Writer can be used to prepare a desired TEXT, saved as a .JPG image
2. Inkscape is used to import the JPG image and process it in readiness for G-COde, saved as .SVG file.
3. Inkscape can export the Gcode as a .NGC file
4. UltimateCNC program impots the .NGC file (containing lines of G-code)
and controls the connected CNC Laser/Router via a USB cabled connection.
Job Example: engraving "Frank Cheeseman" onto an Acacia timber cheese platter.
Prepare Image of engraving.
Use Libre Writer with FONT: "URW Chancery L" 72 Font Size exported as: JPG
then rotated 45 degrees and saved to a folder/file say:
Process Image with Inkscape
Open up Inkscape and go to
File ==> Document Properties
and change size to say: 60m(W) "X" x 60mm (H) "Y"
with Border Shadow Unticked so the image will just fit it with a bit left over.
(after we rotate the logo about 30 degrees)
Go to File ==> Import xxxxxx.jpg as a linked file not embedded with
DPI: From File, and
Rendering Mode: None (Auto)
and shift the image nice and tightly inside the Document Properties frame.
(double-click the image to allow the corners to be used for rotating say about 30%)
Next: select the image in the document and go to
Path ==> Trace Bitmap.
Click "APPLY" and "CLOSE
This adds a new object to the document, the original image plus a bitmap version of it.
One is on top of the other so you can only see one of them.
Slide the top one to one side so you can see both and then select and delete the larger one.
Slide the other smaller one, the bitmap back onto the document in the correct place.
Path ==> Object to Path.
Path ==> Dynamic Offset
Now go to
Extensions ==> Gcodetools ==> Tools library.
I found that the only tool in the list that works for me is the Default one at the top.
So select that one and
Apply it. and CLOSE.
A grey box parameter appears by your document.
Select the Text tool on the left and click on and change:
the Diameter mm, say: 1.0
(or try 0.5 diameter for small logos)
feed (speed) say 200.0
Penetration (depth of cut mm) as required.
(This 'Z"-axis setting will be dealt with later)
Step say 0.25mm each increment step to reduce risk of cutting too deep, each PASS)
You also need to add Gcode before path = M3 (start your tool spindle)
and Gcode after path = M5 (stop your tool spindle) to activate your cutter.
select the bitmap image again,
then: Next Extensions ==> Gcodetools ==> Orientation points.
Leave it set to the default Orientation Type =2-points mode and its settings.
BUT set the overall depth (say minus!!!! -1.00mm overall)
(try -0.750mm for small logos)
APPLY and CLOSE
And finally, Extensions ==> Gcodetools ==> Path to Gcode.
(Click APPLY, only) You'll notice 100's of cutting points now.
Save the NGC file (containing all the G-Code)
Following on from the last step above, firstly under the Preferences tab,
set your location and filename where you want your generated Gcode file to be saved.
ie: default output filename: 2022_01_04_Frank_Cheeseman.ngc
AND: set the Z safe height for G00 to say 2.00 (mm)
Then click on the Path to Gcode <tab> ; again,
and when there: click Apply to generate the file.
ignore the alleged error/warning:
Then, to check results of the .NGC file, go to your specified file from the step above
and open it in Notepad or gEDIT or similar text editor.
You should see all the required code needed to cut your image.
Edit it and remove the very first line containing "%" and the same on the last line.
(Not sure why this command is there, as it flags an error when running UltimateCNC)
Save the Inkscape session as a '.SVG file'
Time to process the SVG file on the CNC Laser using Ultimate CNC
Be aware of where the NGC file is, for processing by UltimateCNC program.
Advanced: If UltimateCNC is on another PC closer to the CNC Laser/Router (sayu in the shed)
and you are remotely controlling it, then perhaps use a remote PC tool like DWService.net
and upload the NGC file from your development PC to the CNC controlling PC.
Advanced: Consider using a Smartphone ona stand, looking down the camera to the CNC machine,
for recording the activity of the CNC machine via say a meet.jit.si/xxxxx meeting session, viewed remotely.
Start UltimateCNC program
Assuming the CNC Pro3018 Laser/router is connected via a local USB cable,
then connect the CNC via the serial port.
Typical setting is:
Data Bits: 8
Flow Control: None
On top left of Ultimate CNC click the "+" symbol
to OPEN the NGC file that contains all the G-code.
With UltimateCNC go to the 'Manual Control MENU'
and manually position the head in a safe starting spot
and set the ZERO position for XY and Z.
Turn on the SPINDLE and observe this from the meet.jit.si meeting view....
and use the GO HOME button to observe the spindle move Z-AXIS up and down 2mm
Click on the RUN menu
and start engraving!
Refer to the following earlier editions of Ingrained Newsletter where the selection and setup of the CNC3018PRO Laser/Router was discussed and demonstrated.
Refer to OCT, NOV and DEC 2021 editions at: knoxwoodies.org.au/archives
Working on how to deal with VARIABLE DEPTH cutting using multiple layers.