Werner's Miscellanea
Sign in or create your account | Project List | Help
Werner's Miscellanea Git Source Tree
Root/
Source at commit 2fc3b976d2148e6adca59392fab5e40e2bb3ea87 created 11 years 8 months ago. By Werner Almesberger, fisl2012/: add kicad cvpcb diagram | |
---|---|
1 | \documentclass[12pt,trans]{beamer} |
2 | \usepackage{color} |
3 | \usepackage{url} |
4 | \usepackage{colortbl} |
5 | %\usepackage{soul} |
6 | %\usepackage{verbatim} |
7 | \usefonttheme{structurebold} |
8 | \setbeamertemplate{navigation symbols}{} |
9 | \setbeamertemplate{items}[ball] |
10 | %\setbeamersize{sidebar width left=-5mm} |
11 | \title{\Large Making Hardware \\ with KiCad and Friends} |
12 | \author{Werner Almesberger \\\url{werner@almesberger.net}} |
13 | \date{July 25, 2012} |
14 | |
15 | %\setul{}{1.5pt} |
16 | |
17 | \begin{document} |
18 | |
19 | \begin{frame} |
20 | \titlepage |
21 | \end{frame} |
22 | |
23 | % --- Overview ---------------------------------------------------------------- |
24 | |
25 | \begin{frame}{Overview} |
26 | \begin{itemize} |
27 | \item KiCad introduction |
28 | \item Qi-Hardware workflow |
29 | \item $\dots$ and tools |
30 | \end{itemize} |
31 | |
32 | {\small \url{downloads.qi-hardware.com/people/werner/fisl13.pdf}} |
33 | \end{frame} |
34 | |
35 | % --- KiCad Introduction ------------------------------------------------------ |
36 | |
37 | \begin{frame}{KiCad} |
38 | \begin{itemize} |
39 | \item Complete EDA solution |
40 | \item Text files $\rightarrow$ extensible |
41 | \item Free Software: GPL, LGPL |
42 | \item Development team by Jean-Pierre Charras, \\ |
43 | Dick Hollenbeck, and many others |
44 | \item C++, wxWidgets |
45 | \item Multi-platform: Linux, Windows, Mac |
46 | \end{itemize} |
47 | |
48 | \vskip5mm |
49 | {\small \url{www.kicad-pcb.org}} |
50 | \end{frame} |
51 | |
52 | % --- Schematics -------------------------------------------------------------- |
53 | |
54 | \begin{frame}{KiCad: Schematics} |
55 | \begin{center} |
56 | \includegraphics[width=1.0\textwidth]{schem.pdf} |
57 | \end{center} |
58 | \end{frame} |
59 | |
60 | % --- Footprints -------------------------------------------------------------- |
61 | |
62 | \begin{frame}{KiCad: Footprints} |
63 | \begin{center} |
64 | \includegraphics[width=1.0\textwidth]{assoc.pdf} |
65 | \end{center} |
66 | \end{frame} |
67 | |
68 | % --- Layout ------------------------------------------------------------------ |
69 | |
70 | \begin{frame}{KiCad: Layout} |
71 | cvpcb + pcbnew + module editor -> gerbers (gerbv) |
72 | |
73 | SCREENSHOTS |
74 | \end{frame} |
75 | |
76 | % --- Qi-Hardware ------------------------------------------------------------- |
77 | |
78 | \begin{frame}{Qi-Hardware} |
79 | Structure and goals: |
80 | \begin{itemize} |
81 | \item Collection of loosely connected projects |
82 | \item Informal gathering of like-minded developers |
83 | \item Copyleft Hardware with Free Software |
84 | \item Development and manufacturing |
85 | \item Toolmaking |
86 | \end{itemize} |
87 | |
88 | Products: |
89 | \begin{itemize} |
90 | \item Ben NanoNote (Handheld computer) |
91 | \item Ben-WPAN (IEEE 802.15.4 wireless) |
92 | \item Milkymist One (FPGA-based Video synthesizer) |
93 | \end{itemize} |
94 | |
95 | \vskip2mm |
96 | {\small \url{www.qi-hardware.com}} |
97 | \end{frame} |
98 | |
99 | % --- Collaborative Design ---------------------------------------------------- |
100 | |
101 | \begin{frame}{Collaborative Design} |
102 | \begin{itemize} |
103 | \item Follow other people's work |
104 | \item Review other people's work (projects and libraries) |
105 | \item Shared design information |
106 | \item Shared version control (git) |
107 | \item Shared procedures and rules |
108 | \end{itemize} |
109 | \end{frame} |
110 | |
111 | % --- KiCad Limitations ------------------------------------------------------- |
112 | |
113 | \begin{frame}{KiCad Limitations} |
114 | \begin{itemize} |
115 | \item No integrated version control system support |
116 | \item Integration leads to weak peripheral tools |
117 | \begin{itemize} |
118 | \item Footprint editor |
119 | \item Component catalog |
120 | \item Module catalog |
121 | \end{itemize} |
122 | \item No scripting (coming) |
123 | \item Scattered libraries CHECK |
124 | \end{itemize} |
125 | \end{frame} |
126 | |
127 | % --- Qi-Wardware Adaptation -------------------------------------------------- |
128 | |
129 | \begin{frame}{Qi-Hardware Adaptation} |
130 | \begin{itemize} |
131 | \item Command-line-oriented use |
132 | \item Extend KiCad with patches |
133 | \item External scripts/programs |
134 | \item Own component and module libraries with common rules |
135 | \end{itemize} |
136 | \end{frame} |
137 | |
138 | % --- Libraries --------------------------------------------------------------- |
139 | |
140 | \begin{frame}{Libraries} |
141 | Goals: |
142 | \begin{itemize} |
143 | \item Consistent naming |
144 | \item Known origin of design information |
145 | \item Documented development process \\ |
146 | E.g., IPC-7351 |
147 | \end{itemize} |
148 | |
149 | To do: |
150 | \begin{itemize} |
151 | \item Improve organization |
152 | \item Better integrate background information |
153 | \item Reviews ! |
154 | \end{itemize} |
155 | |
156 | \vskip4mm |
157 | % URL http://projects.qi-hardware.com/index.php/p/kicad-libs/source/tree/master/components/ |
158 | {\small \url{tiny.cc/p/kicad-libs-components}} \\ |
159 | % URL http://projects.qi-hardware.com/index.php/p/kicad-libs/source/tree/master/modules/ |
160 | {\small \url{tiny.cc/p/kicad-libs-modules}} |
161 | \end{frame} |
162 | |
163 | % --- What goes into git ------------------------------------------------------ |
164 | |
165 | \begin{frame}{What goes into git} |
166 | KiCad: |
167 | \begin{itemize} |
168 | \item Project file: {\tt {\em project}.pro} |
169 | \item Schematics: {\tt {\em project}.sch}, {\tt {\em subsheet}.sch} |
170 | \item Footprint mapping: {\tt {\em project}.cmp} |
171 | \item Layout: {\tt {\em project}.brd} |
172 | \end{itemize} |
173 | |
174 | Qi-Hardware: |
175 | \begin{itemize} |
176 | \item Makefile ({\tt sch}, {\tt brd}, {\tt fab}, {\tt clean}) |
177 | \item Bookshelf (for dsv) |
178 | \item Project-local libraries |
179 | \end{itemize} |
180 | \end{frame} |
181 | |
182 | % --- What doesn't ------------------------------------------------------------ |
183 | |
184 | \begin{frame}{What doesn't} |
185 | \begin{itemize} |
186 | \item Netlist: {\tt {\em project}.net} \\ |
187 | Generated with eeschema from {\tt *.sch} and {\tt {\em project}.cmp} |
188 | \item Caches and backups: {\tt {\em project}.bak}, {\tt {\em project}.000}, |
189 | {\tt {\em project}-cache.lib} |
190 | \item Postscript: {\tt {\em project}-{\em sheet}.ps}, |
191 | {\tt {\em project}-{\em layer}.ps} |
192 | \item Gerbers: {\tt {\em project}-{\em layer}.g{\em ??}} |
193 | \item BOMs: {\tt {\em project}.lst}, {\tt {\em project}.cvs} |
194 | \item Fab outputs: {\tt {\em project}.drl}, {\tt {\em project}.pos} |
195 | \item And so on: {\tt {\em project}.cad}, {\tt {\em project}.erc}, |
196 | {\tt {\em project}.dsn}, {\tt {\em project}.rpt}, |
197 | {\tt {\em project}.wrl}, $\ldots$ |
198 | \end{itemize} |
199 | \end{frame} |
200 | |
201 | % --- Project File ------------------------------------------------------------ |
202 | |
203 | \begin{frame}{Project File ({\tt {\em project}.pro})} |
204 | |
205 | Contains: |
206 | \begin{itemize} |
207 | \item Project settings |
208 | \item Lists of libraries |
209 | \end{itemize} |
210 | |
211 | Issues: |
212 | \begin{itemize} |
213 | \item Local absolute paths |
214 | \item Default libraries |
215 | \item Timestamps $\rightarrow$ commit noise |
216 | \end{itemize} |
217 | |
218 | Solution: |
219 | \begin{itemize} |
220 | \item Maintain manually |
221 | \item {\tt purge} script: \\ |
222 | % URL http://projects.qi-hw.com/index.phpp/wernermisc/source/tree/master/bin/purge |
223 | {\small \url{tiny.cc/wernermisc-bin-purge}} |
224 | \end{itemize} |
225 | \end{frame} |
226 | |
227 | % --- Makefile ---------------------------------------------------------------- |
228 | |
229 | \begin{frame}[fragile]{Makefile} |
230 | Objectives: |
231 | \begin{itemize} |
232 | \item Convenience shortcuts |
233 | \item Combine tools |
234 | \item Share common procedures |
235 | \item Avoid mistakes |
236 | \end{itemize} |
237 | |
238 | {\small |
239 | \begin{verbatim} |
240 | front: |
241 | pcbnew --plot=ps --plot-fill-all-zones \ |
242 | --layers=Front --plot-mirror \ |
243 | $(PROJECT).brd |
244 | lpr $(PROJECT)-Front.ps |
245 | \end{verbatim} |
246 | } |
247 | \end{frame} |
248 | |
249 | % --- KiCad Command-Line Patches ---------------------------------------------- |
250 | |
251 | \begin{frame}{KiCad Command-Line Patches} |
252 | Original hack by Werner Almesberger, clean rewrite by Wolfgang Spraul. |
253 | \begin{itemize} |
254 | \item Idea: command-line access to main output functions |
255 | \item eeschema |
256 | \begin{itemize} |
257 | \item Visualization: Postscript (and SVG, DXF) |
258 | \item BOM $\rightarrow$ BOOM |
259 | \item Netlist, ERC |
260 | \end{itemize} |
261 | \item pcbnew |
262 | \begin{itemize} |
263 | \item Fabrication: Gerbers, drill (Excellon), component positions |
264 | \item Visualization and DIY: Postscript |
265 | \item Attributes: mirror, size, origin, fill zones, $\ldots$ |
266 | \end{itemize} |
267 | \end{itemize} |
268 | |
269 | \vskip5mm |
270 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/kicad-patches/ |
271 | {\small \url{tiny.cc/eda-tools-kicad-patches}} |
272 | \end{frame} |
273 | |
274 | % --- Data Sheet Viewer (dsv) ------------------------------------------------- |
275 | |
276 | \begin{frame}[fragile]{Data Sheet Viewer (dsv)} |
277 | \begin{itemize} |
278 | \item Bookshelf: name and aliases $\rightarrow$ PDF or ZIP with PDF |
279 | \item Download (wget) to local cache |
280 | \item Hierarchical lookup by name or alias |
281 | \item Example: \\ |
282 | {\tt dsv avr} $\rightarrow$ ATtiny87 ({\tt doc8265.pdf}) |
283 | $\rightarrow$ xpdf |
284 | \end{itemize} |
285 | |
286 | \vskip5mm |
287 | Bookshelf example: |
288 | |
289 | \begin{verbatim} |
290 | N: attiny87 |
291 | A: attiny167 |
292 | A: avr |
293 | D: http://www.atmel.com/Images/doc8265.pdf |
294 | \end{verbatim} |
295 | \end{frame} |
296 | |
297 | % --- Data Sheet Viewer (dsv) ------------------------------------------------- |
298 | |
299 | \begin{frame}{dsv Motivation} |
300 | \begin{itemize} |
301 | \item Make sure everybody uses the same data sheet |
302 | \begin{itemize} |
303 | \item Same component |
304 | \item Same manufacturer |
305 | \item Same data sheet revision |
306 | \end{itemize} |
307 | \item Copyright: can't just check in PDF |
308 | \item Industrial pragmatism: private mail or ``internal'' repository |
309 | \item Qi-Hardware: send {\tt BOOKSHELF} around |
310 | \end{itemize} |
311 | |
312 | \vskip10mm |
313 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/dsv/ |
314 | {\small \url{tiny.cc/eda-tools-dsv}} |
315 | \end{frame} |
316 | |
317 | % --- Schematics Symbol Catalog ---------------------------------------------- |
318 | |
319 | \begin{frame}{Schematics Symbol Catalog} |
320 | \begin{itemize} |
321 | \item For selection, review |
322 | \item Hierarchical order with alphabetical index |
323 | \item Short descriptions and data sheet links |
324 | \item Added value: indicate pin types |
325 | \item To do: connect to dsv |
326 | \end{itemize} |
327 | |
328 | \begin{center} |
329 | \includegraphics[width=1.0\textwidth]{cat-comp.pdf} |
330 | \end{center} |
331 | \end{frame} |
332 | |
333 | % --- Schematics History ------------------------------------------------------ |
334 | |
335 | \begin{frame}{Schematics History} |
336 | \begin{itemize} |
337 | \item Schematics revision history |
338 | \item {\tt git diff} produces gibberish |
339 | \end{itemize} |
340 | |
341 | \begin{center} |
342 | \includegraphics[height=4.5cm]{../fisl2011/schhist.png} |
343 | \qquad |
344 | \includegraphics[height=4cm]{../fisl2011/USB.png} |
345 | \end{center} |
346 | |
347 | {\small \url{projects.qi-hardware.com/schhist/}} |
348 | \end{frame} |
349 | |
350 | % --- Schematics History (cont'd) --------------------------------------------- |
351 | |
352 | \begin{frame}{Schematics History (cont'd)} |
353 | How it works: |
354 | \begin{itemize} |
355 | \item Walk git revision history |
356 | \item Check out project whenever schematics change |
357 | \item Run eeschema to make Postscript |
358 | \item Convert to PNG (find diffs, with highlighting) and PDF |
359 | \item Wrap in HTML |
360 | \end{itemize} |
361 | |
362 | Issues: |
363 | \begin{itemize} |
364 | \item Nasty shell script |
365 | \item Resource-hungry (partial caching) |
366 | \item Large schematics get confusing |
367 | \item Projects spanning multiple repositories |
368 | \end{itemize} |
369 | |
370 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/schhist/ |
371 | {\small \url{tiny.cc/eda-tools-schhist}} |
372 | \end{frame} |
373 | |
374 | % --- Footprint Catalog ------------------------------------------------------ |
375 | |
376 | \begin{frame}{Footprint Catalog} |
377 | \begin{itemize} |
378 | \item Like schematics symbol catalog, but for footprints |
379 | \item Added value: measurements, pad types |
380 | \end{itemize} |
381 | |
382 | \begin{center} |
383 | \includegraphics[width=1.0\textwidth]{cat-mod.pdf} |
384 | \end{center} |
385 | |
386 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/genkicat/ |
387 | {\small \url{tiny.cc/eda-tools-genkicat}} |
388 | \end{frame} |
389 | |
390 | % --- Fped -------------------------------------------------------------------- |
391 | |
392 | \begin{frame}{Footprint Editor (fped)} |
393 | \begin{center} |
394 | \includegraphics[height=45mm]{../fisl2011/fped.png} |
395 | \end{center} |
396 | |
397 | \begin{itemize} |
398 | \item Fully parametric |
399 | \item Automated repetition (loops, tables, sub-frames) |
400 | \item GUI or text-based |
401 | \item Automatic measurements |
402 | \item Output: KiCad, Postscript, Gnuplot |
403 | \end{itemize} |
404 | \end{frame} |
405 | |
406 | % --- Layout History ---------------------------------------------------------- |
407 | |
408 | \begin{frame}{Layout History} |
409 | \begin{itemize} |
410 | \item Layout revision history |
411 | \item To do $\ldots$ |
412 | \end{itemize} |
413 | |
414 | \vskip5cm |
415 | %% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/brdhist/ |
416 | % {\small \url{tiny.cc/eda-tools-brdhist}} |
417 | \end{frame} |
418 | |
419 | % --- Gerber Renderer --------------------------------------------------------- |
420 | |
421 | \begin{frame}{Gerber Renderer (prettygerbv)} |
422 | \begin{columns} |
423 | \begin{column}[l]{8.5cm} |
424 | \begin{itemize} |
425 | \item ``Photorealistic'' view of PCB |
426 | \item Combines Gerber (traces, drawings) and Excellon (holes) |
427 | \item Easy to see issues with solder paste, silk screen, |
428 | solder mask, $\ldots$ |
429 | \item Uses gerbv for rendering |
430 | \end{itemize} |
431 | \vskip10mm |
432 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/fab/prettygerbv/ |
433 | {\small \url{tiny.cc/p/eda-tools-fab-prettygerbv}} |
434 | % MORE ?? |
435 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/fab/ |
436 | {\small \url{tiny.cc/p/eda-tools-fab}} |
437 | \end{column} |
438 | |
439 | \begin{column}[r]{4cm} |
440 | \includegraphics[width=3cm]{../fisl2011/atusb-front.png} |
441 | \end{column} |
442 | \end{columns} |
443 | |
444 | \end{frame} |
445 | |
446 | % --- BOM Processor ----------------------------------------------------------- |
447 | |
448 | \begin{frame}{BOM Processor (BOOM)} |
449 | \begin{itemize} |
450 | \item BOM $\rightarrow$ select components $\rightarrow$ find supplier |
451 | $\rightarrow$ \\ |
452 | shopping list |
453 | \item Work in progress. Rewrite from Perl to C |
454 | \begin{itemize} |
455 | \item Faster |
456 | \item Less headache with data structures |
457 | \item Better parsing |
458 | \end{itemize} |
459 | \item Snag: Digi-Key spider no longer works |
460 | \item Future: help with component selection |
461 | \end{itemize} |
462 | |
463 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/b2/ |
464 | {\small \url{tiny.cc/p/eda-tools-b2}} |
465 | \end{frame} |
466 | |
467 | % --- BOOM Data Flow ---------------------------------------------------------- |
468 | |
469 | \begin{frame}{BOOM Data Flow} |
470 | DRAWING |
471 | \end{frame} |
472 | |
473 | % --- Schematics Design Rules ------------------------------------------------- |
474 | |
475 | \begin{frame}{Schematics Design Rules} |
476 | ... |
477 | |
478 | {\small \url{en.qi-hardware.com/wiki/Rules_on_Editing_Schematics}} |
479 | \end{frame} |
480 | |
481 | % --- Qi-Hardware Workflow ---------------------------------------------------- |
482 | |
483 | \begin{frame}{Qi-Hardware Workflow} |
484 | DIAGRAM |
485 | \end{frame} |
486 | |
487 | % --- Conclusion -------------------------------------------------------------- |
488 | |
489 | \begin{frame}{Conclusion} |
490 | Experience this far: |
491 | \begin{itemize} |
492 | \item KiCad is a good basis for collaborative projects |
493 | \item Open design allows extension with scripts |
494 | \item Workflow is complex and needs careful consideration |
495 | \end{itemize} |
496 | |
497 | To do: |
498 | \begin{itemize} |
499 | \item Spread the word |
500 | \item Unify meta-data (bookshelf, etc.) |
501 | \item Improve quality of libraries |
502 | \item Integrate patches into mainline KiCad |
503 | \item Finish BOOM and write brdhist |
504 | \end{itemize} |
505 | |
506 | \vskip2mm |
507 | {\small \url{downloads.qi-hardware.com/people/werner/fisl13.pdf}} |
508 | \end{frame} |
509 | |
510 | \end{document} |
511 |
Branches:
master