Introduction: 3D Printer Laser Modification

Most of my DIY projects make use of a 3D printer. The big advantage is that you can design and make your own 3D objects. In a previous instructable I've assembled and improved an Anet A8 3D printer. And after a few improvements, this printer gives a nice result.

In addition to a 3D printer, it can be useful to use a CNC machine or a laser cutter. I've already attached a dremel to the Anet A8 3D printer. And this is also documented in a previous Instructable.

This is the third Instructable with the Anet A8 3D printer. And this time I've altered the 3D printer into a laser cutter. This project starts with a working 3D printer. And it is not necessary to read the previous parts.


The laser used is a 5 Watt diode laser. This makes it possible to cut or engrave cardboard, fabric and wood. The used materials may not be too hard (metal), too transparent (plastic) or too thick (> 3 to 5 mm).

I opted for a separate 12 Volt laser. Without the controller and power supply. The 3D printer already contains a 12 Volt power supply and the laser is controlled by the mainboard of the printer. The omission of these parts made it possible to choose the slightly more expensive 5500mW laser, instead of the 2500mW laser.

Converting the 3D printer to a laser cutter is relatively easy. It can be done by anyone who has assembled a 3D printer. First, the nozzle is replaced by a laser, using a self-made 3D printed holder. Then the laser is connected to the power supply and the mainboard. The laser circuit is optically sepparated from the 3D printer circuit. This makes the modification mainboard independend, so the laser can be mounted on almost any 3D printer.

Supplies

Step 1: 5500 MW Diode Laser

There are two types of laser cutters: CO2 and diode (semiconductor) lasers. The C02 laser have a much greater power than diode lases, but these are also a lot more expensive. Therefore this Instructable is about a diode laser.

You can remove a diode laser from any DVD burner and use it as a laser engraver. However, these lasers have very low power. It is therefore not possible to cut wood with these. There are also various DIY packages with a diode laser. These range from cheap (low/medium power) mini laser machines (3.5 x 3.5 inch) to desktop size laser engravers/cutters. Or combined CNC and laser machines.

The idea is to convert an Anet A8 3D printer into a laser cutter. And this printer already has a 12 Volt power supply and a mainboard to control the steppers, nozzle and fans. So by using a 3D printer, it's not necessary to purchase a power supply, mainboard, motors and frame.

The chosen laser basically comes from a DIY package. I've read the instructions from this engraving device before purchasing this laser. But I've bought only the laser package and not the entire product. This package consists of a driver board, cooling fan and the Blue-violet 5500 mw diode laser inside a cooling element.


3D printers work with GCode commands. And a GCode command must therefore be used to switch the laser on and off to control the output power.

A 3D printer nozzle consists of different elements. The heating element is switched on and off, while the temperature is measured with a termistor. This temperature is controlled with a Gcode command. The given temperature is converted (by the firmware) into a series of on/off commands. And the mass inertia of the heater block gives a constant temperature. Because a laser has no temperature feedback, this output port is therefore not suitable for the laser.

The 3D printer's nozzle also has 2 fans. And the speed of the fan near the nozzle can be controlled with a GCode command. This port can therefore be used for quickly switching the laser on and off.

The Alfawise laser is availavle in 500 mW, 2500 mW and 5500 mW. Only the 2500 mW and 5500 mW versions have TTL/PWM control. Which is required to regulate the output power. Due to the small price difference, I have chosen the 5500 mW version.

Step 2: Warning

I've ordered a Class 4 laser. And this laser has enough power to do some serious damage. That's why I start this instructable with a warning: Avoid direct and indirect exposure to the laser beam.

goggles

The laser comes with goggles. Use this when working with the laser!

Always wear these goggles when powering on the 3D printer with this laser attached to it. The laser will be attached to a fan output port. And the 3D printer's firmware does not know that there is a laser attached. This is It is supposed to be a (harmless) fan. My Anet A8 3D printer doesn't enable this fan at startup. But it's always possible that your (other brand/different firmware) 3D printer enables the fan at startup!

