Werner's Miscellanea
Sign in or create your account | Project List | Help
Werner's Miscellanea Git Source Tree
Root/
| 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 27, 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 Tools to improve KiCad |
| 30 | \item Workflow overview |
| 31 | \end{itemize} |
| 32 | \vskip5mm |
| 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 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 | \item Text files $\rightarrow$ extensible |
| 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-Hardware Adaptation -------------------------------------------------- |
| 129 | |
| 130 | \begin{frame}{Qi-Hardware Adaptation} |
| 131 | \begin{itemize} |
| 132 | \item Keep things simple: only Linux |
| 133 | \item Command-line-oriented use |
| 134 | \item Extend KiCad with patches |
| 135 | \item External scripts/programs |
| 136 | \item Own component and module libraries with common rules |
| 137 | \end{itemize} |
| 138 | \end{frame} |
| 139 | |
| 140 | % --- Libraries --------------------------------------------------------------- |
| 141 | |
| 142 | \begin{frame}{Libraries} |
| 143 | Goals: |
| 144 | \begin{itemize} |
| 145 | \item Consistent naming |
| 146 | \item Known origin of design information \\ |
| 147 | E.g., IPC-7351 |
| 148 | \item Documented development process |
| 149 | \end{itemize} |
| 150 | |
| 151 | To do: |
| 152 | \begin{itemize} |
| 153 | \item Improve organization |
| 154 | \item Better integrate background information |
| 155 | \item Reviews ! |
| 156 | \end{itemize} |
| 157 | |
| 158 | \vskip4mm |
| 159 | % URL http://projects.qi-hardware.com/index.php/p/kicad-libs/source/tree/master/components/ |
| 160 | {\small \url{tiny.cc/kicad-libs-components}} \\ |
| 161 | % URL http://projects.qi-hardware.com/index.php/p/kicad-libs/source/tree/master/modules/ |
| 162 | {\small \url{tiny.cc/kicad-libs-modules}} |
| 163 | \end{frame} |
| 164 | |
| 165 | % --- What goes into git ------------------------------------------------------ |
| 166 | |
| 167 | \begin{frame}{What goes into git} |
| 168 | KiCad: |
| 169 | \begin{itemize} |
| 170 | \item Project file: {\tt {\em project}.{\color{red}pro}} |
| 171 | \item Schematics: {\tt {\em project}.{\color{red}sch}}, |
| 172 | {\tt {\em subsheet}.{\color{red}sch}} |
| 173 | \item Footprint mapping: {\tt {\em project}.{\color{red}cmp}} |
| 174 | \item Layout: {\tt {\em project}.{\color{red}brd}} |
| 175 | \end{itemize} |
| 176 | |
| 177 | Qi-Hardware: |
| 178 | \begin{itemize} |
| 179 | \item Makefile ({\tt sch}, {\tt brd}, {\tt fab}, {\tt clean}) |
| 180 | \item Bookshelf (for dsv) |
| 181 | \item Project-local libraries |
| 182 | \end{itemize} |
| 183 | \end{frame} |
| 184 | |
| 185 | % --- What doesn't ------------------------------------------------------------ |
| 186 | |
| 187 | \begin{frame}{What doesn't} |
| 188 | \begin{itemize} |
| 189 | \item Netlist: {\tt {\em project}.{\color{red}net}} \\ |
| 190 | Generated with eeschema from |
| 191 | {\tt *.{\color{red}sch}} |
| 192 | and |
| 193 | {\tt {\em project}.{\color{red}cmp}} |
| 194 | \item Caches and backups: |
| 195 | {\tt {\em sheet}.{\color{red}bak}}, |
| 196 | {\tt {\em project}.{\color{red}000}}, |
| 197 | {\tt {\em project}{\color{red}-cache.lib}} |
| 198 | \item Postscript: |
| 199 | {\tt {\em project}-{\em sheet}.{\color{red}ps}}, |
| 200 | {\tt {\em project}-{\em layer}.{\color{red}ps}} |
| 201 | \item Gerbers: |
| 202 | {\tt {\em project}-{\em layer}.{\color{red}g{\em ??}}} |
| 203 | \item BOMs: {\tt {\em project}.{\color{red}lst}}, |
| 204 | {\tt {\em project}.{\color{red}cvs}} |
| 205 | \item Fab outputs: {\tt {\em project}.{\color{red}drl}}, |
| 206 | {\tt {\em project}.{\color{red}pos}} |
| 207 | \item And so on: {\tt {\em project}.{\color{red}cad}}, |
| 208 | {\tt {\em project}.{\color{red}erc}}, |
| 209 | {\tt {\em project}.{\color{red}dsn}}, |
| 210 | {\tt {\em project}.{\color{red}rpt}}, |
| 211 | {\tt {\em project}.{\color{red}wrl}}, $\ldots$ |
| 212 | \end{itemize} |
| 213 | \end{frame} |
| 214 | |
| 215 | % --- Project File ------------------------------------------------------------ |
| 216 | |
| 217 | \begin{frame}{Project File ({\tt {\em project}.pro})} |
| 218 | |
| 219 | Contains: |
| 220 | \begin{itemize} |
| 221 | \item Project settings |
| 222 | \item Lists of libraries |
| 223 | \end{itemize} |
| 224 | |
| 225 | Issues: |
| 226 | \begin{itemize} |
| 227 | \item Local absolute paths |
| 228 | \item Default libraries |
| 229 | \item Timestamps $\rightarrow$ commit noise |
| 230 | \end{itemize} |
| 231 | |
| 232 | Solution: |
| 233 | \begin{itemize} |
| 234 | \item Maintain paths manually |
| 235 | \item {\tt purge} script: \\ |
| 236 | % URL http://projects.qi-hw.com/index.phpp/wernermisc/source/tree/master/bin/purge |
| 237 | {\small \url{tiny.cc/wernermisc-bin-purge}} |
| 238 | \end{itemize} |
| 239 | \end{frame} |
| 240 | |
| 241 | % --- Makefile ---------------------------------------------------------------- |
| 242 | |
| 243 | \begin{frame}[fragile]{Makefile} |
| 244 | Objectives: |
| 245 | \begin{itemize} |
| 246 | \item Convenience shortcuts |
| 247 | \item Combine tools |
| 248 | \item Share common procedures |
| 249 | \item Avoid mistakes |
| 250 | \end{itemize} |
| 251 | |
| 252 | {\small |
| 253 | \begin{verbatim} |
| 254 | front: |
| 255 | pcbnew --plot=ps --plot-fill-all-zones \ |
| 256 | --layers=Front --plot-mirror \ |
| 257 | $(PROJECT).brd |
| 258 | lpr $(PROJECT)-Front.ps |
| 259 | \end{verbatim} |
| 260 | } |
| 261 | \end{frame} |
| 262 | |
| 263 | % --- KiCad Command-Line Patches ---------------------------------------------- |
| 264 | |
| 265 | \begin{frame}{KiCad Command-Line Patches} |
| 266 | Original hack by Werner Almesberger, clean rewrite by Wolfgang Spraul, |
| 267 | soon rewrite for scripting. |
| 268 | \begin{itemize} |
| 269 | \item Idea: command-line access to main output functions |
| 270 | \item eeschema |
| 271 | \begin{itemize} |
| 272 | \item Visualization: Postscript (and SVG, DXF) |
| 273 | \item BOM $\rightarrow$ BOOM |
| 274 | \item Netlist, ERC |
| 275 | \end{itemize} |
| 276 | \item pcbnew |
| 277 | \begin{itemize} |
| 278 | \item Fabrication: Gerbers, drill (Excellon), component positions |
| 279 | \item Visualization and DIY: Postscript |
| 280 | \item Attributes: mirror, size, origin, fill zones, $\ldots$ |
| 281 | \end{itemize} |
| 282 | \end{itemize} |
| 283 | |
| 284 | \vskip5mm |
| 285 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/kicad-patches/ |
| 286 | {\small \url{tiny.cc/eda-tools-kicad-patches}} |
| 287 | \end{frame} |
| 288 | |
| 289 | % --- Data Sheet Viewer (dsv) ------------------------------------------------- |
| 290 | |
| 291 | \begin{frame}[fragile]{Data Sheet Viewer (dsv)} |
| 292 | \begin{itemize} |
| 293 | \item Bookshelf: name and aliases $\rightarrow$ PDF or ZIP with PDF |
| 294 | \item Download (wget) to local cache |
| 295 | \item Hierarchical lookup by name or alias |
| 296 | \item Example: \\ |
| 297 | {\tt dsv avr} $\rightarrow$ ATtiny87 ({\tt doc8265.pdf}) |
| 298 | $\rightarrow$ xpdf |
| 299 | \end{itemize} |
| 300 | |
| 301 | \vskip5mm |
| 302 | Bookshelf example: |
| 303 | |
| 304 | \begin{verbatim} |
| 305 | N: attiny87 |
| 306 | A: attiny167 |
| 307 | A: avr |
| 308 | D: http://www.atmel.com/Images/doc8265.pdf |
| 309 | \end{verbatim} |
| 310 | \end{frame} |
| 311 | |
| 312 | % --- Data Sheet Viewer (dsv) ------------------------------------------------- |
| 313 | |
| 314 | \begin{frame}{dsv Motivation} |
| 315 | \begin{itemize} |
| 316 | \item Make sure everybody uses the same data sheet |
| 317 | \begin{itemize} |
| 318 | \item Same component |
| 319 | \item Same manufacturer |
| 320 | \item Same data sheet revision |
| 321 | \end{itemize} |
| 322 | \item Copyright: can't just check in PDF |
| 323 | \item Industrial pragmatism: private mail or ``internal'' repository |
| 324 | \item Qi-Hardware: share {\tt BOOKSHELF} |
| 325 | \end{itemize} |
| 326 | |
| 327 | \vskip10mm |
| 328 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/dsv/ |
| 329 | {\small \url{tiny.cc/eda-tools-dsv}} |
| 330 | \end{frame} |
| 331 | |
| 332 | % --- Schematics Symbol Catalog ---------------------------------------------- |
| 333 | |
| 334 | \begin{frame}{Schematics Symbol Catalog} |
| 335 | \begin{itemize} |
| 336 | \item For selection, review |
| 337 | \item Hierarchical order with alphabetical index |
| 338 | \item Short descriptions and data sheet links \\ |
| 339 | To do: connect to dsv |
| 340 | \item Added value: indicate pin types |
| 341 | \end{itemize} |
| 342 | |
| 343 | \begin{center} |
| 344 | \includegraphics[width=1.0\textwidth]{cat-comp.pdf} |
| 345 | \end{center} |
| 346 | \end{frame} |
| 347 | |
| 348 | % --- Schematics History ------------------------------------------------------ |
| 349 | |
| 350 | \begin{frame}{Schematics History} |
| 351 | \begin{itemize} |
| 352 | \item Schematics revision history |
| 353 | \item {\tt git diff} produces gibberish |
| 354 | \end{itemize} |
| 355 | |
| 356 | \begin{center} |
| 357 | \includegraphics[height=4.5cm]{../fisl2011/schhist.png} |
| 358 | \qquad |
| 359 | \includegraphics[height=4cm]{../fisl2011/USB.png} |
| 360 | \end{center} |
| 361 | |
| 362 | {\small \url{projects.qi-hardware.com/schhist/}} |
| 363 | \end{frame} |
| 364 | |
| 365 | % --- Schematics History (cont'd) --------------------------------------------- |
| 366 | |
| 367 | \begin{frame}{Schematics History (cont'd)} |
| 368 | How it works: |
| 369 | \begin{itemize} |
| 370 | \item Walk git revision history |
| 371 | \item Check out project whenever schematics change |
| 372 | \item Run eeschema to make Postscript |
| 373 | \item Convert to PNG (find diffs, with highlighting) and PDF |
| 374 | \item Wrap in HTML |
| 375 | \end{itemize} |
| 376 | |
| 377 | %Issues: |
| 378 | %\begin{itemize} |
| 379 | % \item Nasty shell script |
| 380 | % \item Resource-hungry (partial caching) |
| 381 | % \item Large schematics get confusing |
| 382 | % \item Projects spanning multiple repositories |
| 383 | %\end{itemize} |
| 384 | \vskip5mm |
| 385 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/schhist/ |
| 386 | {\small \url{tiny.cc/eda-tools-schhist}} |
| 387 | \end{frame} |
| 388 | |
| 389 | % --- Fped -------------------------------------------------------------------- |
| 390 | |
| 391 | \begin{frame}{Footprint Editor (fped)} |
| 392 | \begin{center} |
| 393 | \includegraphics[height=45mm]{../fisl2011/fped.png} |
| 394 | \end{center} |
| 395 | |
| 396 | \begin{itemize} |
| 397 | \item Fully parametric |
| 398 | \item Automated repetition (loops, tables, sub-frames) |
| 399 | \item GUI or text-based |
| 400 | \item Automatic measurements |
| 401 | \item Output: KiCad, Postscript, Gnuplot |
| 402 | \end{itemize} |
| 403 | \end{frame} |
| 404 | |
| 405 | % --- Footprint Catalog ------------------------------------------------------ |
| 406 | |
| 407 | \begin{frame}{Footprint Catalog} |
| 408 | \begin{itemize} |
| 409 | \item Like schematics symbol catalog, but for footprints |
| 410 | \item Added value: measurements, pad types |
| 411 | \end{itemize} |
| 412 | |
| 413 | \begin{center} |
| 414 | \includegraphics[width=1.0\textwidth]{cat-mod.pdf} |
| 415 | \end{center} |
| 416 | |
| 417 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/genkicat/ |
| 418 | {\small \url{tiny.cc/eda-tools-genkicat}} |
| 419 | \end{frame} |
| 420 | |
| 421 | % --- Layout History ---------------------------------------------------------- |
| 422 | |
| 423 | \begin{frame}{Layout History} |
| 424 | \begin{itemize} |
| 425 | \item Layout revision history |
| 426 | \item To do $\ldots$ |
| 427 | \end{itemize} |
| 428 | |
| 429 | \vskip5cm |
| 430 | %% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/brdhist/ |
| 431 | % {\small \url{tiny.cc/eda-tools-brdhist}} |
| 432 | \end{frame} |
| 433 | |
| 434 | % --- Gerber Renderer --------------------------------------------------------- |
| 435 | |
| 436 | \begin{frame}{Gerber Renderer (prettygerbv)} |
| 437 | \begin{columns} |
| 438 | \begin{column}[l]{8.5cm} |
| 439 | \begin{itemize} |
| 440 | \item ``Photorealistic'' view of PCB |
| 441 | \item Combines Gerber (traces, drawings) and Excellon (holes) |
| 442 | \item Easy to see issues with solder paste, silk screen, |
| 443 | solder mask, $\ldots$ |
| 444 | \item Uses gerbv for rendering |
| 445 | \end{itemize} |
| 446 | \vskip10mm |
| 447 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/fab/prettygerbv/ |
| 448 | {\small \url{tiny.cc/eda-tools-fab-prettygerbv}} |
| 449 | % MORE ?? |
| 450 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/fab/ |
| 451 | {\small \url{tiny.cc/eda-tools-fab}} |
| 452 | \end{column} |
| 453 | |
| 454 | \begin{column}[r]{4cm} |
| 455 | \includegraphics[width=3cm]{../fisl2011/atusb-front.png} |
| 456 | \end{column} |
| 457 | \end{columns} |
| 458 | |
| 459 | \end{frame} |
| 460 | |
| 461 | % --- BOM Processor ----------------------------------------------------------- |
| 462 | |
| 463 | \begin{frame}{BOM Processor (BOOM)} |
| 464 | \begin{itemize} |
| 465 | \item BOM $\rightarrow$ select components $\rightarrow$ find supplier |
| 466 | $\rightarrow$ \\ |
| 467 | shopping list |
| 468 | \begin{itemize} |
| 469 | \item Decode product numbers |
| 470 | \item Match characteristics (manufacturer part) |
| 471 | \item Find part in inventories (distributor part) |
| 472 | \item Select best price |
| 473 | \end{itemize} |
| 474 | \item Work in progress. Rewrite from Perl to C. |
| 475 | % \item Snag: Digi-Key spider no longer works |
| 476 | \item Future: Help with component selection |
| 477 | \end{itemize} |
| 478 | \vskip3mm |
| 479 | % URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/b2/ |
| 480 | {\small \url{tiny.cc/eda-tools-b2}} |
| 481 | \end{frame} |
| 482 | |
| 483 | % --- BOOM Data Flow ---------------------------------------------------------- |
| 484 | |
| 485 | %\begin{frame}{BOOM Data Flow} |
| 486 | %DRAWING |
| 487 | %\end{frame} |
| 488 | |
| 489 | % --- Schematics Design Rules ------------------------------------------------- |
| 490 | |
| 491 | \begin{frame}{Schematics Design Rules} |
| 492 | Work in progress. First compilation by Adam Wang. |
| 493 | |
| 494 | \begin{itemize} |
| 495 | \item Clean visual representation |
| 496 | \item Compatibility with post-processors (e.g., BOOM) |
| 497 | \end{itemize} |
| 498 | |
| 499 | Examples: |
| 500 | \begin{itemize} |
| 501 | \item Value naming (4k7, 10nH, $\ldots$) |
| 502 | \item Junction style |
| 503 | \item Naming of negated pins (e.g., nRESET) |
| 504 | \item Text placement and size |
| 505 | \item Checklists for reviews |
| 506 | \end{itemize} |
| 507 | |
| 508 | {\small \url{en.qi-hardware.com/wiki/Rules_on_Editing_Schematics}} |
| 509 | \end{frame} |
| 510 | |
| 511 | % --- Qi-Hardware Workflow ---------------------------------------------------- |
| 512 | |
| 513 | \begin{frame}{Qi-Hardware Workflow} |
| 514 | \begin{center} |
| 515 | \includegraphics[width=1.0\textwidth]{all.pdf} |
| 516 | \end{center} |
| 517 | \end{frame} |
| 518 | |
| 519 | % --- Conclusion -------------------------------------------------------------- |
| 520 | |
| 521 | \begin{frame}{Conclusion} |
| 522 | Experience this far: |
| 523 | \begin{itemize} |
| 524 | \item KiCad is a good basis for collaborative projects |
| 525 | \item Easy to extend, thanks to open design |
| 526 | \item Automation makes workflow less intimidating |
| 527 | \end{itemize} |
| 528 | |
| 529 | To do: |
| 530 | \begin{itemize} |
| 531 | \item Spread the word |
| 532 | \item Finish BOOM and write brdhist |
| 533 | \item Unify meta-data (bookshelf, etc.) |
| 534 | \item Improve quality of libraries |
| 535 | \item Command-line support in mainline KiCad |
| 536 | \end{itemize} |
| 537 | |
| 538 | \vskip2mm |
| 539 | {\small \url{projects.qi-hardware.com/}} \\ |
| 540 | {\small \url{downloads.qi-hardware.com/people/werner/fisl13.pdf}} |
| 541 | \end{frame} |
| 542 | |
| 543 | \end{document} |
| 544 |
Branches:
master
