-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tutorial_tmp.html
532 lines (466 loc) · 37.6 KB
/
Tutorial_tmp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
<!DOCTYPE html>
<html>
<head>
<title>Tutorial.md</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<style>
/* https://github.com/microsoft/vscode/blob/master/extensions/markdown-language-features/media/markdown.css */
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
body {
font-family: var(--vscode-markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif);
font-size: var(--vscode-markdown-font-size, 14px);
padding: 0 26px;
line-height: var(--vscode-markdown-line-height, 22px);
word-wrap: break-word;
}
#code-csp-warning {
position: fixed;
top: 0;
right: 0;
color: white;
margin: 16px;
text-align: center;
font-size: 12px;
font-family: sans-serif;
background-color:#444444;
cursor: pointer;
padding: 6px;
box-shadow: 1px 1px 1px rgba(0,0,0,.25);
}
#code-csp-warning:hover {
text-decoration: none;
background-color:#007acc;
box-shadow: 2px 2px 2px rgba(0,0,0,.25);
}
body.scrollBeyondLastLine {
margin-bottom: calc(100vh - 22px);
}
body.showEditorSelection .code-line {
position: relative;
}
body.showEditorSelection .code-active-line:before,
body.showEditorSelection .code-line:hover:before {
content: "";
display: block;
position: absolute;
top: 0;
left: -12px;
height: 100%;
}
body.showEditorSelection li.code-active-line:before,
body.showEditorSelection li.code-line:hover:before {
left: -30px;
}
.vscode-light.showEditorSelection .code-active-line:before {
border-left: 3px solid rgba(0, 0, 0, 0.15);
}
.vscode-light.showEditorSelection .code-line:hover:before {
border-left: 3px solid rgba(0, 0, 0, 0.40);
}
.vscode-light.showEditorSelection .code-line .code-line:hover:before {
border-left: none;
}
.vscode-dark.showEditorSelection .code-active-line:before {
border-left: 3px solid rgba(255, 255, 255, 0.4);
}
.vscode-dark.showEditorSelection .code-line:hover:before {
border-left: 3px solid rgba(255, 255, 255, 0.60);
}
.vscode-dark.showEditorSelection .code-line .code-line:hover:before {
border-left: none;
}
.vscode-high-contrast.showEditorSelection .code-active-line:before {
border-left: 3px solid rgba(255, 160, 0, 0.7);
}
.vscode-high-contrast.showEditorSelection .code-line:hover:before {
border-left: 3px solid rgba(255, 160, 0, 1);
}
.vscode-high-contrast.showEditorSelection .code-line .code-line:hover:before {
border-left: none;
}
img {
max-width: 100%;
max-height: 100%;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:focus,
input:focus,
select:focus,
textarea:focus {
outline: 1px solid -webkit-focus-ring-color;
outline-offset: -1px;
}
hr {
border: 0;
height: 2px;
border-bottom: 2px solid;
}
h1 {
padding-bottom: 0.3em;
line-height: 1.2;
border-bottom-width: 1px;
border-bottom-style: solid;
}
h1, h2, h3 {
font-weight: normal;
}
table {
border-collapse: collapse;
}
table > thead > tr > th {
text-align: left;
border-bottom: 1px solid;
}
table > thead > tr > th,
table > thead > tr > td,
table > tbody > tr > th,
table > tbody > tr > td {
padding: 5px 10px;
}
table > tbody > tr + tr > td {
border-top: 1px solid;
}
blockquote {
margin: 0 7px 0 5px;
padding: 0 16px 0 10px;
border-left-width: 5px;
border-left-style: solid;
}
code {
font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
font-size: 1em;
line-height: 1.357em;
}
body.wordWrap pre {
white-space: pre-wrap;
}
pre:not(.hljs),
pre.hljs code > div {
padding: 16px;
border-radius: 3px;
overflow: auto;
}
pre code {
color: var(--vscode-editor-foreground);
tab-size: 4;
}
/** Theming */
.vscode-light pre {
background-color: rgba(220, 220, 220, 0.4);
}
.vscode-dark pre {
background-color: rgba(10, 10, 10, 0.4);
}
.vscode-high-contrast pre {
background-color: rgb(0, 0, 0);
}
.vscode-high-contrast h1 {
border-color: rgb(0, 0, 0);
}
.vscode-light table > thead > tr > th {
border-color: rgba(0, 0, 0, 0.69);
}
.vscode-dark table > thead > tr > th {
border-color: rgba(255, 255, 255, 0.69);
}
.vscode-light h1,
.vscode-light hr,
.vscode-light table > tbody > tr + tr > td {
border-color: rgba(0, 0, 0, 0.18);
}
.vscode-dark h1,
.vscode-dark hr,
.vscode-dark table > tbody > tr + tr > td {
border-color: rgba(255, 255, 255, 0.18);
}
</style>
<style>
/* Tomorrow Theme */
/* https://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #8e908c;
}
/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #c82829;
}
/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #f5871f;
}
/* Tomorrow Yellow */
.hljs-attribute {
color: #eab700;
}
/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #718c00;
}
/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #4271ae;
}
/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8959a8;
}
.hljs {
display: block;
overflow-x: auto;
color: #4d4d4c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
</style>
<style>
/*
* Markdown PDF CSS
*/
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif, "Meiryo";
padding: 0 12px;
}
pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
border-radius: 3px;
overflow-x: auto;
white-space: pre-wrap;
overflow-wrap: break-word;
}
pre:not(.hljs) {
padding: 23px;
line-height: 19px;
}
blockquote {
background: rgba(127, 127, 127, 0.1);
border-color: rgba(0, 122, 204, 0.5);
}
.emoji {
height: 1.4em;
}
code {
font-size: 14px;
line-height: 19px;
}
/* for inline code */
:not(pre):not(.hljs) > code {
color: #C9AE75; /* Change the old color so it seems less like an error */
font-size: inherit;
}
/* Page Break : use <div class="page"/> to insert page break
-------------------------------------------------------- */
.page {
page-break-after: always;
}
</style>
<script src="https://unpkg.com/mermaid/dist/mermaid.min.js"></script>
</head>
<body>
<script>
mermaid.initialize({
startOnLoad: true,
theme: document.body.classList.contains('vscode-dark') || document.body.classList.contains('vscode-high-contrast')
? 'dark'
: 'default'
});
</script>
<h1 id="beginners-guide-to-kicad">Beginner's Guide to KiCad</h1>
<h6 id="by-pablo-villamejor"><em>by: Pablo Villamejor</em></h6>
<p>This tutorial will walk you through a simple KiCad example project from schematic building to PCB layout. In this project we will be given a schematic plan to follow and construct from scratch. We'll also touch on library linking, editing, and creation. We'll also export our PCB to gerbers so the board can be fabricated.</p>
<p>Now to begin we must first download and install KiCad. Head over to <a href="https://www.kicad.org/download/">the download page of the KiCad website,</a> select your operating system, and download the most recent model.</p>
<pre><code>Note: This tutorial was written using KiCad 8.0 on Windows 10. (i.e. Use this version to follow along.)
</code></pre>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/empty.png" alt="empty-workspace">
Once you install and open KiCad, you can go to <em>File, New Project,</em> and then name it whatever you like. Once named, you may select <strong>Schematic Editor</strong> to begin.</p>
<h2 id="creating-the-schematic">Creating the Schematic</h2>
<p>When opened, the <strong>Schematic Editor</strong> should appear like this, plain and empty besides the red border and text boxes.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/plain.png" alt="Plain-editor"></p>
<p>The objective of this project is to recreate this simple circuit and prepare it for manufacturing. The example has only 6 major components which will make this task more simple than most, but it is sufficient in order to understand the fundamental steps of KiCad and PCB design.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/example.jpg" alt="Example"></p>
<h3 id="adding-symbols">Adding Symbols</h3>
<p>To begin recreating this circuit, first add the components. This can be done using the <em>Add Symbols</em> button on the right toolbar, or press the <em>"A"</em> button on your keyboard, then left click anywhere on your workspace to begin selecting your component.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/symbols.png" alt="Symbol-chooser"></p>
<p>This will open up a window where you can input the name of the component you are trying to place. Most of the components have their names beside them (unless they were renamed, like is the case for the connectors in the example circuit) or use common electronic symbols which make them easy to recognize. When you have the part selected you can rotate it using the <em>"R"</em> button on your keyboard then left click again on your workspace to place it. You can also use the <em>"X"</em> and <em>"Y"</em> keys to rotate it along the X or Y direction respectively. After you place a component, you'll notice you're still in placement mode. Hit the <em>"esc"</em> button on your keyboard to return to normal pointer mode. This works for all placement modes in KiCad so if you are confused you can always click <em>"esc"</em> to return to the normal mode</p>
<pre><code>Tip: When placing any symbol, KiCad will automatically annotate it based on the order you placed them. These annotations are key to remaining organized when building and assembling the PCB. You can change the annotaions by double clicking them and inputing it manually, this can be done at any time. There is no standard on how annotations should be done, it varies from designer to designer, but try to follow a simple system in your annotations to avoid confusion for you and future viewers of your work.
</code></pre>
<p>This example circuit uses one transistor, two resistors, and three 1x2 female connectors. Place all the components somewhat centrally to the workspace and similar to how they appear in the example. Once you have them all on the workspace you are ready to move on to the next step which is adding the reference grounds.</p>
<h3 id="placing-power-symbols">Placing Power Symbols</h3>
<p>The process is the same as adding in the components however, instead of selecting the <em>"Add Symbols"</em> button, you select the <em>"Add Power Symbols"</em> button underneath it, or use the <em>"P"</em> button on your keyboard.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/gnd.png" alt="groundref"></p>
<p>This will open up a similar window where you can search for the reference grounds. This window allows you to input all kinds of grounds, power sources, and various other power related symbols. When you've placed one down, you do not need to follow the same process for the rest of them. You may simply copy the component by clicking it and pressing <em>"ctrl + c"</em> or hoevering over it and pressing <em>"C"</em> on your keyboard. Then pasting with <em>"ctrl + v"</em></p>
<h3 id="wiring-the-schematic">Wiring the Schematic</h3>
<p>Once you have all four ground references placed, you are ready to begin wiring the components. You can begin this by pressing the <em>"Add a Wire"</em> button on your right toolbar, or press the <em>"W"</em> button on your keyboard. Then simply left click on the component connectors, creating the necessary connections, and following the example circuit.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/wiring.png" alt="wiring"></p>
<p>When you are done wiring, the circuit is functionally the same as the example. Now we just need to rename the various input terminals. This wont affect the functionality of the circuit, it is just a good industry practice to name your components for and future viewers of your schematics. As you can see from the image above I have already renamed my connectors, to do this you need to simply double click on the name of the component, or press the <em>"V"</em> button on your keyboard while hovering over the component. This will open a window where you can input whatever name youd like to give to the component.</p>
<h3 id="running-an-electrical-rules-check">Running an Electrical Rules Check</h3>
<p>Congratulations! If you finished up to here then you have successfully recreated the circuit in your <em>Schematic Editor</em>. The nect step is to run an <em>Electrical Rules CHECK</em> or <em>ERC</em>. This can be found on the upper toolbar on the right hand side. This just checks if the circuit you created follows all the basic electrical rules. It is basically a way to check if you forgotten anything important.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/erc.png" alt="ERC"></p>
<p>When ran the ERC reveals one error, as shown in the image above. This is a simple error basically saying that KiCad is can not distinguish which connector is the power input. You, the designer, knows which is the power input as you labelled the connector "POWER" but KiCad does not. This can be fixed by simply placing a Power Flag on the wire connecting the power input connector and its ground reference. The power flag can be found in the <em>"Add Power Symbols"</em> window as the first result when you type "flag". You will know if you done it right if whe your run the ERC again it will show no errors.</p>
<h3 id="assigning-footprints">Assigning Footprints</h3>
<p>We are almost done with the schematic editor, now we must assign the 3-Dimensional footprints to the symbols of the components. This will allow us to move on to the PCB editing. Footprints basically tell KiCad the exact dimensions of the real world component so that you may precisely pick where on your PCB board each component goes.
To begin selecting the footprints, press the <em>"Run Footprint Assingment Tool"</em> on the top toolbar. This will open up a window showing all the footprint libraries that KiCad has automatically installed on the left, the components in your schematic in the middle, and the applicable footprints for the chosens chematic on the right.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/footprints.png" alt="footprints"></p>
<p>As you can see in the image above, I already assigned the footprints to the symbols. Some of the components had footprints automatically selected; you do not have to edit those unless you have a specific version in mind. Footprints are usually provided by the real world component supplier. That is why there are so many different footprints for each schematic as different mnufacturers provide slightly different products. When picking a footprint, you must make sure that the version you are picking is readily available for purchase and can meet your supply needs. Senior designers will know which electronics brands and manufacturers create the best components when choosing footprints. There are many different factors when selecting footprints, and is something that requires experience to develop. For now you may simply select the footprints I selected by searching their names in the search bar.</p>
<pre><code>Tip: You can right-click any footprint and select "view selected footprint" to see how the footprint looks. You can then click the "Show 3D Viewer" on the top toolbar, or press "Alt + 3" to view the 3D rendered view of the component.
</code></pre>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/3D.png" alt="three-d"></p>
<h2 id="pcb-editor">PCB Editor</h2>
<p>With the schematic completed and the footprints assigned, we can move on to designing the PCB itself. You can move on from the schematic editor to the PCB editor by pressing the <em>"Open PCB in Board Editor"</em> on the top toolbar on the right side. Or you can simply return to the main KiCad window and select <em>"PCB Editor"</em>. <strong>Dont forget to save the schematic editor file first!</strong></p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/pcbeditorblank.png" alt="pcb"></p>
<p>When you open up the board editor you will be greeted by this screen. To import the components from the schematic we just created, you need to press the <em>"Update PCB with changes made to the schematic"</em> button on the top toolbar on the right side, or by simply pressing <em>"F8"</em> on your keyboard. This button will automatically import the components allowing you to place them all at once. This button also automatically creates a netlist as this step used to have to be done manually in earlier KiCad verisons.</p>
<pre><code>Tip: The netlist contains information regarding components, their designators, pins, and the names of any nets that connect each pin to components. Manufacturers may require this file for assembly. How to export this file, along with other files needed for PCB manufacturing, will be discussed near the end of the tutorial.
</code></pre>
<h3 id="pcb-setup">PCB Setup</h3>
<p>The <em>"Update PCB with changes made to the schematic"</em> button can be pressed at any point in the editing process so dont be afraid to go back and change the schematic if you uncover issues. Becuase of that, before you place the components its always a good idea to set up your PCB by pressing the <em>"Edit Board setup"</em> button on the top toolbar on the left.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/setup.png" alt="setup"></p>
<p>In the PCB setup editor, you can change the different layers in the PCB. You can select which layers you need for specific projects. You can edit many different aspecs and tools for the editor, most are technical while some arepurely aesthetic.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/clearance.png" alt="clearance"></p>
<p>One of the more iportant things to edit is the design rules, more specifically the constraints. These are usually set by manufacturers and can make or break the PCB design. Its always good to copy the values for each of these parameters based on your chosen PCB manufacturer's recommendations <strong>before</strong> starting PCB editing. Since this project is simply an example you can leave those as is.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/size.png" alt="size"></p>
<p>Leave most of the PCB setup as is as they are not necessary changes for this project. The only thing you must add is some <em>Pre-defined track sizes</em>. Go to the <em>"Pre-defined Sizes"</em> tab and place a 0.3mm and a 0.5mm track size using the plus sign on the button. Tracks are the equivalent of wires in PCB editing so this gives us two set sizes to work with. 0.3mm for basic components and 0.5mm for any power related component. These sizes are not standards and should not be followed in every project, they are simply common and versatile track sizes that may come in handy during later steps. Once that is completed you may click ok.<br>
<strong><em>When all your setup is complete you may now press F8, then press "Update PCB", and place your components somewhat centrally</em></strong></p>
<h3 id="arranging-footprints">Arranging Footprints</h3>
<p>When you place them down youll see they all are imported in a pile which can be a little messy. Now you can see why annotations are important for organization. You can move the components by clicking and dragging them to place where you'd like. You can also hover over the component and press <em>"M"</em> on your keyboard.</p>
<pre><code>Tip: You can hide the F.Fab and B.Fab layers by looking for them on the layer list on the right and clicking the eye symbol. These fabrication layers dont add too much information and hiding them makes the board less cluttered.
</code></pre>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/web.png" alt="web"></p>
<pre><code>Tip: If you have two monitors, or you are adept at switching through tabs, you can select the part you wish to edit on your Schematic editor by clicking it and it will be selected as well in the PCB editor. This helps a ton in more complex projects.
</code></pre>
<p>When moving them you will see a sort of web or net connecting the components. This is to show you exactly where each component is supposed to be connected to. This will show were you are supposed to route the tracks <em>(connect the wires)</em>. Try and place the components in a way that makes the webs line up to where they are supposed to be connected. Try and make it so tracks are relatively direct and do not cross with eachother, while the components are not too far spread. There are many, many, rules when it comes to component placing on a PCB; too many rules to go over in this tutorial. Many of these you will learn over time so for now just place them in a way that seems logical to you as this is just practice.</p>
<pre><code>Tip: Its good practice to start with the most crucial components then work your way down.
</code></pre>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/decent.png" alt="decent-pos"></p>
<p>As you can see I placed the components so that the tracks do not run through anything too important. The only web that runs through a component is the reference ground of <strong>J2</strong> but that is ok since we will not route the grounds in this project.</p>
<pre><code>Tip : You can press "Alt + 3" at any point in this editor to view the 3D model of your design. As you can see in the image below the components mimic the placement on the editor.
</code></pre>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/incom3d.png" alt="incomplete"></p>
<h3 id="adding-board-outline">Adding Board Outline</h3>
<p>As you can see in the 3D editor and error appears that says <em>"Board outline is missing"</em>. That is simply because we have not set the board cut out size yet. To add that, first select the <em>"Edge.Cuts"</em> layer in your layer list on the right. You will know its selected if a blue arrow appears next to the layer.</p>
<p>We will be drawing lines in this layer to designate the board cut offs. This will set the board size for manufacturing. It is good practice to go for whole number sizes. For this project I am going for a 25mmx20mm board. To bring out the measuring tool you can press <em>"Ctrl + Shift + M"</em></p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/measurements.png" alt="measurments"></p>
<pre><code>Tip: You can press the "N" button on your keyboard to chane the grid size for greater accuracy
</code></pre>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/cuts.png" alt="cuts"></p>
<p>To draw the line, select the <em>"Draw a Line"</em> tool on the right tool bar. Then draw the lines as an outline to the PCB. Feel free to move around the components so that they fit better, nothing is set in stone at this point. If you want curved edges you can use the arc tool under the line tool to create arcs on the edges.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/outline.png" alt="outline"></p>
<p>When finished, it should look something like this. The curved edges are optional so if yours are straight then that is fine.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/withboardcuts.png" alt="withcuts"></p>
<p>As you can see in the 3D viewer, The board cuts worked and KiCad now knows the shape our board will be.</p>
<h3 id="routing-the-components">Routing the Components</h3>
<p>Nice we have a rough layout formed, we can begin routing. This is usually the most tedious step that requires the most precision. However since our circuit is very simple, this process will not be too difficult.</p>
<p>To begin, I like adding a copper ground plane. This makes it so we do not have to route any reference grounds, and it makes routing regular grounds easier as well.<br>
To do this, we need to first select the bottom copper layer (<em>"B.Cu"</em> on your layer list), then click the <em>"Add filled Zone"</em> button on your right toolbar.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/bottomcopper.png" alt="bcu"></p>
<p>After pressing, this window will pop up. Select the GNDREF as that is what we want this plane to link. The clearances and widths for filled zones differ for different applications, but for this application you may simply change the clearance to 0.3mm.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/filledzone.png" alt="FILLED"></p>
<p>Once you set the various properties of the filled zone, you will be moved to drawing mode. Encompass your entire PCB in this drawing as shown in the picture above. Once the box is closed, you can press the <em>"B"</em> key on your keyboard to fill the zone. This creates the bottom copper layer and is visible in the 3D viewer.</p>
<pre><code>Tip: You can hide the blue box by pressing the "Show only zone boundaries" on the left toolbar near the bottom. This makes routing so much easier on the eyes.
</code></pre>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/111111111111111111.png" alt="grndonbtttm"></p>
<p>The square holes usually indicate grounds in the industry so you can see that all our reference grounds no longer need to be routed. This makes future routing of non-reference grounds much easier since you can just punch a hole in the board (Press <em>"V"</em> while the routing a ground). However since this design only uses reference grounds, we are finished routing the ground.</p>
<p>Next we will be routing the regular components. Its always a good rule of thumb to start at the most critical components. To start, simply press the <em>"Route Tracks"</em> button on the right toolbar or the <em>"X"</em> button on your keyboard. Click the portion of the component that the route needs to attach to, then trace the track towards the component it should connect to. You can always delete the tracks by selecting them and clicking <em>backspace</em> or <em>delete</em> or undo with<br>
<em>ctrl + z</em><br>
<em>Don't forget, 0.3mm for non-power related components!</em></p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/routing.png" alt="routingp1"></p>
<p>Its good practice to instantly move away from the component as you place the tracks. This makes more space for other tracks as the more space between tracks the less likely you'll experience an error later on. Just follow the net as to where to connect the tracks.<br>
<em>Don't forget, 0.5mm for power related components!</em></p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/finishedrouting.png" alt="fr"></p>
<p>When you finished your routing your board will look similar to this. Since the circuit is so simple, none of the tracks are near eachother so we didn't have to use any advanced techniques. Heres a simple tip, When routing a component you can click <em>"V"</em>. This drops the track one layer so that you can go underneath existing tracks. This is very important for mor complex designs. You can also see the tracks in the 3D viewer.</p>
<pre><code>Tip: Move the silkscreen labels (J1, J2, Q1, ..etc.) out of the way of the tracks. These will be printed on the board and may be illegible if placed over a track.
</code></pre>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/3droute.png" alt="3droute"></p>
<h3 id="running-a-design-rules-check">Running a Design Rules Check</h3>
<p>Now that the routing is finished, you can run a <em>"Design Rules Check"</em>. This is similar to the electrical rules check of the schematic editor. It makes sure you didnt forget anything too obvious and checks your design against the contraints you set in the setup.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/11drc.png" alt="drc"></p>
<p>You can find it on the top toolbar near the right side. Since we did not set any constraints at the start, and our circuit is simple, the check should come out like this with no errors.</p>
<h2 id="exporting-gerbers-and-other-key-files">Exporting Gerbers and Other Key Files</h2>
<p>Once your DRC has come back with no errors or unconnected items, your PCB is basically ready for assembly! We now need to export the files to send to the PCB manufacturers. These files are usually the Gerber files, the drill files, the BOM, and the netlist. Some manufacturers require more and some require less but knowing how to export these files is important going forward.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/gerb.png" alt="gerb"></p>
<p>Simply go to <em>File</em> then <em>Fabrication Outputs</em> and select the files you need. Drill and Gerber files are the most critical files so start with those. I always do the drill files before the Gerber files</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/drill.png" alt="drill"></p>
<p>After selecting <em>"Drill Files"</em> in <em>Fabrication Outputs</em> you will be shown this screen. In this you can go into the specific of how you want this file created but we will not go into the details in this tutorial. You may research each of these options on your own but, for simplicity sake you may just use the defaults when Generating the files. Select the folder you want the files to be generated in and click the <em>"Generate Drill File"</em> button</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/gerbgerb.png" alt="gerbcreate"></p>
<p>Once the drill files are generated, you can go and generate Gerber files. Same process as the Drill files, just select the <em>"Gerber Files"</em> in <em>Fabrication Outputs</em>. In this window you will be able to pick which layers you want generated in the file as well as various other options. Again we will not go into the specifics, you can find resources on it all over the internet. For this practice simply input the target folder of these files and click <em>"Plot"</em>.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/BOM.png" alt="bom"></p>
<p>The bill of materials is a little different. You can just go to <em>Fabrication Outputs</em> and download your BOM from their but we have not editted it yet. To do so you must go back to the <em>Schematic Editor</em> and click the BOM button ont he top toolbar on the right side. This will open up the BOM editor where you can manually add the specific components you need for your device. When you finish editing it, you may press <em>Export</em> to donwload the BOM file to the chosen folder.</p>
<h2 id="viewing-your-gerber-files">Viewing your Gerber files</h2>
<p>KiCad has a built in Gerber viewer called <strong><em>Gerber Viewer</em></strong></p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/Plaingerb.png" alt="plaingerb"></p>
<p>When opening it you will be greeted with this blank workspace. In order to open the Gerber files you just created you can go to <em>File</em> then <em>Open Gerber Plot Files</em> then go to the folder you selected they would be generated in and select all the files that end in <em>.gbr</em></p>
<pre><code>Tip: you can select multiple files by clicking the top Gerber file in the list then holding shift and clicking the bottom Gerber file.
</code></pre>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/No drill.png" alt="nodrill"></p>
<p>When you load it up it should look like this. This shows what the manufacturer would recieve to make your PCB. This is when you should do all your final checks to see any mistakes.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/No drill2.png" alt="yes drill"></p>
<p>After loading up the Gerber files now you can go to <em>File</em> then <em>"Open Excelon Drill Files"</em> and select the drill file you just generated. You should see another layer get added as seen in the picture above. You can then start hiding layers to see every part of what you designed.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/no drill3.png" alt="yesyesdrill"></p>
<p>Just click the check boxs on the right side layer list to hide the layers. This way you can double check every inch of your design. Once your satisfied with your design, you can send these files to a PCB manufacturer and have them made. Congratulations! With that you know all the basics of KiCad and PCB manufacting.</p>
<blockquote>
<p>The guide isn't done just yet! Keep scrolling for some extra tips!</p>
</blockquote>
<h1 id="miscellaneous-tips">Miscellaneous Tips</h1>
<h2 id="adding-symbol-and-footprint-libraries">Adding Symbol and Footprint Libraries</h2>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/LIBRARIES.png" alt="lib"></p>
<p>To edit your symbol or footprint libraries, you can got to <em>Preferences</em> then select which you want to edit. The process is the same for both and are interchangeable. For this example, let us try adding a footprint library, but the steps are the same for symbols.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/libwindow.png" alt="libwin"></p>
<p>To begin you need a library to upload to KiCad. You can find various kinds online, I'll leave it up to you as to waht you want to add to your KiCad. In this example I will be adding the <em>Sparkfun-Capacitors</em> Library. As you can see I already have other Sparkfun libraries installed.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/addinglib.png" alt="alib"></p>
<p>Once you have the files you can click the plus button, then the folder symbol in the empty row that was created. The navigate to the file you want to add. You can then assign a name to it and click ok. If the format of the files was right, you should be able to use your new symbols in the schemati editor.</p>
<p>Dont forget to do the same for the footprint library or you wont be able to find the right footprints for your symbols!</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/cap.png" alt="capa"></p>
<h2 id="adding-3d-models">Adding 3D models</h2>
<p>Some footprints in the library are incomplete and do not have a 3D model. This is ok most of the time since it is not a requirement for assembly. You can design the entire PCB without using the 3D viewer; however, I think it helps you make informed decisions on components sizes and really helps the design process. If you want to add a 3D model to an incomplete footprint heres how!</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/badfootprint.png" alt="BAD"></p>
<p>As you can see in the example, the footprint works and is correct but the 3D view is missing minus the pinholes. To add a working 3D model for this, we need to find it online. Usually manufacturers will provide these models and are usually relatively easy to find.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/partno.png" alt="partnum"></p>
<p>To do this you need to first select the part in the <em>Schematic Editor</em> then double click it and look for the part number. In the image above, the part number is the numbers higlighted. Usually they are listed at the end of the footprint file name. When this number is googled, it leads to the manufacturers website. The site has a downloads section with the exact CAD we need. Download the STP file.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/PARTSITE.png" alt="site"></p>
<p>Once you have the file place it somewhere you can easily find it, I moved mine to the project file.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/Screenshot (25).png" alt="project"></p>
<p>Once you have the file and you know where it is, you now need to double click on the footprint in the <strong>PCB Editor</strong> and this window should show up. Select the <em>3D Models</em> section and you should see the broken model.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/almost.png" alt="deadmodel"></p>
<p>You can delete the broken model with the trashcan icon under the list of models. You can then use the folder icon to select the file you just downloaded. It should appear something like this.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/done.png" alt="done"></p>
<p>The model may need some scaling and offsetting to make it fit right. This particular model needed to be offset by 1mm in the Y and Z directions. This part may take some trial and error but when you get it right it will look perfect.</p>
<p><img src="file:https:///c:/Users/jvillamejor/Documents/KiCad/Projects/Tutorial/complete.png" alt="completed"></p>
<p>After clicking <em>Ok</em> your footprint will have a working 3D model and will look right at place in your design!</p>
<h2 id="creating-custom-symbols">Creating Custom Symbols</h2>
<h2 id="creating-custom-footprints">Creating Custom Footprints</h2>
</body>
</html>