The laser beam is facing down. It doesn't have enough power to burn through the aluminum heatbed. But the heatbed will bounce back the laser beam in one or more random directions. This is why everyone in the room should wear goggles. AND DO NOT USE SUNGLASSES FOR LASER PROTECTION.

Fumes

You can try to laser any material. But you shouldn't! Only use paper, wood, metal and stone. But remember, this laser does not have enough power for metal and stone.

By cutting with a laser, material is evaporated by means of heat. The removed material is therefore released in the form of vapor or soot. Always use the laser cutter in a well-ventilated area.

Take care when working with plastic material. Some types release toxic gases (chorin gas). Never use PVC (Poly Vinyl Chloride / vinyl / fake & imitation leather), Carbon fiber or fiber glass.
Acrylic (PMMA) should be safe to use.

Fire

This laser can set items on fire. Keep your workbench clean and free of inflammable items. And don't leave this machine running unattended.


Note: I've used an old phone/camera for most of the laser-pictures. I didn't want to risk my regular camera.

Step 3: Anet A8 Fan Control

There are several ways to control the speed of a fan. The Anet A8 printer uses fans with two wires: They only have plus and minus (ground/GND). And the printer's mainboard handles the speed control of this fan. There is no feedback from the fan to the mainboard. In fact, you can run this printer with no fan connected (ABS filament).

The fan used for this printer is a 12 volt fan. And it is quickly switched on and off to make it run slower. A PWM like signal (second image) is made to control the fan used just like a regular 4 wire PWM fan. However, the voltage used is 12 volts, and not 5 volts as required with regular PWM devices. Remember, the 12 Volt output is always on or off, there is no voltage regulation. The speed of the pulses and the inertia of the fan cause the fan to run slower as the pulses become shorter.

The laser is therefore always on or off. There is no half power! The average power is controlled by switching the laser on and off very quickly. The amount of energy released (on average) is therefore lower. In practice, a 50% duty cycle means half power. But in fact the laser burns 50% in full and is 50% off.

The Anet mainboard is specially designed for this printer. And it is not taken into account that someone wants to convert it into a laser cutter. As a result, it's not possible to connect the 12 Volt output of the Anet A8 mainboard directly as a 5 Volt PWM input signal.

The Anet A8 fan is a 12 volt fan which requires 0.18 Amps. This results in 12 * 0,18 Amps = 2,16 Watt. Which should be the maximum power output for this port. It should be possible to connect a 2 Watt (2000 mW) laser directly to this fan port. I don't recommend this, but this port should be able to drive the 500 mW Alfawise (12 volt) laser directly.

The speed of the fan is controlled with the M106 GCode command. A value of 255 gives the maximum speed, and a value of 128 gives half speed. Measuring the fan with a regular multimeter gives the following values:

Speed  Voltage                 Current
S255   12 volt                 122 mA
S192   about 9 volt (average)   95 mA 
S128   about 6 volt (average)   70 mA

To reduce the voltage from 12 volts to 5 volts two resistors are used: 12 volts and 0.18 Amps give a minimum resistance of 66 ohms. This is way too much current, since the port is only used as a logic PWM import port. I opt for a total resistance of about 1 KOhm. This gives a maximum current of 12 mA.

To divide the 12 volts into 5 and 7 volts, this requires two resistors of 416 and 583 ohms. However, these are not standard resistance values. That's why I choose the two nearest values that I have in stock (… 270Ω, 330Ω, 470Ω, 510Ω, 680Ω, 1KΩ …).

If the 5 volt resistor equals 330 Ohm, the other resistor should be 7/(5/330) = 462 Ohm. The nearest available value is 470 Ohm. A total resistance of 800 Ohm.

If the 5 volt resistor equals 470 Ohm, the other resistor should be 7/(5/470) = 658 Ohm. With a nearest available value of 680 Ohm. A total resistance of 1150 Ohm.

