Printed circuit boards
The board is where the circuit stops being an idea and acquires resistance, capacitance, inductance and temperature. Two boards with the same schematic can work perfectly in one case and be a disaster in the other: the difference is in how they were laid out.
01What a board is made of
An insulating substrate with copper bonded on top. The most common is FR-4: fiberglass with epoxy resin, 1.6 mm thick, with a copper foil of 35 µm (what the industry calls “one ounce”) on one side or on both.
| Layer | What it is | Practical note |
|---|---|---|
| Substrate | FR-4, sometimes phenolic paper (FR-2) in low-cost boards | 1.6 mm is the standard; 0.8 and 2.4 mm are also available |
| Copper | 35 µm (1 oz) typical; 70 µm in power boards | Defines how much current a trace of a given width can carry |
| Solder mask | Lacquer that covers everything except the pads | Prevents solder bridges and protects the copper from oxidation |
| Silkscreen | Printed text and outlines | Reference designators, pin 1 mark, polarity, board version |
| Pad finish | HASL (tin) or ENIG (gold over nickel) | ENIG is flatter and better for fine-pitch SMD; HASL is cheaper |
| Vias | Plated holes | A 0.3 mm drill with a 0.6 mm pad is a safe value at any fab house |
02From schematic to board
The software imports the netlist from the schematic and places all the footprints together, joined by thin straight lines that show what must be connected to what: this is the ratsnest, the “spider web.” From there, the work is placing and routing.
- Define the outline of the board and the position of the fixed elements: connectors, mounting holes, components that stick out through the panel.
- Place the rest, grouping by functional blocks, following the flow of the schematic and putting the decoupling capacitors right next to each IC.
- Route the power and ground first, then the critical signals, and the rest last.
- Pour the copper planes and verify with the DRC (design rules check).
- Review in 3D and print at 1:1 to check footprints and heights.
The rule that sums it all up: if the placement is right, the routing takes care of itself. When routing becomes a puzzle, the solution is almost never to keep pushing the traces: it is to move components.
03Design rules
Trace width by current
A trace is a conductor with resistance: it heats up. The width is chosen so that this heating is acceptable, and the reference is the IPC-2221 standard.
| Width | Allowable current | Typical use |
|---|---|---|
| 0.25 mm (10 mil) | ≈ 0.9 A | Signals, high-impedance inputs |
| 0.5 mm (20 mil) | ≈ 1.4 A | Power for logic circuits |
| 1.0 mm (40 mil) | ≈ 2.3 A | General power distribution on a board |
| 2.0 mm (80 mil) | ≈ 3.8 A | Power outputs, relays |
| 3.0 mm (120 mil) | ≈ 5 A | Power supply input, large loads |
Values for outer-layer traces with 35 µm copper and a temperature rise of 10 °C. Inner traces on a multilayer board allow roughly half. When more is needed, the trace is widened, duplicated on both sides, or the mask is removed from it and solder is added.
- Mains input and primary: 2 mm traces, with 3 mm of clearance from any low-voltage trace.
- 5 V output and its return: 1 mm at the very least; 1.5 mm is better, and as short as possible.
- Feedback and control-circuit signals: 0.25 mm is more than enough.
- The output capacitor as close as possible to the regulator, with its ground going to the same point as that of the input capacitor.
Between traces at mains potential and the rest of the circuit, the distances in the safety standards must be respected: on the order of 2.5 to 4 mm through air and across the surface of the substrate, even more if there is a risk of dirt or moisture. On boards with an isolation optocoupler it is common to mill a slot under the component to increase the creepage distance. None of this is optional or negotiable “because it doesn’t fit.”
Ground, decoupling and return path
Pouring copper over all the free area and connecting it to ground gives lower impedance, better heat dissipation and less interference. On a two-sided board, the usual practice is to route the signals on top and leave the bottom side as a ground plane that is as unbroken as possible.
All current that goes out comes back, and at high frequency it comes back directly beneath the outgoing trace. If the ground plane is cut by another trace, the return current must go around the cut: a loop forms, and that loop radiates and picks up noise. That is why you do not cut the ground plane with long traces.
- A 100 nF capacitor right at the power pins of every IC, with the shortest possible trace.
- Analog and digital ground are joined at a single point, near the power input.
- Crystals, with their capacitors, as close as possible to the microcontroller and with ground underneath.
- No 90° angles in traces: use two 45° segments. At low frequency it is only neatness; at high frequency, it matters.
- Mounting holes with a ground pad if the enclosure is metal and grounded.
- Test points on the signals that will be measured: they save hours of repair.
04Fabrication
| Method | How | Capability |
|---|---|---|
| Thermal (toner) transfer | The layout is printed with toner on glossy paper and ironed onto the copper; the toner protects the copper and the rest is etched away | Traces of 0.5 mm and up. Cheap, it is the classic workshop method. |
| Photosensitive | Board with photoresist coating, transparency with the design, UV exposure unit, developing and etching | Reaches 0.25 mm and gives better definition, but needs more equipment. |
| CNC milling | A milling bit removes the copper around the traces | No chemicals and very fast for prototypes, but it does not plate the vias. |
| Industrial | The Gerber files are sent to the fab house | Plated two-sided boards, solder mask, silkscreen and drilling. Today it is so accessible that making boards by hand is rarely justified, except for learning or to avoid the waiting time. |
- One Gerber file per layer: top copper, bottom copper, mask for each side, silkscreen for each side and board outline.
- The drill file (Excellon), with diameters and positions.
- Optionally, the component placement file and the BOM, if assembly is also ordered.
- Before sending: open the Gerbers in a viewer —not in the program that generated them— and review them layer by layer. It is the last possible check.
Ferric chloride stains permanently, attacks metals and must not be poured down the drain. Work with gloves, safety goggles, ventilation and plastic containers, and the spent liquid is neutralized and disposed of as hazardous waste. The same goes for acid and hydrogen peroxide, which also release gases.
05Assembly and soldering
Leads that go through the board. Easy to solder by hand and to repair, mechanically robust; it takes up both sides and limits density. It is the right choice for connectors, power components and anything that is subject to mechanical stress.
Components soldered onto pads, without drilling. Much smaller, cheaper in volume and better at high frequency. They are soldered with paste and hot air or in a reflow oven. The 1206 and 0805 sizes are easily soldered by hand; 0402 already requires good eyesight and good tweezers.
| Soldering defect | Appearance | Cause |
|---|---|---|
| Cold joint | Dull, rough, ball-shaped | Too little heat or movement while cooling. It is the intermittent failure par excellence. |
| Bridge | Solder joining two pads | Too much solder or a dirty tip. Remove it with desoldering braid. |
| Lifted pad | The copper peeled away from the substrate | Too long with the soldering iron. It is permanent damage to the board. |
| Tombstone | An SMD part standing on end | Uneven pads or asymmetric heating in reflow. |
| Insufficient solder | Pad barely wetted | No flux, or oxidized copper. |
Shiny, concave and volcano-shaped, wetting both the pad and the lead. Neither a ball nor a mountain. The soldering iron tip touches pad and lead at the same time for a second or two, then the solder goes in, and only then is it withdrawn: first the solder, then the iron. Flux is what makes all of that possible, which is why solder with a rosin core is called that.
06In the lab
Take the already-drawn power supply schematic to a board. Define the outline and mounting holes, place the components, route power first, pour a ground plane and run the DRC. Compare the result with a classmate’s: same components, two very different boards.
Print the design at 1:1 scale, place the real components on top and check each footprint, the spacing between packages and that the connectors remain accessible. Note how many errors turned up: there is always one.
Print on glossy paper with the highest toner density, iron it onto clean copper, remove the paper with water and etch with ferric chloride. Drill with 0.8 and 1 mm bits. Check the continuity of all the traces with the ohmmeter before soldering anything.
On a test board, make three traces of 0.25, 0.5 and 1 mm of equal length. Pass 1 A through each one and measure the voltage drop and the temperature (with an infrared thermometer or simply by touch). Compare with the table in section 3.
On a scrap board, practice ten THT solder joints and evaluate them with a magnifying glass: shine, shape and wetting. Then deliberately produce a cold joint and a bridge, and identify them. Finally, desolder an IC with braid and with a desoldering pump.
07Common mistakes
| Symptom | Usual cause |
|---|---|
| The component does not fit its footprint | Wrong footprint, or one not checked. It is detected by printing at 1:1 before fabrication. |
| The board works but a trace gets hot | Width insufficient for the current. Reinforce with solder or redesign. |
| The digital circuit fails randomly | Missing decoupling capacitors, or they are far from the IC. |
| Noise and strange oscillations in the analog section | Cut ground plane, large return loops, or analog and digital grounds joined at several points. |
| The vias make no contact | Homemade two-sided board without plating: you have to rivet or solder a small wire through each via. |
| The fab house rejects the design | Its minimum rules were violated: width, spacing, via annular ring or distance to the edge. Each fab house publishes its limits: load them into the DRC before routing. |
| The connector ended up 2 mm off from the enclosure cutout | The assembly was not checked in 3D against the mechanical model. |
| Intermittent fault that shows up with heat or knocks | Cold joint. It is found by inspecting with a magnifying glass and pressing on each component while the equipment is running. |
08Self-assessment
What is the ratsnest and what do you do with it?
The web of thin lines that shows, over the freshly imported footprints, which pins must end up connected according to the netlist. They are not traces: they are the guide for placing and routing.
What trace width is needed for 2 A in 35 µm copper?
Approximately 1 mm (40 mil) for a temperature rise of 10 °C. With 1.5 or 2 mm you can work with more peace of mind, especially if the trace is long.
Why does the decoupling capacitor go right next to the IC?
Because its function is to deliver instantaneous current at every switching event. The inductance of a long trace ruins that effect: the capacitor has to be within millimeters of the power pins.
What does it mean that the return current “follows” the outgoing trace?
That at high frequency the return through the ground plane flows directly beneath the trace, because it is the path of lowest inductance. If the plane is cut, the current must go around the cut and a loop forms that radiates and picks up noise.
What files do you send to a board fab house?
The Gerber files —one layer per file: coppers, masks, silkscreens and outline— and the drill file. If assembly is also ordered, the BOM and the component placement file.
Why are the Gerbers checked in an external viewer?
Because it shows exactly what the fab house will read, not what the design software thinks it exported. It is the last check before spending money and weeks of waiting.
What clearance must be left between mains traces and low-voltage traces?
On the order of 2.5 to 4 mm, depending on the applicable safety standard, and more if there is moisture or dirt. On boards with optocoupler isolation, a slot is also milled under the component.
How do you recognize a cold solder joint?
It is dull and rough, ball-shaped instead of concave, and does not wet the pad well. It produces intermittent faults that appear with temperature or vibration.
What advantage does SMD have over THT, beyond size?
Its terminals are much shorter: less parasitic inductance, better high-frequency behavior and more effective decoupling. In addition, it does not occupy the opposite side and makes it possible to mount components on both sides.
Routing has become impossible: ten crossed connections remain. What should you do?
Go back to placement. Almost always it is enough to rotate or move two or three components so that the connections untangle themselves. Insisting on the traces usually ends in a board full of vias and detours.