1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-25 17:37:31 +02:00
wernermisc/fisl2012/talk.tex
2012-07-26 12:35:11 -03:00

515 lines
14 KiB
TeX

\documentclass[12pt,trans]{beamer}
\usepackage{color}
\usepackage{url}
\usepackage{colortbl}
%\usepackage{soul}
%\usepackage{verbatim}
\usefonttheme{structurebold}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{items}[ball]
%\setbeamersize{sidebar width left=-5mm}
\title{\Large Making Hardware \\ with KiCad and Friends}
\author{Werner Almesberger \\\url{werner@almesberger.net}}
\date{July 25, 2012}
%\setul{}{1.5pt}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
% --- Overview ----------------------------------------------------------------
\begin{frame}{Overview}
\begin{itemize}
\item KiCad introduction
\item Qi-Hardware workflow
\item $\dots$ and tools
\end{itemize}
{\small \url{downloads.qi-hardware.com/people/werner/fisl13.pdf}}
\end{frame}
% --- KiCad Introduction ------------------------------------------------------
\begin{frame}{KiCad}
\begin{itemize}
\item Complete EDA solution
\item Text files $\rightarrow$ extensible
\item Free Software: GPL, LGPL
\item Development team by Jean-Pierre Charras, \\
Dick Hollenbeck, and many others
\item C++, wxWidgets
\item Multi-platform: Linux, Windows, Mac
\end{itemize}
\vskip5mm
{\small \url{www.kicad-pcb.org}}
\end{frame}
% --- Schematics --------------------------------------------------------------
\begin{frame}{KiCad: Schematics}
\begin{center}
\includegraphics[width=1.0\textwidth]{schem.pdf}
\end{center}
\end{frame}
% --- Footprints --------------------------------------------------------------
\begin{frame}{KiCad: Footprints}
\begin{center}
\includegraphics[width=1.0\textwidth]{assoc.pdf}
\end{center}
\end{frame}
% --- Layout ------------------------------------------------------------------
\begin{frame}{KiCad: Layout}
\begin{center}
\includegraphics[width=1.0\textwidth]{layout.pdf}
\end{center}
\end{frame}
% --- Qi-Hardware -------------------------------------------------------------
\begin{frame}{Qi-Hardware}
Structure and goals:
\begin{itemize}
\item Collection of loosely connected projects
\item Informal gathering of like-minded developers
\item Copyleft Hardware with Free Software
\item Development and manufacturing
\item Toolmaking
\end{itemize}
Products:
\begin{itemize}
\item Ben NanoNote (Handheld computer)
\item Ben-WPAN (IEEE 802.15.4 wireless)
\item Milkymist One (FPGA-based Video synthesizer)
\end{itemize}
\vskip2mm
{\small \url{www.qi-hardware.com}}
\end{frame}
% --- Collaborative Design ----------------------------------------------------
\begin{frame}{Collaborative Design}
\begin{itemize}
\item Follow other people's work
\item Review other people's work (projects and libraries)
\item Shared design information
\item Shared version control (git)
\item Shared procedures and rules
\end{itemize}
\end{frame}
% --- KiCad Limitations -------------------------------------------------------
\begin{frame}{KiCad Limitations}
\begin{itemize}
\item No integrated version control system support
\item Integration leads to weak peripheral tools
\begin{itemize}
\item Footprint editor
\item Component catalog
\item Module catalog
\end{itemize}
\item No scripting (coming)
\item Scattered libraries CHECK
\end{itemize}
\end{frame}
% --- Qi-Wardware Adaptation --------------------------------------------------
\begin{frame}{Qi-Hardware Adaptation}
\begin{itemize}
\item Command-line-oriented use
\item Extend KiCad with patches
\item External scripts/programs
\item Own component and module libraries with common rules
\end{itemize}
\end{frame}
% --- Libraries ---------------------------------------------------------------
\begin{frame}{Libraries}
Goals:
\begin{itemize}
\item Consistent naming
\item Known origin of design information
\item Documented development process \\
E.g., IPC-7351
\end{itemize}
To do:
\begin{itemize}
\item Improve organization
\item Better integrate background information
\item Reviews !
\end{itemize}
\vskip4mm
% URL http://projects.qi-hardware.com/index.php/p/kicad-libs/source/tree/master/components/
{\small \url{tiny.cc/p/kicad-libs-components}} \\
% URL http://projects.qi-hardware.com/index.php/p/kicad-libs/source/tree/master/modules/
{\small \url{tiny.cc/p/kicad-libs-modules}}
\end{frame}
% --- What goes into git ------------------------------------------------------
\begin{frame}{What goes into git}
KiCad:
\begin{itemize}
\item Project file: {\tt {\em project}.pro}
\item Schematics: {\tt {\em project}.sch}, {\tt {\em subsheet}.sch}
\item Footprint mapping: {\tt {\em project}.cmp}
\item Layout: {\tt {\em project}.brd}
\end{itemize}
Qi-Hardware:
\begin{itemize}
\item Makefile ({\tt sch}, {\tt brd}, {\tt fab}, {\tt clean})
\item Bookshelf (for dsv)
\item Project-local libraries
\end{itemize}
\end{frame}
% --- What doesn't ------------------------------------------------------------
\begin{frame}{What doesn't}
\begin{itemize}
\item Netlist: {\tt {\em project}.net} \\
Generated with eeschema from {\tt *.sch} and {\tt {\em project}.cmp}
\item Caches and backups: {\tt {\em project}.bak}, {\tt {\em project}.000},
{\tt {\em project}-cache.lib}
\item Postscript: {\tt {\em project}-{\em sheet}.ps},
{\tt {\em project}-{\em layer}.ps}
\item Gerbers: {\tt {\em project}-{\em layer}.g{\em ??}}
\item BOMs: {\tt {\em project}.lst}, {\tt {\em project}.cvs}
\item Fab outputs: {\tt {\em project}.drl}, {\tt {\em project}.pos}
\item And so on: {\tt {\em project}.cad}, {\tt {\em project}.erc},
{\tt {\em project}.dsn}, {\tt {\em project}.rpt},
{\tt {\em project}.wrl}, $\ldots$
\end{itemize}
\end{frame}
% --- Project File ------------------------------------------------------------
\begin{frame}{Project File ({\tt {\em project}.pro})}
Contains:
\begin{itemize}
\item Project settings
\item Lists of libraries
\end{itemize}
Issues:
\begin{itemize}
\item Local absolute paths
\item Default libraries
\item Timestamps $\rightarrow$ commit noise
\end{itemize}
Solution:
\begin{itemize}
\item Maintain manually
\item {\tt purge} script: \\
% URL http://projects.qi-hw.com/index.phpp/wernermisc/source/tree/master/bin/purge
{\small \url{tiny.cc/wernermisc-bin-purge}}
\end{itemize}
\end{frame}
% --- Makefile ----------------------------------------------------------------
\begin{frame}[fragile]{Makefile}
Objectives:
\begin{itemize}
\item Convenience shortcuts
\item Combine tools
\item Share common procedures
\item Avoid mistakes
\end{itemize}
{\small
\begin{verbatim}
front:
pcbnew --plot=ps --plot-fill-all-zones \
--layers=Front --plot-mirror \
$(PROJECT).brd
lpr $(PROJECT)-Front.ps
\end{verbatim}
}
\end{frame}
% --- KiCad Command-Line Patches ----------------------------------------------
\begin{frame}{KiCad Command-Line Patches}
Original hack by Werner Almesberger, clean rewrite by Wolfgang Spraul.
\begin{itemize}
\item Idea: command-line access to main output functions
\item eeschema
\begin{itemize}
\item Visualization: Postscript (and SVG, DXF)
\item BOM $\rightarrow$ BOOM
\item Netlist, ERC
\end{itemize}
\item pcbnew
\begin{itemize}
\item Fabrication: Gerbers, drill (Excellon), component positions
\item Visualization and DIY: Postscript
\item Attributes: mirror, size, origin, fill zones, $\ldots$
\end{itemize}
\end{itemize}
\vskip5mm
% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/kicad-patches/
{\small \url{tiny.cc/eda-tools-kicad-patches}}
\end{frame}
% --- Data Sheet Viewer (dsv) -------------------------------------------------
\begin{frame}[fragile]{Data Sheet Viewer (dsv)}
\begin{itemize}
\item Bookshelf: name and aliases $\rightarrow$ PDF or ZIP with PDF
\item Download (wget) to local cache
\item Hierarchical lookup by name or alias
\item Example: \\
{\tt dsv avr} $\rightarrow$ ATtiny87 ({\tt doc8265.pdf})
$\rightarrow$ xpdf
\end{itemize}
\vskip5mm
Bookshelf example:
\begin{verbatim}
N: attiny87
A: attiny167
A: avr
D: http://www.atmel.com/Images/doc8265.pdf
\end{verbatim}
\end{frame}
% --- Data Sheet Viewer (dsv) -------------------------------------------------
\begin{frame}{dsv Motivation}
\begin{itemize}
\item Make sure everybody uses the same data sheet
\begin{itemize}
\item Same component
\item Same manufacturer
\item Same data sheet revision
\end{itemize}
\item Copyright: can't just check in PDF
\item Industrial pragmatism: private mail or ``internal'' repository
\item Qi-Hardware: send {\tt BOOKSHELF} around
\end{itemize}
\vskip10mm
% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/dsv/
{\small \url{tiny.cc/eda-tools-dsv}}
\end{frame}
% --- Schematics Symbol Catalog ----------------------------------------------
\begin{frame}{Schematics Symbol Catalog}
\begin{itemize}
\item For selection, review
\item Hierarchical order with alphabetical index
\item Short descriptions and data sheet links
\item Added value: indicate pin types
\item To do: connect to dsv
\end{itemize}
\begin{center}
\includegraphics[width=1.0\textwidth]{cat-comp.pdf}
\end{center}
\end{frame}
% --- Schematics History ------------------------------------------------------
\begin{frame}{Schematics History}
\begin{itemize}
\item Schematics revision history
\item {\tt git diff} produces gibberish
\end{itemize}
\begin{center}
\includegraphics[height=4.5cm]{../fisl2011/schhist.png}
\qquad
\includegraphics[height=4cm]{../fisl2011/USB.png}
\end{center}
{\small \url{projects.qi-hardware.com/schhist/}}
\end{frame}
% --- Schematics History (cont'd) ---------------------------------------------
\begin{frame}{Schematics History (cont'd)}
How it works:
\begin{itemize}
\item Walk git revision history
\item Check out project whenever schematics change
\item Run eeschema to make Postscript
\item Convert to PNG (find diffs, with highlighting) and PDF
\item Wrap in HTML
\end{itemize}
Issues:
\begin{itemize}
\item Nasty shell script
\item Resource-hungry (partial caching)
\item Large schematics get confusing
\item Projects spanning multiple repositories
\end{itemize}
% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/schhist/
{\small \url{tiny.cc/eda-tools-schhist}}
\end{frame}
% --- Footprint Catalog ------------------------------------------------------
\begin{frame}{Footprint Catalog}
\begin{itemize}
\item Like schematics symbol catalog, but for footprints
\item Added value: measurements, pad types
\end{itemize}
\begin{center}
\includegraphics[width=1.0\textwidth]{cat-mod.pdf}
\end{center}
% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/genkicat/
{\small \url{tiny.cc/eda-tools-genkicat}}
\end{frame}
% --- Fped --------------------------------------------------------------------
\begin{frame}{Footprint Editor (fped)}
\begin{center}
\includegraphics[height=45mm]{../fisl2011/fped.png}
\end{center}
\begin{itemize}
\item Fully parametric
\item Automated repetition (loops, tables, sub-frames)
\item GUI or text-based
\item Automatic measurements
\item Output: KiCad, Postscript, Gnuplot
\end{itemize}
\end{frame}
% --- Layout History ----------------------------------------------------------
\begin{frame}{Layout History}
\begin{itemize}
\item Layout revision history
\item To do $\ldots$
\end{itemize}
\vskip5cm
%% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/brdhist/
% {\small \url{tiny.cc/eda-tools-brdhist}}
\end{frame}
% --- Gerber Renderer ---------------------------------------------------------
\begin{frame}{Gerber Renderer (prettygerbv)}
\begin{columns}
\begin{column}[l]{8.5cm}
\begin{itemize}
\item ``Photorealistic'' view of PCB
\item Combines Gerber (traces, drawings) and Excellon (holes)
\item Easy to see issues with solder paste, silk screen,
solder mask, $\ldots$
\item Uses gerbv for rendering
\end{itemize}
\vskip10mm
% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/fab/prettygerbv/
{\small \url{tiny.cc/p/eda-tools-fab-prettygerbv}}
% MORE ??
% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/fab/
{\small \url{tiny.cc/p/eda-tools-fab}}
\end{column}
\begin{column}[r]{4cm}
\includegraphics[width=3cm]{../fisl2011/atusb-front.png}
\end{column}
\end{columns}
\end{frame}
% --- BOM Processor -----------------------------------------------------------
\begin{frame}{BOM Processor (BOOM)}
\begin{itemize}
\item BOM $\rightarrow$ select components $\rightarrow$ find supplier
$\rightarrow$ \\
shopping list
\item Work in progress. Rewrite from Perl to C
\begin{itemize}
\item Faster
\item Less headache with data structures
\item Better parsing
\end{itemize}
\item Snag: Digi-Key spider no longer works
\item Future: Help with component selection
\end{itemize}
% URL http://projects.qi-hardware.com/index.php/p/eda-tools/source/tree/master/b2/
{\small \url{tiny.cc/p/eda-tools-b2}}
\end{frame}
% --- BOOM Data Flow ----------------------------------------------------------
\begin{frame}{BOOM Data Flow}
DRAWING
\end{frame}
% --- Schematics Design Rules -------------------------------------------------
\begin{frame}{Schematics Design Rules}
\begin{itemize}
\item Value naming (4k7, 10 uF, $\ldots$)
\item Junction style
\item Text spacing
\end{itemize}
{\small \url{en.qi-hardware.com/wiki/Rules_on_Editing_Schematics}}
\end{frame}
% --- Qi-Hardware Workflow ----------------------------------------------------
\begin{frame}{Qi-Hardware Workflow}
DIAGRAM
\end{frame}
% --- Conclusion --------------------------------------------------------------
\begin{frame}{Conclusion}
Experience this far:
\begin{itemize}
\item KiCad is a good basis for collaborative projects
\item Open design allows extension with scripts
\item Workflow is complex and needs careful consideration
\end{itemize}
To do:
\begin{itemize}
\item Spread the word
\item Unify meta-data (bookshelf, etc.)
\item Improve quality of libraries
\item Integrate patches into mainline KiCad
\item Finish BOOM and write brdhist
\end{itemize}
\vskip2mm
{\small \url{downloads.qi-hardware.com/people/werner/fisl13.pdf}}
\end{frame}
\end{document}