Step 4: Mount Plate

It is possible to attach the laser near the existing extruder. But this reduces the total work area. That's why I made a mount plate to replace the entire extruder carriage.

The mount plate consists of two parts. The first part is attached to the bearings and the second part to the laser (m3 bolt). Then both parts are attached to each other.

Step 5: Focus

This laser must on focus on the material. This is very simple: Rotate the focusing ring until the dot is the smallest. This places the energy of the laser on a small surface. Which gives maximum results.

You can focus the laser onto the heatbed, but the laser won't be in focus on top of the material. Use a piece of material (3 mm wood) and move the laser (Z axis) 20 mm (about 1 inch) above the material. Because the Z axis can move, it is not necessary to refocus the laser when using thicker material. Material of 5 mm gives an initial Z value of 20 + 2 mm.

Don't focus the laser at full power. Use the wheel near the laser driver (on top) to reduce the laser power to 10 - 25%. Remove the PWM signal cable to enable manual control.


Another way to find the right focus point is to draw straight line, where the Z distance increases slowly. This can be done with the following GCode:

M106 S0
G92
G2
G0 F200 
G1 F50
G0 X10 Y10 Z0
G4 P0
M106 S255
G0 X20 Y20 Z0
G0 X30 Y70 Z5
G0 X40 Y20 Z15
G0 X50 Y70 Z20
G0 X60 Y20 Z25
G0 X70 Y70 Z30
G0 X80 Y20 Z35
G0 X90 Y70 Z40
G0 X100 Y20 Z45
G0 X110 Y70 Z50
G4 P0
M106 S0

This disables the laser and moves to x-y position (20,20) at the lowest height (z = 0). Then the laser is turned on full (always wear the goggles). And the laser moves in a zig-zag pattern to a height of 50mm.

I manually pre-focussed the laser at about 20 mm. And this test showed that 15 mm is a better value.


Executing this test at a lower value gives a better result. Use S128 for half power or S85 for 1/3th power, or use the wheel to lower the output power.

Step 6: Makercase

MakerCase is a web-based application for designing boxes or project cases for laser cutters and CNC routers. And I'm using the output from this website to explain the workflow to create a small box with this laser. This is not the most optimal way, but it clearly shows the different steps.


Create a box on the MakerCase website

The 3D box design must be saved to a SVG file. Disable the labels and use #000000 (black) as line color. This (readable) SVG file contains all lines which are required to create this box.

Just like a STL file, a SVG file must be translated to GCode commands for the 3D printer. And there is an online tool for this: JSCUT. This tool requires some settings for the material and lasercutter/tool:

  • Material: 3 mm with the laser focus on 20 mm above the material.
  • Tool: Pass depth = 0.5mm (6 passes) or 0.75mm (4 passes). With a cutting speed of 50 mm/min.
  • Gcode Conversion: Select "Zero lower left". This defines the tool start position.

Select the six parts and press "Create Operation" with the Outside operation. And save the GCode to a local file.


The GCode file contains all commands which must be executed by the printer. JSCUT is a generic SVG to GCode converter. And It's far from perfect to be used for a laser cutter. But it creates very readable GCode which makes this a perfect example.

G21         ; Set units to mm
G90         ; Absolute positioning
G1 Z20 F100      ; Move to clearance level

;
; Operation:    0
; Name:         
; Type:         Outside
; Paths:        6
; Direction:    Conventional
; Cut Depth:    0.49999999999999994
; Pass Depth:   0.49999999999999994
; Plunge rate:  100
; Cut rate:     50
;

; Path 0
; Rapid to initial position
G1 X60.0250 Y50.0497 F100
G1 Z0.0000
; plunge
G1 Z-0.5000 F100
; cut
G1 X56.0250 Y50.0497 F50
G1 X56.0095 Y50.0444
G1 X56.0024 Y50.0357
G1 X56.0001 Y50.0248
G1 X56.0001 Y43.0494

