Introduction
The Celtic Engineer is a weekly newsletter produced by Celtic Engineering Solutions. We hope you enjoy it. If you have any suggestions for topics, would like to give feedback or want your email added to the distribution list please send an email to [email protected].

Snatching defeat from the jaws of victory
There is no feeling quite like passing the finish line after a hard race. For engineers this is often when you place the final touches on the PCB. It is routed, you have checked all the errors. The silk screen looks good. You are done, you are ready to make up the documentation. And that is usually when it hits you. As you go through the assembly layer you realize something is wrong, very wrong. There are parts on the top and the bottom, but the assembly text is only on the top. What the hell?!

And that is when you realize you have made a terrible mistake. You have not paired your mechanical layers. It only takes a few minutes at the beginning of a project. You put your head on the desk, or I probably could have spent the time and done it just once in the templates file. Nooo!

If you have never run across this problem before you are fortunate. Trying to fix this can drive you to the point of insanity. Your first thought is to pair them right now. It does not fix the problem. In fact, if you now move the part on the bottom, with the assembly text still on the top, you will succeed in moving the part back to the top and the text to the bottom. And the problem devolves from there. Once I noticed this issue because all my 3D models were on the wrong side. You think you can move things manually, and you might be able to, but not everything. In the end you wind up making everything worse.

Understanding Layer pairs
First you must understand what we are doing and why. When you move a component from the top the bottom, top and bottom layers are paired automatically so all the pads are moved with no problem. But there are other things that you must pair manually. And you must pair them manually because their function is not fixed. In fact, it is selected by the user. I spent some time trying to decide how to use the Mechanical Layers. If you haven’t read the newsletter about layers you might want to go back to Issue # 18: Altium Mechanical Layers; who’s on first? There are three functions (for most of the boards I do, but there can be more) that require that you define a top and bottom set and then you tell Altium that those layers are paired so that when you move a component from top to bottom, it will also move everything from one mechanical layer to the other. For me those layers are the Assembly Layer, the 3D Bodies Layer, and the Courtyard Layer.

How do I fix this?
For whatever reason you are at the end of a long process and you are deep in trouble and just want to know how to get back on track without starting over. One idea is to move all the parts from the bottom to the top, assign layer pairs, move everything back to the bottom and you are done. But how do you keep track of the parts you have moved. Here is an easy way. It is not the only way, but it works and it doesn’t take all that long.

In the figure (see featured image) you can see the Layer Pairs button found in the View Configuration screen, the same place you turn layers on and off. The little window is where you create and delete layer pairs.

So here is what you do if you completed the project without having set up the layer pairs first:
1. First make sure there are no layer pairs. If you just created them (too late) delete them.
2. Go to the bottom layer and click on a part and select similar.
3. Then set the object kind and layer to same and click ok.
4. You should have all of the components on the bottom selected.
5. This is optional but a good idea->move these components to the right of the board using the move by x/y tool. Move them at least as far as the board is wide to clear the board. This allows you easily reselect them if you accidentally unselect them during the next few steps.
6. Keep them selected and go to the PCB Inspector and use the layer option to move them all to the top of the board.
7. Now create your layer pairs.
8. Now do everything in reverse.
9. Move the parts back to the bottom.
10. Using the move by x/y tool shift everything to the left (using the – key) by the same amount you moved them to the right.
11. You are done.
12. Don’t do this again, it’s painful.

It is important to note that if you had some, but not all layer pairs created that strictly following the above direction will probably not work. What you need to do is to get the parts and all the pieces to the top side of the board, the way they were when you first imported them from the schematic. Then you can create the desired pairings and when you move the parts back to the bottom everything else will do what it is supposed to do.

It’s not Wednesday, Is it?
You are probably looking at this newsletter on Monday morning and if you haven’t had your cup of coffee yet, you may be questioning what day of the week it is; Yeah, sorry its Monday. I am traveling to CES this week and will be posting lots of photos and news on Twitter and a few things on LinkedIn. If you haven’t followed us on Twitter yet, now would be a good time, @TCE_Utah.

Next week I will have a newsletter about the show.

Final thoughts
This newsletter is sponsored by Celtic Engineering Solutions LLC, a design engineering firm based out of West Jordan, Utah, which can be found on the web at: www.celticengineeringsolutions.com. You can find the newsletter on the company blog, LinkedIn or in your inbox by subscribing. Send your emails to The Celtic Engineer at: [email protected], with the subject line SUBSCRIBE.