Introduction To PCB Design
Introduction To PCB Design
(with Eagle)
2
What is a PCB?
Printed Circuit Board
A printed circuit board (PCB) mechanically supports and electrically
connects electronic components using conductive tracks, pads and other
features etched from copper sheets laminated onto a non-conductive substrate.
Wikipedia
Layman definition:
A board that lets you attach components to make a
circuit.
3
Before the PCB
vs
Source: https://cdn.sparkfun.com/r/700-700/assets/1/3/b/5/8/50cba0dcce395fb716000000.jpg
Source: http://bunniefoo.com/novena/pvt2_release/novena_pvt2_top_sm.jpg 4
Motivation for makers?
Space and weight constraints
Making multiple copies of a design
Reduce mistakes in manual wiring/soldering
Aesthetics
Durability
5
Objective of lesson
Fundamental knowledge to
Understand PCB concepts
Design a PCB
Send for manufacturing
Properly share your design with others
Efficient SMD assembling techniques
6
Structure of a 1-layer PCB board
Source: http://techdocs.altium.com/display/ADRR/PCB_Obj-Via((Via))_AD
8
Electronic Design Automation (EDA) Software
Software that helps you design PCBs
Eagle
Commonly used by makers + Adafruit + Sparkfun
Extensive library support
User-interface so-so
Lite version supports max 2 copper layers, 100 x 80 mm board size
Not the best for high-speed designs
Multi-platform
Saved as XML (ASCII) files, great for version-control
Altium Designer
Industry standard
De-facto option for high-speed designs and complex PCBs
Circuit simulation
User-interface is unrivaled IMO
File saved as binary format, terrible for version-control
Windows-only
Expensive: US$10K/license
KiCad
Recently becoming more popular
Free & open-source with no limitations
Libraries not as common
Saves in ASCII files, great for version-control
Multi-platform
9
Component packages
2D physical dimension of a component
Determines number of solder pads/sizes
Common surface-mount packages
2-pin passives (dont rely on external power)
0603 (0.063 inch 0.031 inch), 0805 (0.079 in 0.049 in), 1206 (0.126 inch 0.063 inch),
SOD-123 (Small outline diode)
MELF (Metal electrode leadless face) cylindrical SMT component
3 pins Active Components (rely on external power)
SOT23, SOT-223-4 (Small Outline Transistor: 2.2mm pitch, 3 pins front, 4 pins total),
Integrated circuits (ICs), usually dual-inline or square
SOIC-16 (Small Outline Integrated Circuit 16 pins)
SSOP-28 (Shrink small outline package 28 pins)
TQFP-32 (Thin Quad Flat Package 32 pins)
QFN-48 (Quad Flat No leads 48 pins)
Others
Ports like USB, audio,
Board to board connectors like DF40C(2.0)-70DS-0.4V
Pin headers
uFL antenna connector
https://github.com/yeokm1/open-source-pcb-ruler 10
https://github.com/hemalchevli/Open-Source-PCB-Ruler
PCB Design/Manufacturing Workflow
1. Establish project requirements
7. Do 3D rendering
11
1. Establish project requirements
1. Establish project requirements
Power switch
10. Set PCB fabrication settings
12
2. Acquire parts and prototype
Consult data sheets to understand part 1. Establish project requirements
selection choices
Logic Components 2. Acquire parts and prototype
Drag-and-drop the *.lbr files one by one into Eagle 5. Design board: place parts & wiring
Control Panel Libraries folder
Right-Click on Libraries Folder -> Use all 6. Setup/run design rule check (DRC)
7. Do 3D rendering
14
3b. Design your PCB Schematic
Create and save schematic file (part and connection layout) 1. Establish project requirements
7. Do 3D rendering
Save schematic
8. Use CAM file to generate Gerbers
15
3c. Design your PCB Schematic
Add all Power components first
Micro-USB female connector 1. Establish project requirements
2x Diodes
7. Do 3D rendering
Seeed-OPL-Diode -> SMD-DIODE-SCHOTTKY-20V-500MA(SOD-123)
Or search 304020028 8. Use CAM file to generate Gerbers
Click-drag middle mouse button to move sheet 2. Acquire parts and prototype
Delete object with trash icon 6. Setup/run design rule check (DRC)
Wiring 7. Do 3D rendering
33uF and 100uF aluminum electrolytic can capacitors 9. Zip up relevant Gerber files
resistor -> CPOL-US -> CPOL-USE2-5
2mm lead spacing, 5mm diameter, polarised 10. Set PCB fabrication settings
2x 0.1uF ceramic decoupling capacitors 11. Write out bill of materials (BOM)
resistor -> C-US -> C-US025-025X050
2.5mm x 5mm area 12. PCB Assembly
7. Do 3D rendering
19
3g. Design your PCB Schematic
Add and wire Output Components
1. Establish project requirements
Ignore TIMER_OUTPUT for now
100ohm and 1kohm axial resistor 2. Acquire parts and prototype
20
3h. Design your PCB Schematic
Wiring nets
1. Establish project requirements
7. Do 3D rendering
Connects between two regions
VCC and GND are Eagles provided wiring nets 8. Use CAM file to generate Gerbers
21
3i. Design your PCB Schematic
(Grounded) Mounting holes
1. Establish project requirements
Can also use normal ungrounded mounting holes 8. Use CAM file to generate Gerbers
22
4. Run electrical check (ERC)
Tests if your wiring has been done properly
1. Establish project requirements
Not foolproof but usually good enough to detect weird or
missing connections 2. Acquire parts and prototype
Run ERC regularly, assign to shortcut key. Options -> Assign 3. Design your PCB schematic
7. Do 3D rendering
23
5a. Design board: place parts & wiring
Create and save board file (board layout)
1. Establish project requirements
File -> Switch to board
Initial board configuration 2. Acquire parts and prototype
properly.
11. Write out bill of materials (BOM)
See:
http://www.cadsoft 12. PCB Assembly
usa.com/training-
service/faq/#c95 24
6a. Setup/run design rule check (DRC)
Design rules provided by fabricator to check if your PCB adheres to requirements
1. Establish project requirements
Download PCB fabricator DRU, in this case Elecrow
http://www.elecrow.com/10pcs-2-layer-pcb-p-1175.html 2. Acquire parts and prototype
http://www.elecrow.com/download/Elecrow_PCB_eagle_rule.zip
3. Design your PCB schematic
7. Do 3D rendering
25
*I use Elecrow as a learning example here but it does not mean I endorse this company in any way.
6b. Setup/run design rule check (DRC)
Load DRU file just once
1. Establish project requirements
Press check to check your board or use keyboard shortcut
2. Acquire parts and prototype
7. Do 3D rendering
Rectify all errors
8. Use CAM file to generate Gerbers
26
5b. Design board: place parts & wiring
General board steps
1. Adjust board size to your requirements eg: 99mm x 49mm (check
1. Establish project requirements
fabricator price point)
7. Do 3D rendering
2. Place ground/power plane on Top layer using polygon function. 1mm away 8. Use CAM file to generate Gerbers
from edges to ease future resizing. Set polygon name.
9. Zip up relevant Gerber files
27
5c. Design board: place parts & wiring
General board steps
3. Component placement order
1. Establish project requirements
1. Place mounting holes
2. User-facing components, like USB connectors, switches and LEDs
2. Acquire parts and prototype
3. Large components
4. Everything else
3. Design your PCB schematic
4. Wiring order (Trace width usually the size of the solder pads)
1. Wire high-speed connections, avoid using vias
4. Run electrical rule check (ERC).
2. Wire power connections with wider traces
3. Wire everything else
5. Design board: place parts & wiring
5. Execute DRC check and rectify if needed
6. Silkscreen placement order (dont overlap with any holes/vias/parts) 6. Setup/run design rule check (DRC)
1. Smash component & adjust part designators if required to minimise confusion
2. Add descriptive text to certain areas to silkscreen 7. Do 3D rendering
3. Add PCB description/revision
7. Miter corners 8. Use CAM file to generate Gerbers
8. Make sure Ratsnest gives Nothing to do
9. Zip up relevant Gerber files
Tips
Execute Ratsnest to recalculate remaining airwires position as much as 10. Set PCB fabrication settings
possible after every operation
Run DRC after you make every change to catch problems earlier 11. Write out bill of materials (BOM)
Wire at 45 degree angles to reduce signal reflection
12. PCB Assembly
28
7. Do 3D rendering
Use this website http://3dbrdviewer.cytec.bg/
1. Establish project requirements
7. Do 3D rendering
29
8. Use CAM file to generate Gerbers
Gerber files
2D vector format used by PCB fabricator to make PCBs for you 1. Establish project requirements
CAM file provided by fabricator to help you generate Gerber layer files 2. Acquire parts and prototype
Align.zip
5. Design board: place parts & wiring
Use the correct CAM file according to number of layers like 2 layers
Open CAM Processor: File -> CAM Processor 6. Setup/run design rule check (DRC)
Once in CAM Processor, load the CAM job as shown below 7. Do 3D rendering
7. Do 3D rendering
Go to saved folder and zip up the required files 8. Use CAM file to generate Gerbers
Rightfully you should inspect your Gerber files for potential mistakes
using software/websites like: 10. Set PCB fabrication settings
GR-Prevue: http://www.graphicode.com/GC-Prevue_Gerber_Viewer
http://circuitpeople.com/ 11. Write out bill of materials (BOM)
http://mayhewlabs.com/webGerber/
But so far I dont have any problems so I usually skip the Gerber file check step 12. PCB Assembly
31
10a. Set PCB fabrication settings
Go to order page http://www.elecrow.com/10pcs-2-layer-pcb-p-1175.html
1. Establish project requirements
7. Do 3D rendering
Basic options like PCB size, color and lead time self explanatory
32
10b. Set PCB fabrication settings
1. Establish project requirements
How it is made? Copper surfaces covered Copper surfaces covered with 7. Do 3D rendering
with solder by dipping PCB nickel with gold coating via
in solder then blowing away immersion 8. Use CAM file to generate Gerbers
Coating evenness Uneven, dont use for fine- Very even coat, must use if you
pitch SMD components have fine SMD components. 9. Zip up relevant Gerber files
Durability Reasonable, but dont Better than HASL, can last for
expose too long to air months 10. Set PCB fabrication settings
Solderability Great So-so
(should not factor in your decision)
11. Write out bill of materials (BOM)
Cost Low High
12. PCB Assembly
Others:
Electrolytic Gold-plating, Immersion Silver, Immersion Tin, Organic Surface Protectant 34
11. Write out bill of materials (BOM)
Export BOM and modify.
So others can replicate your PCB 1. Establish project requirements
7. Do 3D rendering
Use Libreoffice to open CSV file and save in its native ODS format
8. Use CAM file to generate Gerbers
CSV not enough features, does not store column width
Some Excel versions have difficulty opening CSV file generated by Eagle
9. Zip up relevant Gerber files
Open-source format
36
12b. PCB Assembly
Reflow Soldering only for surface-mount components
Requires stencil and solder paste 1. Establish project requirements
7. Do 3D rendering
39
Final Words
This is just the beginning
Practice makes perfect, the more PCBs you
design/fabricate, the better you will get
40