There is no 'HOME' command in this file. You have to home the laser to the initial position yourself, before executing this file. All values are in absolute milimeters (common for 3D printers) and the third line moves the toolhead an additonal 20 mm above the heatbed.

There are some problems with this file (and I will solve them in the next step with a different tool):

  • There are no commands to turn the laser on or off. You have to turn on the laser manually. And it will stay on during the entire operation.
  • The toolhead moves down to Z position 0 and -0.5 (line 20 and 22). This makes the laser out of focus.
  • The file only contains a single pass. It should have 6 passes. Each pass 0.5 mm below the previous one.

These items can be corrected with a text editor:

; laser off
M106 S0

G21         ; Set units to mm
G90         ; Absolute positioning
G1 Z20 F100 ; Move to focus level

; first pass
G0 Z20.0000 F100

; Path 0
; Rapid to initial position
G0 X60.0250 Y50.0497 F100
; laser on
M106 S255
G1 X56.0250 Y50.0497 F50
G1 X56.0095 Y50.0444
G1 X56.0024 Y50.0357
G1 X56.0001 Y50.0248
G1 X56.0001 Y43.0494

All "plunge" lines are replaced with "laser on" commands. And the "retract" lines are replaced with "laser off" commands.

Step 7: Inkscape

Inkscape is a vector graphics software which allows to create and alter SVG files. The MakerCase-website from the previous step generated a SVG file. Inkscape makes it possible to modify this file. And I've added six numbers (1-6) to the MakerCase output file.

The SVG file has to be converted to a Gcode file required for the laser cutter. This can be done with a plugin in Inkscape. Just download the "J Tech Laser Tool" plugin and extract the files in the Inkscape extensions folder (C:\Program Files\Inkscape\share\extensions). This gives a "Generate Laser Gcode" option in the Extensions menu.

Select all objects in the SVG file and convert these to paths. Select the plugin and use the M106 and M106 commands (twice) to turn the laser on and off. I've entered six passes with a speed of 100 mm/min for my first test.

This gives a GCode file which can be used by a 3D printer.

M106 S0

G90
G21
G1 F100
G1 X132.1175 Y17.4612
G4 P0 
M106 S255
G4 P0
G1 F100.000000
G2 X131.1343 Y13.5656 I-8.2096 J-0.
G2 X128.2415 Y10.2713 I-8.6044 J4.6385
G2 X124.1434 Y8.2691 I-7.9016 J10.9775
G2 X118.7842 Y7.5 I-5.3592 J18.2887
G2 X115.9667 Y7.6789 I-0. J22.2768

