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.
- 1 x 500mW Laser Module with TTL driver (could be higher power if needed)
- 1 x Laser safety goggles
- 1 x Laser mount which could be found in Thingiverse:
- 1 x screwdriver
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
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:
#define FAN_1_PIN MOSFET_D_PIN
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
M117 2D Profile3
then replace this line:
M106 P1 S0
and replace this line:
M106 P1 S255
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:
Every cent counts!