Creating SMD PCB's With Laser Masking Method on a Snapmaker 2.0
by piramja in Circuits > Electronics
8282 Views, 52 Favorites, 0 Comments
Creating SMD PCB's With Laser Masking Method on a Snapmaker 2.0



)


Hey there!
After spending a lot of time on trying to create decent PCB's at home for prototyping and small series, i finally managed to find a method and the right parameters for getting pretty nice boards. The process is super fast, low effort, low cost and gives repeatably nice results! What really took a lot of time end effort was finding the right prameters for the process. So to safe you some time, i'm gonna share them with you.
I tried CNC milling with the Snapmaker before and it was really disappointing. Even with THT PCB's and larger geometry, the results were really bad and it was an overall mess, let alone the time it takes...
Since i got the Snapmaker and played around with the Laser Module, i was very impressed by its speed and precision. So i was sure this must be the right technology for my vision.
And here we are (=
Supplies
For PCB masking
• Snapmaker 2 with Laser Module (or any other capable CNC Laser Engraver)
• PCB (blank, without film or anything, the cheap ones ;)
• Gerber files of your board design
• Acetone
• Black Spray Paint (i use DUPLI-COLOR car's black glossy, see pictures, but i'm pretty sure others will work as well)
For etching the PCB
• Etching Machine (recommended for stable parameters, but can probably be done manually too)
• Iron (III) chloride
• Acetone
• Of course your safety equipment and a safe environment!
Software used
• Your favorite PCB layouting software with gerber file export
• FlatCam (Freeware, flatcam.org)
• Snapmaker Luban (or your favorite CNC control software)
Prepare Your Blank PCB




So first we have to prepare the PCB. I clean it with Acetone and then cover it with a nice layer of black spray paint. I use the one from the pictures because it was the first try with spray paint and it already gave perfect results, so why bother. But i'm sure others work just as well.
Before this i tried many other things for masking, like tape, edding, or even SLA printer resign. This spray paint works the best for me so i stick with it
Export Gerber File From Board Layout


Well, the first step is pretty obvious, you will need some board design that you gonna put on a PCB.
I use Altium Designer to create board schematics and layouts, but it really doesn't matter what you use, because they should all have gerber file export for board manufacturing.
There's of course many different ways from layout to production, but since this instructable is focusing on the production method, i'm gonna stick to the one i use.
So first thing is to export your layout to a gerber file. Make sure you consistently use the same system of measurement your machine uses for exporting and importing files (in my case, its the metric system / mm).
For this tutorial i only export the top layer isolation routing of the Arduino Pro Micro as an example.
From Gerber File to G-Code






To create the G-Code for Snapmaker, i use FlatCam Freeware (flatcam.org). It is intended to create G-Code for CNC milling so we have to do some small changes to make it work with the Snapmaker Laser Module. But let's create general G-Code first:
1. Import the Gerber File into FlatCam
2. Select the File in the "Project" section and switch to the "Selected" section
3. Insert values as stated in the 2nd picture. Tool diameter is 0.1 and one pass. You can ignore everything below because we only do the Isolation Routing now. I will later get into why i use only one pass.
4. After the Isolation Routing is generated, go back to the "Project" section and select it.
5. Back to the "Selected" section, put "-5.5555" for "Cut Z" and "9.9999" for "Travel Z", so we can easily identify every occurrence of those values later in the G-Code. You can just ignore the "Feed Rate" and press "Generate" to generate the CNC job
6. Back to the "Project" section, select the generated CNC job. Switch to the "Selected" section again and press "Export G-Code". You will be asked to save your G-Code File somewhere. Save it with ".nc" extension
Adjust the G-Code to Work With the Snapmaker Laser Module






Since we created the G-Code for a CNC mill, we have to make some small changes for working with the Laser Module of the Snapmaker.
The Snapmaker uses some Meta Information when you create them with the Snapmaker Luban Software. This information is used in the preview screen on the snapmaker control device. Since i don't need this, i just copy it from some other project i generated with Luban. You can do the same, it will work anyways. But it will have some effects you have to be aware of:
• The preview image is embedded in the metadata as base64 encoded string. So the preview will not show your actual board layout but the one of the project you copied it from
• The processing time shown in the preview will not match your actual job, so you will also get weird percentage values like less than 100% or way more than 100% to finish the job.
• BUT MOST IMPORTANT: the dimension of your board will be different from the one shown in the preview and therefore, the boundary check after setting your working coordinates will NOT be correct!! As this doesnt matter to me, i made no effort in changing it. But feel free to edit or generate the metadata however. You can rely on the view of Snapmaker Luban after importing the G-Code. The machine will start at the lower left corner. But more about that later.
The reason i use the matadata at all is just because my Snapmaker Firmware crashes when it's not present, so i can't even start the job without having it in the file.
Ok now we edit the G-Code file generated by FlatCam. So open it in your favorite text editor. All you need is a decent "Search & Replace (all)" feature.
1. Open G-Code file in a text editor
2. Copy the metadata from the top of a Snapmaker Luban created G-Code file and the first lines of G-Code (like shown in the picture). The important settings here are the Jogspeed and Workspeed, I found that Jogspeed 3000mm/min (g-code "G0 F3000)" and Workspeed 700mm/min (g-code "G1 F700") work perfect for me. The other line ("M106 P0 S255") turns on the internal fan of the laser module at full speed, so we just leave it.
3. Now we need our values set for "Cut-Z" and "Travel-Z" in FlatCam in the previous step. Those values tell the CNC machine to raise or lower the toolhead and therefore cut or just travel without cutting. But since we use the laser module, we don't change the Z-axis at all but rather turn the laser on and off.
So we replace all occurrences of the line "G01 Z-5.5555" with the line "M3", so instead of lowering on the z-axis we turn the laser on.
Then we replace all occurrences of the line "G00 Z9.9999" with the line "M5", so instead of raising on the z-axis we turn the laser off.
4. We replace the bottom lines of the file as shown in the pictures. For some reason FlatCam generates the "G00 Z9.9999" two times. I just replace it with one M5 to turn off the laser. Afterwards we go home and turn off the laser modules fan. Then the Snapmaker metadata comment again...
5. I don't know if it is necessary, but since FlatCam generates no spaces in between the X and Y coordinates but Snapmaker Luban does, i replace all "Y" with " Y". Notice the starting space. So the coordinates will look like "X1.234 Y1.234" instead of "X1.234Y1.234".
I don't know if you need to do this, but i didn't want to find out the hard way and let the machine just laser around uncontrolled.... so better just do it (=
6. Voila! You're pretty much ready for laser engraving your layout to the prepared board. I suggest you double check your G-Code file for any mistakes just to make sure. You can also run it through a CNC simulation program like CAMotics to see if it is really doing what you want.
Find the Right Laser Focus

This is something i put a lot of time into as well, but luckily i did it long time ago for other projects and could just rely on the data i already had. But i gonna tell you how i did it.
Since the auto focus was never really helpful for me, i manually elaborated the best focus with plain 80g paper. I let the snapmaker cut somewhat complex and fine structures (see picture) out of it and when finally the thing came out beautifully, with very fine lines, completely cut through but without any burns, i had found the right focus.
Then, for wahtever i want to engrave, i just add the thickness of the material to my base value from the paper. So far that works pretty well.
So the best result for paper i had with an absolute z position of 22.10 (and 700mm/min speed).
Therefore i use this and add the thickness of my PCB (1.5mm), so my z-axis working position is 23.60.
Import the G-Code With Snapmaker Luban and Run the Job



Now you can import your G-Code file into the Snapmaker Luban Software. You can check if everything looks alright, see what dimensions it will have and where the tool starting point is. This data you need for setting your working coordinates, because with the method i use here THE RUN BOUNDARY CHECK WILL NOT WORK AND GIVE WRONG RESULTS. Make sure you read the section about adjusting the g-code to understand why!!
If everything looks good, send the file to your Snapmaker. Start the job, ignore the wrong preview image and time (if you followed my guide) and set the working coordinates and focus manually.
Start the job and hope you did everything right (=
Now something about the number of passes:
I found that the very best results are accomplished when running the same job 2 times at 700mm/min.
I tried lots and lots of different combinations of working speed and number of passes (see picture for some of them). I also tried to do the multiple passes right away in one g-code file, since FlatCam has this option. But nothing and really nothing gave this perfect result but just running the same job exactly 2 times at a working speed of 700mm/min.
I was wondering why it gives different results when running every line two times in one job compared to running the same job two times one after another. I could just imagine that it has to do with the time you give the material to cool down between the two passes. But thats just a guess and i don't really care anymore, i'm very happy with the result. It was a long road to get there.
And also, it takes only 4 minutes for one pass of this board, so 8 minutes in total. I really couldn't wish for anything better than that after trying so much stuff and especially after going through the nightmares of CNC milling...
Etching the PCB




Now the last step is to finally etch the masked PCB.
I use a small etching device to have a stable environment for repeatable results.
The best result i had with:
• Iron (III) chloride 400mg in 2 liters of water
• 45° celsius
• 35-40 minutes
The time can vary depending on the saturation of the etchant.
Afterwards, the paint can easily be removed with acetone.
I strongly recommend doing proper isolation probing before using your boards. Sometimes i have a little connection between two signals that you can't even see under the microscope. It can easily be solved with a sharp cutter knife.