FreePCB User Guide |
Version 1.2 |
5. PCB Layout (continued)
5.13 Nets, Ratlines and Routing
5.131 Nets
A net is a set of pins which will be connected together on the PCB. Each net must have a unique name. These names may be descriptive (such as "GND" or "video_in") or merely distinctive (such as "N06744"). In FreePCB, net names are limited to 40 characters in length, and may contain special characters. Each pin in a net is identified by a string consisting of the reference designator of the part containing the pin, the character ".", and the pin name.
Nets are usually read from a netlist file, which also includes a list of parts in the design (see Section 5.14: Importing Netlist Files). Two examples of nets are shown below.
Name: N00834
Pins: U2.4 JP1.9
Name: GND
Pins: U2.7 C2.2 U3.3 C1.2 U1.19
Y1.4 JP5.3 JP4.10
JP4.4
R2.2 C4.2 JP1.10 JP1.5 R1.2 C3.2 U1.8
JP6.2
JP3.3 JP2.3 JP3.10 JP3.4 JP3.6 JP3.8 JP2.10
JP2.8
JP2.2 JP2.4 JP2.6 JP3.2
5.132 The Netlist
In FreePCB, all of the information about nets is stored in a data structure called the netlist. It can be viewed and modified by selecting Nets from the Project menu. This pops up the View/Edit Netlist dialog.
This dialog contains a list of all of the nets in the project. The name, number of pins and the default trace width, via width and via hole diameter are shown for each net.
The checkbox next to each name determines the visibility of the net. If the visibility box is unchecked, then ratlines for that net will NOT be displayed in the layout window. This is useful when you are working with a particular net and do not wish to be distracted with other ratlines. The Make all visible/invisible button checks or unchecks all of the boxes.
In the example above, the trace and via widths are set to zero for most of the nets. This indicates that the project defaults are to be used. The widths for the VCC and GND nets have been set to non-zero values which will be used for traces in those nets. Widths can be changed by selecting one or more nets, and clicking on the Change widths button. This pops up the following dialog, which allows setting the new widths.
You can perform more extensive editing of a single net by selecting it and clicking the Edit selection button, which pops up:
From here you can change the name, visibility and widths of a net, and add or delete pins.
5.133 Connections and Ratlines
Like most PCB editors, FreePCB assumes that nets will be routed as a series of connections, where each connection is between 2 pins. For any net containing more than 2 pins, there will be multiple possible sets of connections. For example, a net consisting of pins U1.1, U2.2 and U3.3 could be routed as:
If you are designing a PCB "on-the-fly" without a netlist, you can use stub traces instead of adding connections and routing them. See the note in Section 5.137: Stub Traces for details.
5.134 Modifying Ratlines
Most of the time, you will use the ratlines which FreePCB calculates. However, there may be situations when you would like more control over the ratlines. FreePCB provides several editing options for ratlines:5.135 Routing
Routing is the process of converting ratlines to copper traces. Traces consist of one or more straight-line segments, connected together with vertices at their connection points. If two adjacent segments are on different layers, a via will be placed at the vertex between them.
To begin routing, select a ratline by clicking on it. It will change to the selection color to indicate that it has been selected. Then press F4 ("Route Segment"). You will find yourself dragging a trace segment from the pin of the connection that was closest to the cursor when you pressed F4. The image below shows a segment being routed from pin 1 of JP6.
Note that the segment is on the top copper layer because that was the active layer when we started routing. You can change the active layer by pressing one of the numeric keys "1" through "8", which represent the available layers in top-to-bottom order. For example, for a four-layer board, "1" would select the top copper layer, "2" would select the inner 1 layer, "3" would select the inner 2 layer, and "4" would select the bottom copper layer. If you change layers while routing a segment, it will immediately switch to the new active layer.
Left-clicking will place a vertex at the cursor position, end the first segment at the vertex, and initiate routing a second segment from the vertex, as shown in the next image. We have also switched layers by pressing the numeric key "4", so that the new segment is being drawn on the bottom copper layer.
Left-click again to place the next vertex and start routing the next segment. In this way you can draw a trace consisting of multiple connected segments on multiple layers. The image below shows our trace nearing completion with several segments on different layers, with 2 vias.
To finish the trace, press F4 ("Complete Segment") while routing the last segment. The segment will automatically be extended to the end-pin of the trace. Alternatively, you can place the cursor over the end-pin and left-click. Our final trace is shown below.
While routing a trace, you can right-click to stop routing before the trace is completed. The unrouted portion of the connection will be shown as a ratline between the last vertex and the end-pin. You can finish the trace later by selecting the ratline and routing it from either end. A trace can even have multiple unrouted portions, as shown below.
While a segment is being dragged, the Routing Grid will be in effect. If the starting point for the segment is on the routing grid, then the Snap Angle will also be in effect.
5.136 Changing and Swapping Pins
You can change the end-pin of a partially-routed trace by selecting the ratline to the pin and pressing F5 ("Change Pin"), then drawing a new ratline to a different pin.
You can swap pins in a part by selecting one of them, holding down the "s" key and clicking on the other pin. You will be prompted to swap the connections to the pins.
Besides traces based on connections between pins, FreePCB supports stub traces. These are traces that start at a pin, but do not end at a pin. Instead, they end blindly, usually with a via. Stub traces are mainly used to connect SMT pins to copper areas, which will be described in Section 5.14: Copper Areas. To create a stub trace, select the starting pin. Press F3 ("Start Stub") to start dragging a trace segment from the pin. The segment will be on the currently active layer, unless the pin is a SMT pin, in which case the active layer will change to the layer of the pin. Left-click to place a vertex. If you want more than one segment, add additional vertices. Then terminate the stub trace by right-clicking. The trace will end at the last vertex that you placed, and a via will be added at the vertex. If you don't want the via, select it and press F3 ("Delete Via"). If the via passes through a copper area on the same net as the starting pin, a thermal relief will be placed to connect the via to the copper area. An example of a stub trace connecting a pin to a copper area is shown below. The thermal relief is represented by the "X" drawn on the via in the ratline color.
Important Note: A stub trace can be converted to a regular pin-to-pin trace by routing it to a pad. When you place the end-point of a segment anywhere on a pad that is connected to the same net (or not connected to any net) the stub trace will automatically connect and terminate. This can be very useful if you are designing a PCB "on-the-fly", without a netlist.
5.138 Modifying Traces
Traces can be modified by selecting segments, vertices or ratlines and using function-key commands. You can select an entire trace by clicking on a segment or vertex while holding down the "t" key. You can select an entire net by clicking on a segment, vertex or pin while holding down the "n" key.
Here are descriptions of the function-key commands:
The Set Trace and Via Widths dialog, which is invoked by pressing F1 with a net, trace, segment or vertex selected, is shown below.
This dialog allows you to modify the trace and via widths for a segment, trace, or net. You can also set the net default to the new widths, so that they will be used for any future routing of the net.