4. Board Layout Pt. II
Before you begin, this tutorial assumes you completed part I of the layout tutorial. You can find the tutorial by accessing this page: 3. Board Layout Pt. I
Component Placement
Before you can place your components, you must import your parts from the schematic you created. To import your components, navigate to the top left tool-bar, select Design --> then select Import Changes From SPI-CAN Breakout Board.PrjPCb.
A new window will appear showcasing which components and nets will be added to the layout.
Go ahead and select Validate Changes, then select Execute Changes. Green checkmarks will appear under the Check and Done columns, indicating if a component has been successfully imported.
Upon closing the window, your components will appear on the layout as shown below:
Typically, you can click and drag components into your board perimeter. For the sake of time, we'll use a different technique for placing components by having our schematic and PCB documents open side-by-side.
Start by having only two windows open: your schematic and your PCB documents.
To close a window, right-click on the window you want to close, then select Close [Window Name]
Now, your Layout and Schematic should appear side-by-side one another.
This way, by selecting a part on the schematic, Altium will automatically select the same part on the PCB layout.
Using this technique, arrange the components on the layout as seen below. Remember, there's multiple ways to conduct this layout, this is just one of the solutions.
Note: in layout design, it's important to keep "friendly" components close together for high functionality. I.e., keep your decoupling capacitors close to the device they're decoupling, etc.
Layout Routing
Once you have your components arranged, you'll start wiring your components together through tracing.
Tracing is connecting solder masks together on a PCB using thin copper lines. These lines carry current between your components. Think of them as flat wires on your board.
To trace your components together, you have a couple of options. First, you can navigate to the toolbar with the various icons, right-click on the middle icon (the diagonal line with the arrow), then select Interactive Routing.
- Another way to access the trace feature is by holding Ctrl + W on your keyboard.
A green cross will now appear with your cursor. When you left-click on your layout, a red line will appear from the spot your selected. This creates a faded trace waiting to be place.
Upon left-clicking again, that part of the trace will be placed on the layout. From the second spot you selected, another part of the trace will begin appearing. To finish placing the trace, press esc on your keyboard.
Since this trace is floating, we don't need it for our design. To delete a trace, select the entire trace by holding down left-click and highlighting the entire object. Then, select delete on your keyboard.
Let's practice connecting a trace between two pins. Navigate to the bottom of the layout and find LED1 and R3.
We'll route these two components together. Notice how there are thin gray lines connecting between pins of specific components. These thin lines tell you which pins need to be routed together. If you Zoom in on a component, you can read the Net associated with it's pins.
Between LED3 and R3, we see they both have the LED1_2 net.
To trace these pins together, activate the routing tool. Then place the start of your trace on either pad. You'll notice when you hover over the center of a pin, your cursor will snap onto the center with a green cross hair.
Now, drag your trace across the layout onto the second pin. You should get a faded trace like below:
Left-click on the second pin whenever the cursor snaps over the center of the pad. Now, you should have a completed trace.
One thing to keep in mind when routing is to ensure your signals travel across the path of least resistance. This means setting up your traces at bends with 45 degree angles. A trace that bends at 90 degrees creates signal inflections in your design, causing increased electro-magnetic inteference (EMI) and impedance discontinuties (both bad things).
The picture on the right is a much better example of routing compared to the left.
Note: in actual layout design, it's important to use differential pairing on signals that operate at the same frequency (For instance, signals TXCAN and RXCAN from U2). This can help mitigate issues with cross-talk and EMI. For our purposes, we won't consider this issue. But, keep this in mind for future designs!
Now, use the techniques you just learned to conduct the routing between all of your signals nets as seen below:
You can also route between signals on different layers of your board. For instance, let's route two pins on the bottom layer.
Next, route the NetJ1_2 signal between your J1 and J2 components. You'll see the trace appear in blue as seen below.
Notice how the blue trace went under the red traces. This is extremely helpful if a pin you're routing is blocked by existing traces on the same layer.
Note: this only works easily for through-hole pins. Connecting a trace from another layer directly to a surface-mount component on a different layer (like R1) won't work! To avoid this, you'll need to place a routing via next to your pad before connecting a trace from another layer.
Fanout Vias
Vias are holes in a PCB with an inner coating of copper that carries signals between layers. A side profile of a via can be seen below as found in the Layer Stack Manager.
For all of our power pins, it's important to place a Via next to each 3.3V surface-mount pad to allow power to easily flow from the power plane to the pad.
To place a routing via, navigate to the top toolbar and right-click on the yellow circle icon, then select Via.
A faded via should now appear with your cursor. Left-click anywhere on the layout to place your via.
Double left-click on the via. In the Properties window, update the parameters to the following values:
- Net: 3.3V
- Diameter: 30mil
- Hole Size: 20mil
- Thermal Relief: Direct Enabled
Under Solder Mask Expansion, select the Manual tab, then selected Tented for the Top and Bottom dialogs.
Note: Enabling the Tented option will embed your via into the board, preventing you from applying solder to the via!
After you update the via's parameters, your fanout via should look much smaller.
Next, connect a trace between R3's 3.3V pad and the fanout via you just created. Make sure to keep the fanout via close to the pad.
Go ahead and copy & paste your new fanout via, and attach it to every surface-mount 3.3V pad. You should have 5 total on your board.
Once you're done, your layout should be similar to below:
Mounting Holes
When we install a PCB on the robot, it's important to have screw holes readily implemented onto the board to allow the Mech-E subteam to use our boards.
To start, rearrange the board slightly to make room for the mounting holes:
To place a mounting hole, navigate to the top toolbar, right-click on the via icon, then select Pad.
Place down your Pad. You should have something like below.
Open the Properties window for your pad. Navigate down to the Pad Stack module until you see the following table.
Update the parameters to the following values:
| X-Size | Y-Size | |
| All Layers | 100mil | 100mil |
| Pad Hole | 120mil |
Your pad should now look like this.
Copy and paste the mounting hole until you have four pads on the layout.
Open the Properties window for one of the Pads. Navigate down to the (X/Y) dialog boxes.
For each of the pads, distribute the following coordinates:
| Pad | X (mil) | Y (mil) |
| 1 | 200 | 250 |
| 2 | 1200 | 250 |
| 3 | 200 | 1250 |
| 4 | 1200 | 1250 |
Your board should now look like the following:
Polygon Pours
Now that you have your board traced, it's time to place down your polygon pours. Polygon pours are your board's layers. Each layer can contain a specific net, allowing you to creating power and ground planes. These planes will remove the final thin gray lines coming out from the power and ground pins.
Before starting, place a red perimeter of traces around the edge of your board.
Select all the perimeter traces, then open the Properties window. Under Properties, change the width to 10mil and the Net to Mechanical 1.
This border will help make it easier to create the Polygon Pours
To create a polygon pour, Navigate to the top left tool-bar, select Place --> then select Polygon Pour.
With your cursor, navigate to the bottom left corner of the board. Select the corner and drag your cursor until a triangle shape enlarges.
To change the polygon's shape, press Shift + Space until you get a right triangle. You can also press Space to flip the polygon.
Next, head to the oppostie corner (top right) and place down the pour by left-clicking on the corner.
Finally, head to the last corner (top left) and place the last piece of your polygon.
Now, you should have a placed polygon without a net. As a result, your polygon won't have any effect on your board.
To fix this, open the Properties window for your polygon. Then, change the net to GND and Repour the Polygon.
Your board should now be filled with your GND-planed polygon.
Notice how the GND pads and vias are connecting to the GND plane you just created.
Now, let's create a polygon pour for our bottom layer. To do this, navigate to the top left tool-bar, select Tools --> select Polygon Pours --> then select Polygon Manager.
Here, a new window should open. You'll see a full view of each polygon you made without the components.
To create the second polygon, right-click on the Top Layer GND_L01_P000 plane. Select Create New Polygon From --> then select Selected Polygon.
Now, this will create a copy of your polygon with the same net.
With the second plane hightlighted, change the Net to 3.3V and the Layer to Bottom Layer.
Once your plane's parameters are correct, select Apply on the bottom right of the window. A dialog box will pop up, select OK.
Your second polygon's view will now appear in the Polygon Manager, although not poured yet.
Next, select Repour on the left side of the window. Then select Force Repour All Polygons. Now, you have a newly poured 3.3V plane.
You can toggle between both planes to view traces on both sides of your board. Your board should now look like the following.
Design Rule Check
The Design Rule Check is the next crucial step in ensuring your layout design fits the requirements set by your design rules.
To run a Design Rule Check (DRC), navigate to Tools, then select Design Rule Check.
A new window will appear. Select Run Design Rule Check, then select OK.
A new document window will open containing the DRC. As you can see, there's only 1 Rule Violation. This is really good!
The DRC will categorize each error by rule, so you may have multiple violations for a single rule. To check the rule violation, click the hyperlink called Un-Routed Net Constraint (All).
Altium will take you down the page where the violation lives. Click on the hyperlink under the module.
By selecting the hyperlink, you'll be taken back to your layout and shown where the error lives. In this case, there's no 3.3V signal routed to U2's 3.3V pad.
To fix this, go ahead and shelve your planes. You can do so by accessing Tools --> select Polygon Pours --> then select Shelve 2 Polygons.
With the polygons shelved, go ahead and attach a fanout via to U2's 3.3V pad.
Once the error's fixed, you can run the DRC again. You'll find out that there are 0 rule violations! (or at least there should be...)
To return your planes, navigate to Tools --> select Polygon Pours --> then select Restore 2 Shelved Polygon(s).
Altium will now return the polygon planes. As you can see from the green error markers, you'll need to repour your planes.
To repour your polygons, head to Tools --> select Polygon Pours --> then select Repour All.
With your polygons repoured, you should have a board similar to below.
Board Customization
At this point, you'll need to add a personal touch to your layout and mark it as your own (and SCR's!)
Place this string on the outside of your board. You should see the red word String appear.
Go into the text's Properties window, and modify the string to state your name, and change the net to Top Overlay.
Finally, move your name on to your board. From here, you can add the project name, component indicators, or even images on your board! (You can figure out that last bit).
As a final step, you can add a trim around your board. When the board hits the manufacturer, part of the edge will be cut off.
To add this, update the Design Rules to include a new rule under Board Outline Clearance. Create a New Rule. Then, insert 10mil into the Minimum Clearance.
Select Apply, and then OK. Repour your polygon planes. Now, you'll have a finished board layout with a trim.
To check the 3D view, select View on the top left tool-bar, then select 3D Layout Mode.
Congratulations! You just finished your first PCB!
Another section to this tutorial might be added later... but for now, enjoy your completed first project!