« Back to home

On the Importance of Patience

Using some patience and taking some extra time to double check things can save a lot of problems in the long run. This is one of those things that we all know we should be doing but often fail to do in practice. Here is a concrete example where failing to spend a little bit of extra time to double check things has wound up costing me an unknown but significant amount of time and money. Here is the story of how I broke my CNC machine through a sequence of events that I can only blame myself for.

If you have been reading this site or following my Google+ posts you will know that I have recently switched to using CNC milling to produce circuit boards. So far this has all been working well, in fact all the CNC milling I have been doing on a range of different materials has worked out very well and I guess that made me a little bit complacent about the process.

With my most recent project (a single board 6502 emulator) I did a redesign of the main PCB and milled it out - all well and good so far. After soldering it up I found that there were a number of shorts between the tracks which I put down to my shoddy soldering (this is a skill I haven't really mastered so it's not that unusual). After a few attempts to fix the problem on the board I decided I was better off milling a new board and testing for shorts after adding each component - a long way to go about it but, in theory, it's a lot easier to find where the problems are as you go along.

Distorted Tracks

When the board was ready I decided to check for shorts before soldering anything just to be on the safe side. Surprisingly, everything seemed to be shorted. On closer inspection I found out that because the board wasn't very level during the milling process some of the tracks in one area of the board where milled far too thinly and the isolation cuts didn't completely isolate the tracks and pads from the main copper area. You can see this in the upper part of the image to the right.

Lesson 1: I should have checked that on the first board to start with, it only takes a couple of minutes and would have saved the components I had already soldered as well as a second sheet of blank PCB. Having had a run of successes I just assumed the board was fine without looking too closely at it.

PCB Milling Holder

My setup for PCB milling looks like the photo to the left. I use a piece of pine which I have cut a 1.5mm deep area into to hold the blank PCB. This is held in place with painters tape to stop vertical movement (when drilling or milling the outline for example). Having milled out the area the PCB lays into makes it parallel with the path of the tool tip giving you a reasonably level surface to start with. The PCB itself may not be entirely level (bowing due to storage for example or just plain manufacturing errors) so I use a tool called Autoleveller to adjust for small level variations during milling.

This tool uses the probe functionality of the CNC machine to determine the actual height at various points on the board and then adjusts the cut depth accordingly. Looking at the resulting gcode I found that only the Z depth is adjusted, not the X and Y which explains the thin tracks. The isolation cuts not quite cutting away all the copper would be caused by the arrow shaped tool tip attacking the board at an angle and not being able to make a full depth cut.

Area Cut for Leveling

From this it was obvious I had a levelling problem. Given that I had removed my PCB cutting setup to do other work and then remounted it in order to make this board it seemed that I hadn't mounted it in the same place so the platform the PCB was resting on was no longer level relative to the tool - add in any variations from the PCB itself and the levelling was out by too much. Given that the main aluminum bed on my machine is horribly uneven (a 2.5mm variation across the surface) this was not entirely unexpected.

No problem, I would level out a new area and this time make sure I marked exactly where it sits on the main bed so in future I at least had a chance of starting with a levelled base. This part went swimmingly - I leveled out a suitable area for the PCB to sit in, marked where the pine base should be bolted on the bed to get the same results next time round and was ready to start milling again.

Not Entirely Level

Cutting out and area doesn't leave a perfectly flat base because the tip of the tool is not perfectly flat (it needs at least a slight point to help penetrate the material). What you have is a slight wave pattern but the peaks and troughs are at consistent heights so it doesn't really matter. Having been delayed already by the leveling process and feeling a bit pedantic about it I decided to try and get ride of the wave pattern by using a grinding tip I had in the collection. It was about twice the width of the cutting tool I had used so I removed the first cutting path from the g-code file and ran it 'in the air' with the grinding tool attached to make sure it would stay inside the hollowed out area - so far, so good.

Lesson 2: Trying out new techniques or new tools should be done in an isolated and controlled environment. I hadn't used this particular tool before and only had an idea of what result it would have (it seemed pretty obvious).

So, I moved the tool into place, lowered it to the surface and touched off. Then I started the g-code program and sat back to watch the results. My machine then proceeded to try and drive a 12mm wide flat grinding head 1.5mm deep into a block of pine with very limited success although I didn't realise what was happening at the time. My first hint of trouble was the horrible sound the grinding tool made against the pine but because I hadn't used it before I held off from intervening - maybe this is what it normally sounds like?

No Longer Working

By now I was wondering why the tool hadn't started moving horizontally when I got the second, very obvious, indication that something was very wrong - the strong ozone and burning plastic smell of electronics being pushed past their limits. I pressed the emergency stop button. Then I pressed it again. After the third attempt didn't stop my mill from trying to achieve the impossible I turned it off at the mains power, by this time there was a fairly large quantity of smoke coming out the control box.

Lesson 3: Check the safety features of the machine and make sure they work. When I first got the machine I did do this but I haven't really used it since and I've certainly never specifically tested it. We have a CNC mill at work that is used to make RF filter blocks - it can cut through metal like a hot knife through butter and no-one would ever consider using it without wearing the right safety gear and checking all the safety cut-outs (like the emergency stop button) first. With a small home mill like the one I have it is easy to disregard these steps - it's only a small mill after all. It is very easy to forget how much power these small devices have - getting your hand caught between the tool tip and the surface would not leave much of your hand left.

I have no idea why the emergency stop didn't work (or why a fuse didn't blow when it was pulling enough current to start smoking) and it would be easy to blame the end result on poor design by the manufacturer but unfortunately it was me who tried to get the machine to do something stupid. The root cause of this was that I had touched of on the milled surface of the workpiece rather than the raw surface - I was already 1.5mm deep when I told the control software I was at 0mm. A simple check of the live plot on the LinuxCNC would have shown this.

CNC Control Boards

My machine is currently in an unworkable state - powering it up simply makes all the stepper motors jitter (but there is no burning smell, which is a good sign) and I'm a bit too nervous to try the spindle yet. There are no obvious faults on the control board - no melted wires or obviously damaged components so it is going to be a pain to diagnose what has gone wrong. In the best case the motors are undamaged and replacing a few parts on the control board will get it operational again, worst case is ruined motors and control board - a range of a few 10s of dollars to a few 100. And either case results in a delay of days or even weeks before I can continue milling.

On the positive side there was no actual fire - one could very easily have started if the machine was unattended at the time, a habit I have unfortunately fallen into recently.

Lesson 4: Never, ever leave a CNC machine unattended.

All of this occurred over a two hour period and resulted from making decisions while in a rush to get to the final result and skipping some very simple checks and verification. I'm still very depressed about the whole thing, one reason for writing this article is to get it out of my system. The other reason is to serve as a cautionary tale - hopefully this will help spur you to take the extra time needed to check and verify everything before starting actual work, not only can it save you a lot of time, money and rework down the track it may help save your life.