3d Printer Laser Upgrade - Including PCB Etching Tutorial

Introduction: 3d Printer Laser Upgrade - Including PCB Etching Tutorial

About: 23 y/o Electronics Engineering Student & Hobbyist. Donation: BTC 39cysW1M5uq3GzCxYXFvQtgbyWGu2ykJHq

In this instructable, I'm going to show you how to add a laser module to burn or etch stuff to your printer.

Here I'm using a Tevo Tornado, but you can use any other printer that comes with a Marlin firmware.



Step 1: Defining Second Cooling Fan for PWM Signal to Drive Laser

These laser modules come with TTL drivers, that is, you can connect one side to a PWM signal and the other side to the laser diode.

Here we are going to use the part cooling fan as our PWM signal, but since we don't want to add a switch to chose between the real part cooling fan and the TTL driver we have to introduce a new part cooling fan to the firmware. So then we can control laser power with M107 P1 and M106 P1 Sxx commands.

To do so we have to tweak the firmware a little bit, so now open the Marlin.ino and head to the "PINS_MKS_GEN_l.h" file in your firmware files, and add the following line:

#define FAN1_PIN 6

now head to "PINS_RAMPS.h" file and comment the following line by adding // before the line:


now you have a PWM signal for your defined second fan at the D6 port, which can be controlled by the M107 P1 and M106 P1 commands.

Note that you could use any other Dx port instead of this.

In this diagram, you can find the port locations for the MKS Gen L v1 board which is used on the new series Tevo Tornados.

Now you have to upload the firmware to the board.

Then open up the control box and connect the two female jumper cables to the GND and D6 pin on the motherboard. Then cut off the other end of the cables and connect the 2 pin male connector. In my case for some reason, I also had to add a 5k resistor in series with my PWM signal to work properly, but in your driver it might be not needed.

Note that the GND has to be connected to the black wire of the TTL driver. Extend the cables here if needed.

At this point, if you had everything right you should be able to see two fans in the Control -> Temperature section.

Step 2: Troubleshooting

If you didn't get the two Fan Speed settings as in the picture then you hadn't configured the firmware right.

But if you get the two settings and turn on the laser but as soon as you connect the TTL input to the PWM signal and regardless of the second fan speed the laser beam fades away you need to tweak with the resistor value, in my case when I didn't have any resistors this would happen and took me a long time to figure that out.

Finally, you need to check whether the laser gets at full power when the fan speed is set @ 255 or 0. In my case the driver puts most power when the PWM is set to 0 and turns the laser almost off at 255. If it turns fully on at 0 and off at 255 and you don't like it this way you can change it by swapping the 2pin male connector polarity and connecting the jumper which was connected to the GND now to the 5v pin.

Step 3: Software; Generating GCODE

To generate the proportional GCODE in Fusion 360, Tech2C has a very good tutorial which I really recommend watching.

In other applications also you can generate the GCODE first and then edit the code with a simple text editor, like notepad++.

For that, you need to replace the G00 commands that are followed by a positive Z value with a command that turns the laser OFF, in my case:

M106 p1 s255

and replace any G00 command that is followed by a negative Z value with a command that turns the laser ON:

M107 p1 or M106 p1 s0

you can also tweak with the values, to get lower powers, especially when working drawing on wood.

By adding the following line you can also change the travel speeds:


where xx is the speed in mm per minute.

Step 4: Making PCBs

So to make PCBs with the laser module I'm using the spray paint method.

In this method first I sand the raw copper clad with fine sandpaper and clean it with cleaning alcohol and then spray a very thin layer of black spray paint on the copper. Then burn the unwanted areas with the laser and clean the board again, and then put it in an etchant solution like FeCl3.

I used Flatcam in this project, to do so after loading the Gerber file in Flatcam I generate the non-copper region (called NNC in newer versions) and paint the area with a 0.05mm tool.

After that, I generate the CNC job and export that.

Now open the CNC job with text editor remove the first top lines until the end of the G4 P1 line and add the following lines to the top:

M117 PCB job

M106 P1 S255

G21 ;Metric Values

G17 ;Plane XY

G90 ;Absolute Positioning

G92 X0 Y0 Z0 ;Set XYZ Positions

G0 F2500


M117 2D Profile3

then replace this line:

G01 Z-0.0020


M106 P1 S0

G00 F90

and replace this line:

G00 Z0.1000


M106 P1 S255
G00 F255

replace the S0 with S255 and vice versa if your driver turns ON with a 5v signal.

Step 5: Processing the PCB

After laser burning the unwanted areas now we're ready to put the PCB in an etchant solution, to do so first we need to clean the PCB with a paper tissue very gently, to get rid of all of the burnt paint on the board.

After that, the PCB is ready to be put in the solution.

In my experience, there are two critical steps in this process: The first one is the painting step, which needs to be very thin and the paint needs to be dried out completely before further process. The second is cleaning the PCB before the etching step. The board needs to be nicely cleaned and all of the unwanted areas need to be fully exposed.

Step 6: Did You Like It?

If you liked my work you can help me with my other projects by donating:



Be the First to Share


    • For the Home Contest

      For the Home Contest
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Big and Small Contest

      Big and Small Contest



    2 years ago

    it would be nice if there was a video on the hardware setup of this i read it all i understand some of it but some of it i just dont undrstand


    Reply 2 years ago

    Hi Darrell,
    I'm quite busy at the moment. I'm a senior student in electrical engineering and I have to finish my final project. So, unfortunately, I cannot record a video on the setup at this moment.
    I hope you can understand.


    Alex in NZ
    Alex in NZ

    3 years ago

    Nice idea for masking the etchant. Thank you for sharing your project :-)


    Reply 3 years ago

    It wasn't my idea actually, there were people doing this before me but since I wasn't sure who had the original idea I didn't put any credit.

    Penolopy Bulnick
    Penolopy Bulnick

    3 years ago

    Nice job on your first Instructable :)


    Reply 3 years ago

    Thank you! Let me know if there's anything I need to improve.