3D Printer Laser Modification
3D Printer Laser Modification
by Gosse Adema
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:
Anet A8 3D printer (or other: 12 Volt, dual fan)
Alfawise 5500 mw laser (or other:TTL required)
EL-817 optocoupler
330 and 470 Ohm resistor
There are two types of laser cutters: CO2 and diode The chosen laser basically comes from a DIY
(semiconductor) lasers. The C02 laser have a much package. I've read the instructions from this
greater power than diode lases, but these are also a engraving device before purchasing this laser. But
lot more expensive. Therefore this Instructable is I've bought only the laser package and not the entire
about a diode laser. product. This package consists of a driver board,
You can remove a diode laser from any DVD burner cooling fan and the Blue-violet 5500 mw diode laser
and use it as a laser engraver. However, these lasers inside a cooling element.
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
3D printers work with GCode commands. And a
(low/medium power) mini laser machines (3.5 x 3.5
GCode command must therefore be used to switch
inch) to desktop size laser engravers/cutters. Or com
the laser on and off to control the output power.
bined CNC and laser machines.
A 3D printer nozzle consists of different elements.
The idea is to convert an Anet A8 3D printer into a
The heating element is switched on and off, while the
laser cutter. And this printer already has a 12 Volt
temperature is measured with a termistor. This
power supply and a mainboard to control the
temperature is controlled with a Gcode command.
steppers, nozzle and fans. So by using a 3D printer,
The given temperature is converted (by the firmware)
it's not necessary to purchase a power supply,
into a series of on/off commands. And the mass
mainboard, motors and frame.
inertia of the heater block gives a constant The Alfawise laser is availavle in 500 mW, 2500 mW
temperature. Because a laser has no temperature and 5500 mW. Only the 2500 mW and 5500 mW
feedback, this output port is therefore not suitable for versions have TTL/PWM control. Which is required to
the laser. regulate the output power. Due to the small price
difference, I have chosen the 5500 mW version.
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.
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:
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.
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.
View in 3D Download
https://www.instructables.com/ORIG/FAY/HKO7/JVE7QIO0/FAYHKO7JVE7QIO0.stl
…
View in 3D Download
https://www.instructables.com/ORIG/FM4/YUAF/JVE7QIPP/FM4YUAFJVE7QIPP.stl
…
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.
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
3D Printer Laser Modification: Page 10
tool for this: JSCUT. This tool requires some settings for the material and lasercutter/tool:
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.
;
; 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.
; 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.
Download
https://www.instructables.com/ORIG/FED/OICG/JVH3ECPI/FEDOICGJVH3ECPI.jscut
…
Download
https://www.instructables.com/ORIG/F3W/30SP/JVH3ECPJ/F3W30SPJVH3ECPJ.gcode
…
Download
https://www.instructables.com/ORIG/F3D/OSFY/JVH3ECWL/F3DOSFYJVH3ECWL.gcode
…
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.
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
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 Displays the current position of the toolhead.
commands to move the toolhead linear to a certain
position. This command is normally used for to G20: Set Units to Inches
extrude filament. The file doesn't contain the G0
(rapid) move command. It changes the speed with the
F-parameter instead. Changes the values for the G0-G3 commands to
inches.
The file also contains G2 and G3 codes. And these
circular commands are not common for 3D printers. G21: Set Units to Millimeters
I've been using these ARC-commands while working
with the CNC/dremel version of this Anet A8 printer. Changes the values for the G0-G3 commands to
And the Anet a8 firmware allows these commands. millimeters (default).
I've tested the entire file with usage of a marker (first
image). The laser code enables and disables the fan G0: Rapid movement
when moving with G0. But It doesn't move the Z axis
up and down. G1: Extrusion movement
The initial idea was to use a fan port as an input single power supply.
signal for the PWM/TTL port. The laser will be
connected to the (12 volts) printer's power supply. The best way to solve this problem is to use an opto-i
And the (12 volts) fan signal would be decreased to a solator (optocoupler). This sepperates the mainboard
5 Volt PWM/TTL signal. As shown in the first image. fan output signal from the laser input signal. And I've
made and tested a small circuit using an EL817 optoc
And I was about to connect the reduced fan output as oupler.
a PWM input. But I couldn't find a common
GND/ground required for the fan output and pwm This circuit also ensures that this solution will also
input signal. work with other 3D printers. Replace the 1 KOhm
One of the fan output pins is directly connected to the resistor for a 330 Ohm resistor for printers using a 5
12 Volts of the power supply. I expected the + sign to Volt fan.
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
It should be possible to use an optocoupler module.
this pin is low the fan is on. Like an inverted signal.
But the EL817 optocouplers are very cheap and easy
And connecting one of these pins to the GND will
to use.
cause a short circuit (second image) when using a
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.
https://youtu.be/zO7Y_5Q4mng
Download
https://www.instructables.com/ORIG/FG8/7RSZ/JVMNRDN1/FG87RSZJVMNRDN1.gcode
…
The Inkscape GCode file starts at postion 0,0 on the I started with 4 passes. But not all parts where
heatbed of the 3D printer and it doesn't focus the lasered 100% through. Since I didn't remove the
laser. The first step is to home the printer. Then move wood from the headbed I was able to start a fifth
the laser (off) to te desired start (X,Y) position and pass.
make this the new home with the "G92 X0 Y0" The only part which didn't work well was a knot in the
command. And focus the laser by moving the Z axis wood. These imperfections in the wood must be
with "G0 Z20 F200". avoided with this laser.
After these two commands the laser is on focus at the After laser cutting it is recommended to sand and/or
"home" position. Load the GCode file from the SD- clean the object.
card (or use Pronterface) and the wood will be cut in
several passes. This box took about 30 minutes (5
passes) to cut.
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 NCv
iewer confirmed this. And I didn't had this 'problem' with the GCode for the boxes.
; 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
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.
Download
https://www.instructables.com/ORIG/FV5/VV7B/JVH3DPBV/FV5VV7BJVH3DPBV.gcode
…
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:
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.
Download
https://www.instructables.com/ORIG/F79/4DPH/JVH3DPD5/F794DPHJVH3DPD5.gcode
…
This laser requires focus to work. And it requires And a Z-height of 200 mm gives an angle of 89.4
multiple passes to cut wood. But it can't cut through degrees. The longer the focus distance the better the
very thick wood because the number of passes is angle. But this requires a stable frame. And it's harder
limited. This is because the beam angle isn't 90 to find the exact focus point. But it allows some
degrees. This is shown by the second image. The additional passes without losing too much power.
first two passes give little problems, they burn away This makes it possible to cut 5 mm (light)
the dark blue parts. But the hole from the first two balsa/plywood with this laser. With an almost 90
passes is too narrow for the third pass. And this pass degree angle. Almost a doubling of the possible
must widen the hole and burn through the third layer. material thickness, only by adjusting the focus point.
And this gets worse each next layer.
Download
https://www.instructables.com/ORIG/FZB/L5M8/JVMNGG16/FZBL5M8JVMNGG16.gcode
…
Download
https://www.instructables.com/ORIG/FNP/G1PJ/JVMNGG0D/FNPG1PJJVMNGG0D.gcode
…
The laser used in this instructable only has a power of the result are getting better and better.
5500 mW. But it's capable of cutting thin wood.
The laser is at its best when drawing SVG images.
Using a cheap 3D printer gives some limits in size Different laser power levels can be combined in a
and speed. But it is relative cheap, because you don't single image.
have to buy the moving parts. With the help of a 3D
printer you can of course easily create your own But what appeals most is cutting materials. And this
frame. And this 5500 mW laser works so well that I laser is capable of cutting thin/light wood types. But It
certainly intend to make such a larger frame. takes multiple passes to laser/burn the wood away.
And because of this burning, some post-processing is
I myself am the least satisfied with the lasering of requires. Such as sanding and cleaning.
photos. But this may be due to the software used. I Cutting fabric and felt is also going very well. This
expected that different levels of gray were created by makes it possible to make complex patterns with
variations in the laser power. But all points are made fabric.
with the same power. And the distance between the
points gives the photo/image. But after some practice
I've used a modified Anet A8 printer to build this laser There is still room for ventilation, but the laser no
engraver. This printer doesn't have an enclosure by longer reflects directly to the outside. There are
default. Just like most Chinese (diode) laser always two additonal wooden panels in which the
machines. While this is actually a safety requirement. laser reflects (besides the subject to be
cut/engraved). Because of this opening it is still wise
This printer's X and Z axis have been improved by an to wear the glasses when the laser is in use.
additonal wooden frame. And I'm using an enclosure
when printing with ABS filament. This ensures that A future version will look more like the image on the
the temperature remains constant to avoid warping. right. But I have to decide first whether I want to use
In fact, the back of the printer is closed with a 29.5 cm this machine for laser cutting only. Or that I also want
wide wooden plate. And a wooden frame is placed the possibility to use a CNC spindle.
over the front of the printer. This contains a plastic
window, which is covered with a wooden board when
using the laser.
While making this instructable, I came across the Box cm. But this only limits the size of the largest part of
es.Py website. This site contains all kind of laser the box. It's possible to split the project into multiple
projects: "It features both finished parametrized GCode files using Inkscape.
generators as well as a Python API for writing your And with the help of the G92 GCode command, the
own. It features finger and (flat) dovetail joints, flex starting point of the laser processing can be easily
cuts, holes and slots for screws, hinges, gears, adjusted. It is therefore not necessary to always start
pulleys and much more." in the lower left corner of the heat bed.
EDIT: So I bumped up the TTL pin to 12v with an L298 motor controller as PWM straight did not
yield expected results maybe my PWM pin cant deliver the amp's required?? but at least its
working the L298 is controlling my fan as well.
Very nice.
I added a laser attachment to my plotter.
A material I like to use is corrugated cardboard.
It's strong enough to cut steel foil and engrave glass without using any chemicals.
www.3dsupplysource.com has them and it's an open source design so just use the wiki link if you
want to make one yourself!