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