The file starts with disabling the laser (M106 S0 equals M107, which is deprecated and doesn't allow parameters). And the printer is placed in absolute position mode with values in milimeters.

Then the laser moves to position (X132.1175, Y17.4612) and is turned on at maximum power. The G2 commands move the toolhead (just like G0 and G1). But G2 and G3 are circular movements.

After the first layer the laser is moved down for 0.5 milimeter (G1 Z-0.5):

G1 X1.5 Y93.
G1 X0. Y93.
G4 P0 
M106 S0
G1 F100
G91
G1 Z-0.5
G90
G1 X132.1175 Y17.4612
G4 P0 
M106 S255
G4 P0
G1 F100.000000
G2 X131.1343 Y13.5656 I-8.2096 J-0.
G2 X128.2415 Y10.2713 I-8.6044 J4.6385

Normally this would move the toolhead 0.5 mm beneath the surface of the heatbed. But the G91 places the printer in relative position mode. And after the movement the G90 places the printer back in absolute postion mode.
The laser is turned off before moving down (M106 S0) and turned on after reaching postion (X132.1175, Y17.4612).

This Gcode file doesn't home the printer and it doesn't focus the laser. So you have to position/focus the laser before executing this file.

Step 8: GCode

The GCode file from the Inkscape contains the G1 commands to move the toolhead linear to a certain position. This command is normally used for to extrude filament. The file doesn't contain the G0 (rapid) move command. It changes the speed with the F-parameter instead.

The file also contains G2 and G3 codes. And these circular commands are not common for 3D printers. I've been using these ARC-commands while working with the CNC/dremel version of this Anet A8 printer. And the Anet a8 firmware allows these commands.
I've tested the entire file with usage of a marker (first image). The laser code enables and disables the fan when moving with G0. But It doesn't move the Z axis up and down.


GCode programs are a list of commands to control automated machine tools (like cnc machines, 3D printers and laser cutters). This 3D printer receives these commands from an attached computer (USB) or reads these from a file from the SD card.

Normally it's the slicer who translates the 3D model (STL-file) into gcode instructions. The output of the slicer depends on the printer and material settings. You can't use a Prusa clone GCode file on a Delta 3D printer.
Laser cutters require 2D SVG files. These can be translated to GCode files (with the Inkscape extension).

It takes a program like 'pronterface' to send Gcode commands to the printer. I would advice the graphical interface to start with. But you can also use the command line version.
Connect to the printer by selecting the COM port and speed: for example COM4/15200 and press connect. Now you can control/move the printer with the graphical interface (home, set temperature and extract/retract). But you can also enter GCode commands.

This Instructable uses the following commands. And you can try them safely after disconnecting the laser's power wires.


G28: Home

Moves the toolhead to the starting position (0,0,0).

M114: Current Position

Displays the current position of the toolhead.

G20: Set Units to Inches

Changes the values for the G0-G3 commands to inches.

G21: Set Units to Millimeters

Changes the values for the G0-G3 commands to millimeters (default).

G0: Rapid movement

G1: Extrusion movement

G0 and G1 are used for linear movement. They are the same, but G0 is normally used for rapid movement.

Use the new X, Y and/or Z position as parameter and the toolhead moves to this position. The speed is defined by the F-parameter (or the last known speed is used).

G2: Clockwise arc

G3: Counter-clockwise arc

Move from the current position to the new (X, Y) position with a constant distance (circular) from position (I, J).

G4: Pause

Wait for S seconds. The value P0 is used to wait until all commands are executed.

M106: set fan speed

Set fan speed to S-value.
TURNS ON THE LASER!

M107: set fan off

Deprecated, Use "M106 S0".
TURNS OFF THE LASER!

G90: Absolute positioning

All coordinates from now on are absolute relative to the origin of the machine.

G91: Relative positioning

All coordinates from now on are relative to the last position.


Use the following commands with caution:

G92: Set current position

Allows programming of absolute zero point, by reseting the current position to the values (X, Y and/or Z) specified.

You can move the toolhead (G0) to a certain position and redefine this position as the new 'home' position (G92 X0 Y0). This way you can start your file on any position of the heatbed.

M211: Disable software endstops

The "M211 S0" commands disables all software endstops. This allows for usage of negative X and Y values.

Step 9: PWM Signal

The initial idea was to use a fan port as an input signal for the PWM/TTL port. The laser will be connected to the (12 volts) printer's power supply. And the (12 volts) fan signal would be decreased to a 5 Volt PWM/TTL signal. As shown in the first image.

And I was about to connect the reduced fan output as a PWM input. But I couldn't find a common GND/ground required for the fan output and pwm input signal.
One of the fan output pins is directly connected to the 12 Volts of the power supply. I expected the + sign to be the positive connector of the fan. But this mainboard uses the other (-) pin to control the speed: When this pin is high (12V) the fan is off, and when this pin is low the fan is on. Like an inverted signal. And connecting one of these pins to the GND will cause a short circuit (second image) when using a single power supply.

The best way to solve this problem is to use an opto-isolator (optocoupler). This sepperates the mainboard fan output signal from the laser input signal. And I've made and tested a small circuit using an EL817 optocoupler.

This circuit also ensures that this solution will also work with other 3D printers. Replace the 1 KOhm resistor for a 330 Ohm resistor for printers using a 5 Volt fan.


It should be possible to use an optocoupler module. But the EL817 optocouplers are very cheap and easy to use.

Step 10: Squares

This testfile creates 8 squares of 1 x 1 cm. And can be used to test the requires number of passes to cut through material.

You have to adjust the focus height (Z20) to the value for your laser. The laser cuts at 50 mm/sec at full power with this GCode file. And it looks like this laser is capable of cutting 3mm wood in .3 to 4 passes.

M106 S0
G92
G2
G0 F200 
G1 F50

G4 P0
M106 S0
G0 Z20
G0 X10 Y10
G4 P0
M106 S255
G1 X10 Y10
G1 X20 Y10
G1 X20 Y20
G1 X10 Y20
G1 X10 Y10
G4 P0
M106 S0

The required number of passes depends on the type of wood used. Another type of 3 mm wood took 6 passes. Some 5 mm plywood can be cut in 8 to 10 passes, but this requires small movements in the Z-axis.

Cutting is only possible with the relatively soft woods. And it seems that glue connections give the most resistance. As a result the stronger water-resistant (glued) wood falls off. This means that the end product can only be used indoors.

Step 11: First Box

The Inkscape GCode file starts at postion 0,0 on the heatbed of the 3D printer and it doesn't focus the laser. The first step is to home the printer. Then move the laser (off) to te desired start (X,Y) position and make this the new home with the "G92 X0 Y0" command. And focus the laser by moving the Z axis with "G0 Z20 F200".

After these two commands the laser is on focus at the "home" position. Load the GCode file from the SD-card (or use Pronterface) and the wood will be cut in several passes. This box took about 30 minutes (5 passes) to cut.

I started with 4 passes. But not all parts where lasered 100% through. Since I didn't remove the wood from the headbed I was able to start a fifth pass.
The only part which didn't work well was a knot in the wood. These imperfections in the wood must be avoided with this laser.

After laser cutting it is recommended to sand and/or clean the object.

Step 12: Engrave Lines

There are two ways to engrave with a laser. The first way uses a vector line image: The laser engraves the lines into the wood surface. The second way is for photo images which don't contain vector lines: Many small dots are burned in the wood. And from a distance the end result look like the original image.

Inkscape can be used to translate the vector image to GCode (single pass at medium to low power). In this step I've used LightBurn to engrave a cartoon image (FreeVector.com) in a piece of wood.

The first step is to create a new device. Choose the Marlin controller with serial/USB connection and give it a name (Anet A8). The origin is on the front-left with a 220 x 220 mm engraving area.
The second step is to alter the speed and laser control options. The laser uses M106/M107 control commands. Lower the maximum speeds to 800 mm/min and enable the Z-axis.


The software has many options, but it's easy to create a first project. Open the cartoon (Adobe illustrator) image and rescale it.

You can edit the image after ungrouping (arrange menu). Remove the lines which indicate the image size if necessary. This image has 5 layers, and the lines from each layer have a different color. For my first test I've used a laser power of 20% at a speed of 100 mm/min (slow) for each layer.

The first results where fine, but it took some time to finish. This printer can move faster than 100 mm/min with a higher laser output. The second atempt with a speed of 400 mm/min at 80% output gave a similar result. Because the wood was slightly harder, the lines were slightly thinner.
The latter is something to take into account. Each type of wood requires its own settings for speed and output power: Always start with a small test.

Step 13: G4 P0 Gcode Command

I noticed some 'lines' where the laser should be off during my first tests. And I thought they where caused by errors in my manual written GCode. Until I tried to engrave lines with LightBurn. The GCode output was correct, and NCviewer confirmed this. And I didn't had this 'problem' with the GCode for the boxes.

The GCode from LightBurn:

; LightBurn 0.9.02
; Marlin device profile, absolute coords
G21
G90
; Cut @ 100 mm/min, 20% power
M106 S0 
G0 X1.72 Y9.98 F0
M106 S51
G1 X8.28 F100
M106 S0 
G0 X10.47 Y7.79 F0
M106 S51
G1 Y1.23 F100
M106 S0 
G0 X24.55 Y28.33 F0
M106 S51
G1 X24.07 Y28.76 F100
G1 X23.64 Y29.25
G1 X23.25 Y29.76
G1 X22.89 Y30.29

Compared with the Inkscape GCode:

M107 S0

G90
G21
G1 F100
G1  X132.1175 Y17.4612
G4 P0 
M106 S255
G4 P0
G1 F100.000000
G2 X131.1343 Y13.5656 I-8.2096 J-0.
G2 X128.2415 Y10.2713 I-8.6044 J4.6385
G2 X124.1434 Y8.2691 I-7.9016 J10.9775

This shows an important difference: G4 P0. This is a wait command. And this is placed before each M106 fan command.

The 3D printer's firmware has a small buffer. It stores about 16 commands. And it looks like the 3D printer's firmware executes the fan commands immediate, instead of storing them in the buffer. This causes the GCode commands to be out of sync.
It's is not important whether the fan starts a little earlier or later when 3D printing. But in this case the laser turns on or off too quickly.

It looks like the "G4 P0" command solves this problem. This means "wait until all previous moves are finished". And it looks like the fan speed command also waits for this command to finish.


NOTE: Pausing the printer doesn't turn the fan/laser off. So don't pause the printer when the laser is on. Or use the "M106 S0" command to turn off the laser.

Step 14: Engrave Photos

Engraved photo's consists of a lot of dots.

A photo of 20 x 20 cm is converted to 200 lines (10 lines per cm). A total length of 20 * 200 = 4000 cm. A speed of 400 mm/min results in a minimal time of 100 minutes.
The maximum continuous usage time for this laser is 1 hour. But he laser will not get too hot with an output power of 33%, even after 100 minutes.

Also, the laser is not on all the time. This is clearly visible in the GCode:

; LightBurn 0.9.02
; Marlin device profile, absolute coords
G21
G90
; Image @ 400 mm/min, 50% power
G4 P0
M106 S0 
G0 X51.81 Y13.18 F0
G91
G4 P0
M106 S85.0
G1 X0.1 F400
G4 P0
M106 S0
G1 X0.3
G4 P0
M106 S85.0
G1 X0.1
G4 P0
M106 S0
G1 X0.3
G4 P0
M106 S85.0
G1 X0.1
G4 P0
M106 S0
G1 X0.3
G4 P0
M106 S85.0
G1 X0.1
G4 P0
M106 S0
G1 X0.3

The move commands after the G91 command (line 9) are all relative positions. The laser is turned on and the toolhead moves right for 0.1 mm. Then the laser is turned off, and the toolhead moves right for 0.3 mm. And this continues for almost a million lines. With 6 lines per dot, this gives about 166,000 dots for an image of 10 x 10 cm.

This is why it takes about 3 hours to complete the entire grayscale test. There is no need to print the entire file. Lasering the first row gives enough information for the optimal power settings. The most right square should be dark, but not completely burned. And each squares to the left must be brighter.


Where I am very satisfied with the engraving of lines, I find this less suitable to do with a 3D printer. It takes a lot of time because of the small movements combined with the required G4/wait command (Increasing the speed doesn't help much).

However, good results can be achieved with the right photo. For example, choose a photo with a light background and not too many details.

Step 15: Cutting Fabric

Besides wood, paper and acrylic, there is another material that is suitable for a laser cutter: fabric. Materials like Cotton, Felt, Fleece, Jeans, Polyester and Soft shell can be cut with this laser. The laser even seals the edges.

Working with this laser is much more accurate than regular cutting of (thick) felt. For example, dampers for stepper motors can easily be made. It is also easy to apply complex patterns.


Don't apply too much power. My first test started with the laser at full power at 100 mm/sec. And it took only two passes to cut 3mm (adhesive) felt. The first pass for the felt, and the second pass for the paper.

The second test at half power took 3 passes. But two passes should be fine. There is no need to cut through the paper. And this also results in fewer burn spots at the edge of the felt.

Step 16: Optimizing the Laser

This laser requires focus to work. And it requires multiple passes to cut wood. But it can't cut through very thick wood because the number of passes is limited. This is because the beam angle isn't 90 degrees. This is shown by the second image. The first two passes give little problems, they burn away the dark blue parts. But the hole from the first two passes is too narrow for the third pass. And this pass must widen the hole and burn through the third layer. And this gets worse each next layer.

I've focused the lens at a Z-height of 20 mm. An estimated beam radius of 2 mm (near the lens) gives an angle of 84 degrees. I didn't expect this angle to be visible, but it is. The result is good, but it could probably be better.

A Z-height of 100mm gives an angle of 88.8 degrees. And a Z-height of 200 mm gives an angle of 89.4 degrees. The longer the focus distance the better the angle. But this requires a stable frame. And it's harder to find the exact focus point. But it allows some additional passes without losing too much power. This makes it possible to cut 5 mm (light) balsa/plywood with this laser. With an almost 90 degree angle. Almost a doubling of the possible material thickness, only by adjusting the focus point.


Note: It isn't very hard to focus this laser. But finding the optimum focus point is important. Some of my first projects failed because the laser was out of focus. This was mostly due to incorrectly setting for the Z height in the GCode file.

Step 17: Final Words

The laser used in this instructable only has a power of 5500 mW. But it's capable of cutting thin wood.

Using a cheap 3D printer gives some limits in size and speed. But it is relative cheap, because you don't have to buy the moving parts. With the help of a 3D printer you can of course easily create your own frame. And this 5500 mW laser works so well that I certainly intend to make such a larger frame.

I myself am the least satisfied with the lasering of photos. But this may be due to the software used. I expected that different levels of gray were created by variations in the laser power. But all points are made with the same power. And the distance between the points gives the photo/image. But after some practice the result are getting better and better.

The laser is at its best when drawing SVG images. Different laser power levels can be combined in a single image.

But what appeals most is cutting materials. And this laser is capable of cutting thin/light wood types. But It takes multiple passes to laser/burn the wood away. And because of this burning, some post-processing is requires. Such as sanding and cleaning.

Cutting fabric and felt is also going very well. This makes it possible to make complex patterns with fabric.

Step 18: Enclosure

I've used a modified Anet A8 printer to build this laser engraver. This printer doesn't have an enclosure by default. Just like most Chinese (diode) laser machines. While this is actually a safety requirement.

This printer's X and Z axis have been improved by an additonal wooden frame. And I'm using an enclosure when printing with ABS filament. This ensures that the temperature remains constant to avoid warping.

In fact, the back of the printer is closed with a 29.5 cm wide wooden plate. And a wooden frame is placed over the front of the printer. This contains a plastic window, which is covered with a wooden board when using the laser.

There is still room for ventilation, but the laser no longer reflects directly to the outside. There are always two additonal wooden panels in which the laser reflects (besides the subject to be cut/engraved). Because of this opening it is still wise to wear the glasses when the laser is in use.

A future version will look more like the image on the right. But I have to decide first whether I want to use this machine for laser cutting only. Or that I also want the possibility to use a CNC spindle.

Step 19: Boxes.PY

While making this instructable, I came across the Boxes.Py website. This site contains all kind of laser projects: "It features both finished parametrized generators as well as a Python API for writing your own. It features finger and (flat) dovetail joints, flex cuts, holes and slots for screws, hinges, gears, pulleys and much more."

The printbed size from this 3D printer is about 22 x 22 cm. But this only limits the size of the largest part of the box. It's possible to split the project into multiple GCode files using Inkscape.
And with the help of the G92 GCode command, the starting point of the laser processing can be easily adjusted. It is therefore not necessary to always start in the lower left corner of the heat bed.

Colors of the Rainbow Contest

Participated in the
Colors of the Rainbow Contest