Electronics Advanced: Microcontrollers, PCBs and Professional Practice
PCB Design and Soldering
In this lesson you will
- Describe the workflow from schematic to manufactured PCB
- Apply basic layout rules for traces, clearances and power
- Solder through-hole parts safely
Introduction
Breadboards are great for trying ideas, but they are fragile and noisy. For a lasting, reliable circuit, you move to a printed circuit board (PCB): a board with copper tracks that connect your parts permanently. Learning to design one is a major step.
The workflow
- Prototype on a breadboard, and prove it works.
- Draw the schematic in design software. Free, professional-quality tools such as KiCad exist. Give every part a reference (R1, C1, U1) and a value.
- Assign footprints: the pad pattern for each part. Check them against the datasheet.
- Lay out the board: place the parts, then draw the copper tracks.
- Run checks: an electrical rules check on the schematic and a design rules check (DRC) on the layout.
- Generate manufacturing files: usually Gerber files and a drill file.
- Order from a PCB manufacturer, and order the parts.
- Assemble and test.
A PCB's anatomy
- Copper layers: simple boards have one or two layers, and complex ones have four or more.
- Substrate: the insulating board, commonly fibreglass (FR-4).
- Solder mask: the green (or other colour) coating that protects tracks.
- Silkscreen: printed labels and outlines.
- Pads: where parts are soldered. Vias: plated holes that connect layers.
Layout rules of thumb
- Wider tracks carry more current. Power tracks should be much wider than signal tracks. Use a trace width calculator and the manufacturer's limits.
- Keep clearances between copper at least as large as the manufacturer's minimum, and larger where voltages are higher. Mains-voltage boards need much bigger spacing and special design rules, and should be designed only by those trained for it.
- Avoid sharp 90 degree corners on tracks where you can. Use 45 degree bends.
- Place decoupling capacitors right next to the power pins of chips.
- Use a ground plane, a large copper area connected to ground, on one layer. It gives a low-resistance return path and reduces noise.
- Keep sensitive analogue parts away from noisy switching circuits and fast digital lines.
- Keep tracks short for fast or sensitive signals.
- Put connectors at board edges, and mark pin 1 and polarity on the silkscreen.
- Add test points and clear labels, which make debugging easier.
- Leave mounting holes and room for assembly.
Quick quiz
Why place a decoupling capacitor very close to a chip's power pins?
Soldering through-hole parts
Soldering joins parts to the board with molten metal. Do it safely:
- Work in a ventilated space, since flux fumes irritate lungs and eyes. A small fume extractor helps.
- Wear safety glasses. Solder can spit, and wire ends can fly off when cut.
- Use a stand for the iron. A soldering iron is very hot, around 300 to 350 degrees Celsius in typical use. Never leave it on unattended, and never touch the tip.
- Leaded solder contains lead. Wash your hands after handling, and keep it away from food. Lead-free is common, but it needs a slightly hotter iron.
- Keep a damp sponge or brass wool to clean the tip.
- Keep long hair and loose clothing tied back, and tidy cables.
Steps for a good joint:
- Insert the part and bend the legs slightly so it stays in place.
- Heat the pad and the leg together with the iron tip for a second or two.
- Feed solder to the joint (not the tip) so it flows around both.
- Remove the solder, then the iron. Hold still for a moment.
- Inspect: a good joint is shiny and shaped like a small cone, with solder flowing smoothly onto the pad and lead.
- Trim the leads with flush cutters, wearing eye protection.
Common faults: a cold joint (dull, lumpy, poor connection), a bridge (solder joining two pads that should be separate) and overheating that lifts pads. Fix bridges with desoldering braid or a pump. Start with cheap practice kits.
Surface-mount parts
Most modern products use tiny surface-mount (SMD) parts, placed by machines. You can solder bigger SMD sizes by hand with practice, flux and a fine tip. Many manufacturers also offer assembly services.
Costs and sources
Small prototype boards are inexpensive from many manufacturers. Check design rules, order small runs first, and check footprints carefully, because the most common mistake is a wrongly sized footprint.
Try it yourself
In the free design software, draw the schematic for the LED circuit from the earlier course, assign footprints, lay out a tiny one-sided board, run the design rules check and generate the files. Do not order anything until you have checked everything twice.
Summary
- PCB design goes from schematic to footprints, layout, rule checks, manufacturing files, ordering and assembly.
- Use wide power tracks, proper clearances, ground planes and decoupling capacitors close to chips.
- Solder safely with ventilation, eye protection and a stand, and check joints for cold joints and bridges.
Lesson complete
+20 XP
Nice work. Keep going while it is fresh.
Sources and further reading