Experiments With Solder Mask Milling
This is actually a write up of some tests I did last month that has yet to turn results, so I'm putting it on the back burner.
The Problem
There are two common problems with CNC Milled PCBs.
- Without a silkscreen, solder is attracted nearby areas of copper. This can be harmless, like getting solder on the ground plane all the way to detrimental where shorts form easily. I've experienced both populating these kinds of boards. For someone new to soldering or electronics it can be hard to tell whether you've just struck a mortal wound to the board or not.
- Oxidation forms quickly and can change the properties of the board. Most affected is simply solder adhesion, making it sometimes difficult to make a nice joint on the solder leads or pads.
As you can see in the image it was really hard to not short the power pins and the ground plane, especially with finer pins like on the SOIC-16 package.
The Solution
The solution to both of these problems is easy, simply put a solder mask on the board. That's one of the reasons why they were invented in the first place. There are a few ways to do this by yourself, but the cheapest seems to be buying some UV Curable Solder Mask such as that sold by “Mechanic”. You can get it on Amazon for about $4-5 a tube, or if you want to wait longer, I got mine on Ali Express in China for about $2 a tube.
Option 1: Transparency Sheets and Timing
I found a few videos of people performing a process with the UV Curable Solder mask where they were covering the board with transparency sheets and using a blacklight for the perfect amount of time to make it cure but keep the pads liquid. Then with rubbing alcohol they would remove the chemical from the pads and have a semi-professional PCB. While they had success, I saw quite a few limitations.
- Larger boards could get very difficult because you have to uniformly cure the Solder Mask.
- Even a single failed pad that cured hard could ruin the whole board. Would I have to fix failed pads manually by doing something like scraping it off carefully with a X-Acto Knife?
Admittedly, I still haven't tried this method, but it's on my list now that next option that I thought be easier failed.
Option 2: Cover the Whole Board and Mill Again
I had a clever idea that sounded like it eliminated both of those chances of failure. My plan was simply to make a uniform solder mask layer, cure the whole thing. then mill just the pads to expose the copper. I looked at the tech specs for our Bantam Tools CNC Machine and it claimed the vertical resolution was fine enough to instill confidence at .003175mm.
The first attempt to lay the solder mask went fine, but it was a little thick. I measured the PCB thickness before and after the application, looking for the thickest portion of the board to set as my maximum thickness. I went from about 1.54mm to 1.76mm.
Create an SVG of the Pads.
My file options were part of the process. Bantam Tools CNC software opens quite a few, but I couldn't just export gerbers and then use the pad layer. So I developed a workflow where I would export my gerbers from EAGLE using the standard gerb274x.cam job. Then I downloaded the NPM package “gerber-to-svg” that has a an easy to use CLI method to convert Gerber files to SVG which a simply command like
gerber2svg -o out file.stc
Note that I'm only doing for the .stc file because this represents the ‘tstop’ layer in EAGLE, which gives us just the pads.
For some reason, the Bantam Tools software wasn't finding the paths from gerber2svg, so I had to process this file by opening it in Inkscape, and using the paint bucket tool to fill each pad. I found that by making the paint bucket a color like green, I could visually see that every pad had been filled, making it a fairly quick 2 minute process.
With our SVG ready, I just opened it up in the Bantam Tools software alongside the other .brd file. By default, it was the right size, but not alligned, so by leaving both on, you can adjust the x and y positions. I believe in my case it ended up being off by 40mm x and 5mm y. Turn off the cutout option on the SVG and you're left with just the pads. I adjusted the PCB thickness is the software to the measured maximum, and set the milling depth to the difference between new thickness and original thickness, essentially getting it right to the copper layer. Let it rip.
The Results
- After 4 tries, I came up with some very interesting results on my Solder Mask method. The first attempt almost worked, with the bottom LED pad being milled perfectly down the copper. However the top pad just got destroyed, and the bottoms pad didn't go deep enough. Interesting. My problem with too thick of a solder mask was also apparent here since an SMD component obviously wouldn't sit flat on top of it.
- The second try, I managed to get the solder mask layer thinner at about .11mm, which seemed about right. I also wanted to be careful to not drill out the copper layer, so I set the drill depth to about .02mm greater than my measured difference, hoping that I would be left with a very fine layer of solder mask I could scrape off. Nope, the same exact thing occurred. This led me to believe that the platform bed wasn't perfectly even. Granted, I was asking for very high precision here of .01mm.
- Third try: Using a bubble level I attempted to make the entire machine sit flat by adjusting the table that the machine sat on. No difference.
- Fourth try: Same method, but I increased my trace depth to .05mm over what my measured difference was in a hope that at the location where the table was most unbalanced I could still be left with copper. Well that worked. My worst case scenario left me with bare copper on the bottom board and of course .05mm of solder mask on the top pad. I tried to scrape this off but it didn't help.
So overall, at least with the Bantam Tools mill, this process seems impossible. It requires that the bed and the drill be perfectly perfectly level so that it mills the same depth at all points, but this doesn't seem to be the case. There is a slight amount of error that simply can't be compensated for without leaving a large board with a handful of pads that would need to go and be milled again. I can't blame them however, as it truly isn't something that isn't the intended function of the machine. When milling a board, this error is perfectly acceptable because the trace depth doesn't have much affect on the overall board since it's thickness is much greater at around 1.54mm, .05mm error is fine.
I'm planning on working on a few other projects and then returning with a clean mind to see if I can perfect the transparency method and use this to produce low-cost, semi-professional boards.