0% developed

Kicad/Print version

From Wikibooks, open books for an open world
Jump to navigation Jump to search


KiCad is an open source software suite for EDA (Electronic Design Automation)

The KiCAD suite is a group of open-source, cross-platform programs for drawing schematics and PCBs.

Table of contents

Some complementary WikiBooks are:



Please add {{alphabetical}} only to book title pages.


Kicad

Introduction
Installation and configuration
Use

File Formats

Schematic Files Format
Schematic Libraries Files Format
Board File Format

License


Kicad

Installation and configuration

Display options

It is recommended to set your display/graphics card to use 24 or 32 bits per pixel. The 16-bit mode will work for Eeschema, but in Pcbnew the display will not function correctly under Linux in this mode.

Initialization of the default configuration

A default configuration file (kicad.pro) is supplied in C:\Program Files (x86)\KiCad\share\template. It serves as the template for each new project. It can be modified or added to if necessary, usually for the list of libraries to load. Run Eeschema via kicad or directly (Linux command; /usr/local/kicad/bin/eeschema). Update the configuration and then save it in /usr/local/kicad/template/kicad.pro

With Windows, to add a new library with Eeschema, go to Preferences --> Library --> Click on the Add button. Find the new library file (.lib extension), highlight it & click the Open button. Click the OK button when done.

Principles of use

In order to manage simply a project, i.e. all the files it constitutes (representing schematics, printed circuit boards, supplementary libraries, manufacturing files for phototracing, drilling and automatic component placement), it is recommended to create a project: Create a working directory for the project (using kicad or by other means). In this directory, use kicad to create the project file (file .pro) via the icon.

 It is strongly recommended to use the same name for the project and its directory.

Kicad creates a file with a .pro extension that maintains a number of parameters relating to project management (such as the filename of the principal schematic, list of libraries used in the schematics and PCBs). The default names of both the principal schematic and the printed circuit board are based upon the name of the project. Thus, if a project called example was created in a directory called example, the default files created would be:

example.pro project management file.

example.sch principal schematic file.

example.brd printed circuit board file.

example.xxx various files created by the other utility programs.

example.cache.lib cache file of the libraries used in the schematic (backup of the components used)

Use

Main Window

The main window is composed of a tree view of the project, a pane containing buttons used to run the various utilities, and a message window.

The menu and the toolbar can be used to create, read and save project files (*.pro).

Utility launch pane

The launch pane

Project tree view

The project tree
The project tree

Double-clicking on runs the schematic editor, in this case opening the file interf_u.sch

Double-clicking on runs the layout editor, in this case opening the file interf_u.brd

Double-clicking on runs the footprint assign program (Cvpcb), in this case opening the file interf_u.net

Right (image) clicking allows files operations

Toolbar

Create a configuration file for a new project. If the template kicad.pro is found in kicad/template, it is copied into the working directory.

Open an existing project.

Update (save) the current configuration.

Create a zip archive of the whole project (schematic files, libraries, pcb, etc).

Redraw the tree list (useful after a tree change).


File Formats

File formats

KiCad creates and uses files of several different formats.[1]

  • Files that end in ".sch" are schematics.
  • Files that end in ".lib" are schematic symbols library files.
  • Files that end in "-cache.lib" are schematic symbols library files, too. This file is a local copy of symbols used in the current project the file is named for.
  • Files that end in ".pro" are project files
  • Files that end in ".dcm" add documentation to symbols in the library file with the same name. The ".dcm" file contains the description, keywords and docfilename whereas the ".lib" file contains information about how the symbol is drawn, the pins et cetera.
  • Files that end in ".000", ".bak", ".bck" are old backup files (don't archive them).
  • Files that end in ".brd" are PCB layout files.
  • Files that end in ".cmp" are footprint information files that are modified by the PCBNew program
  • Files that end in ".erc" are output from the schematic electronic rules check (ERC).
  • Files that end in ".gcd" ...
  • Files that end in ".lst", ".net" are netlist output from the schematic (don't archive them).
  • Files that end in ".kicad_mod", typically in folders with names that end in ".pretty", are the 2014(?) version of modules (a KiCad "module" is called a "footprint" or a "decal" in other CAD software), one footprint per file, lots of files in the entire ".pretty" library.
  • Files that end in ".mod" are module libraries (a KiCad "module" is called a "footprint" or a "decal" in other CAD software)
  • Files that end in ".mdc" cache a short summary of a few frequently-referenced bits of data from the corresponding ".mod" file of the same name (don't archive them).
  • Files that end in ".dsn" are regenerated from the ".kicad_pcb" file every time you hit the "autoroute" button and then hit the "Export a Specctra Design (*.dsn) file" (don't archive them).
  • Files that end in ".ses" are session files output from the autorouter (don't archive them).
  • The ".git" folder contains data for revision control. (If you use ".git" with KiCad,

you may want to use a ".ignore" file based on https://github.com/github/gitignore/blob/master/KiCad.gitignore ).

Some people are working on making it very easy for people, when they make improvements to the KiCad footprint libraries and schematic symbol libraries, to push any improvements to GitHub and automatically pull any improvements other people have made from GitHub. Some such libraries include:

Schematic Files Format

Units

Sizes and coordinates are given in whole numbers of thousandths of an inch (1/1000 inch). Coordinates may be negative by prefixing a hyphen (-) to the numeric value. Note that Y coordinates are positive in a downward direction with respect to the page origin.

Angles are given in whole numbers of tenths of degrees (1/10°), specifying a rotation counter-clockwise.

Examples

Value Distance Angle
1 0.001 inches 0.1° counter-clockwise
200 0.200 inches 20.0° counter-clockwise
3599 3.599 inches 359.9° counter-clockwise
-1234 -1.234 inches invalid (negative value)
36000 36.000 inches invalid (over 359.9°)

Header

Syntax Description Version
EESchema Schematic File Version ver [date] ver is 1 or 2

date is only present in some versions of Version 2 files?

LIBS: library_list not used, for information only
EELAYER nn mm nn and mm are not used, reserved
EELAYER END
$Descr size w h size = A4..A0 or A..E 1
size = A4..A0, A..E, or User. w = width (mils), h = height (mils). w and h are ignored unless size = User 2
Sheet m n m is the current sheet number, n is the total number of sheets. It appears that a sheet will not appear in the project list unless it is m = 1.
"string" Title field 1
Title "string" Title field 2
Date "string" Issue Date field
Rev "string" Revision field
Comp "string" Company field
Comment1 "string" Comment1 field
Comment2 "string" Comment2 field
Comment3 "string" Comment3 field
Comment4 "string" Comment4 field
$EndDescr

Example of Version 1

EESchema Schematic Spins Version 1
LIBS:brooktre, cypress, ttl, power, linear, memory, xilinx, idiot, aaci, INTEL, special, device, dsp
EELAYER 20 0
EELAYER END
$Descr A3 16535 11700
Sheet 1 4
""
Date "28 DEC 1996"
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr

A later example:

EESchema Schematic File Version 2  date 4/15/2011 3:59:54 PM
LIBS:mylib
LIBS:transistors
LIBS:someotherlib
EELAYER 25 0
EELAYER END
$Descr A4 11700 8267
Sheet 1 1
Title "DC Supply"
Date "15 apr 2011"
Rev "1"
Comp "Circuits R Us"
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr

Example from KiCad version 4.0.6:

EESchema Schematic File Version 2 LIBS:74xgxx LIBS:74xx LIBS:ac-dc EELAYER 25 0 EELAYER END $Descr A4 11693 8268 encoding utf-8 Sheet 1 1 Title "" Date "" Rev "" Comp "" Comment1 "" Comment2 "" Comment3 "" Comment4 "" $EndDescr

Description of a component

Format:

$Comp

L name reference

U N mm time_stamp

P posx posy

List of fields:

F field_numbertextorientation posX posY size flags hor_justify style <“field_name”>(see below)

1 posx posy (redundant: not used (hmm... used in 4.0.6 maybe P seems not to be used. Best to keep these in sync))

A B C D ( orientation matrix with A, B, C, D = - 1, 0 or 1)

$EndComp

Description of the fields:

F n “text” orientation posX posY size flags hor_justify style <“field_name”>

with n = field_number (reference_field = 0, value_field = 1, footprint_field = 2, datasheet_field = 3, user_defined_fields = 4..12)

orientation = H (horizontal) or V (vertical).

posX posY = text position in mils

size = character size in mils (0,001”)

flags = abcd

a=
b=
c=
d= Visibility 0=Visible 1=Invisible


hor_justify = L (left), C (center), R (right)

style = xyz

x=vertical justify [T (top), C (center), B (bottom)
y=text_style_1 N (Normal), I (cursive)
z=text_style_2 N (normal), B (bold)

field_name = only used for user defined fields (field_number > 4)



Example:

$Comp
L CONN_3 JP3
U 1 1 329879E1
P 1200 2000
F 0 “JP3” H 1250 2200 60 0000 L CNN
F 1 “CONN_3” V 1350 2000 50 0000 L CNN
F 2 "" H 1450 1800 60  0000 C CNN
F 3 "" H 1550 1600 60  0000 C CNN
F 4 "20%" H 1650 1400 60  0000 C CNN "Tolerance"
      1 1200 2000
     - 1 0 0 - 1 
$EndComp

Description of a NoConnect symbol

Format:

NoConn ~ posx posy

Example:

NoConn ~ 13400 5500

Description of a hierarchical sheet symbol

Format:

$Sheet

S posx posy dimx dimy

List of Sheet Labels

$EndSheet

Format of Sheet Labels:

Fn “text” forms side posx posy dimension

With:

n = sequence number (0..x).

n = 0: name of the corresponding schematic file.

n = 1: name of the sheet of hierarchy.

form = I (input) O (output)

side = R (right) or L (left).

Example:

$Sheet
S 1800 1600 1500 1500
F0 “PROGALIM.SCH” 60
F1 “PROGALIM.SCH” 60
F2 “CLK” O R 3300 1800 60 
F3 “/RESET” O R 3300 2000 60 
F4 “VPWR” O R 3300 2700 60 
F5 “/HALT” O R 3300 2100 60 
F6 “TRANSF1” I L 1800 1900 60 
F7 “TRANSF2” I L 1800 2000 60 
F8 “3.84MH” O R 3300 2200 60 
$EndSheet

Description of a text note

Format:

Text Notes posx posy orientation dimension ~

Text

Example:

Text Notes 2100 3250 1 60 ~
TOTO

Description of a Global Label

Format:

Text GLabel posx posy orientation dimension shape

Text

Example:

Text GLabel 3100 2500 2 60 UnSpc
TITI
Text GLabel 3150 2700 1 60 3State
3STATES
Text GLabel 2750 2800 0 60 UnSpc
BIDI
Text GLabel 2750 2650 0 60 Output
GLABELOUT
Text GLabel 2750 2400 0 60 Input
RESET

Description of a Hierarchical label

Format:

Text HLabel posx posy orientation dimension shape

Text

Example:

Text HLabel 3400 2000 0 60 Input
/RESET

Description of a label

Format:

Text Label posx posy orientation dimension ~

Text

Example:

Text Label 3400 2000 0 60 ~
/RESET

Description of a junction

Format:

Connection ~ posx posy

Example:

Connection ~ 13300 6500

Description of a wire segment (Wire)

Format:

Wire Wire Line

startx starty endx endy

Example:

Wire Wire Line
3300 1800 3900 1800

Description of a Bus segment

Format:

Wire Bus Line

startx starty endx endy

Example:

Wire Bus Line
3900 5300 4500 5300

Description of a dotted line segment

Format:

Wire Notes Line

startx starty endx endy

Example:

Wire Notes Line 
2850 3350 2850 3050

Description of a bus entry

Format:

For an entry wire/bus :

Wire Wire Bus

startx starty endx endy


For an entry bus/bus :

Wire Bus Bus

startx starty endx endy


Example:

Wire/Bus:

Entry Wire Bus
4100 2300 4200 2400

Bus/Bus:

Entry Bus Bus
4400 2600 4500 2700

Schematic Libraries Files Format

Units

Sizes and coordinates are given in mils (1/1000 inch)

Headings

Format:

EESchema-LIBRARY Version 2.0 24/1/1997-18:9:6
description of the components
# End Library

Description of a component

The format is as follows :

DEF name reference unused text_offset draw_pinnumber draw_pinname unit_count units_locked option_flag

F0 reference posx posy text_size text_orient visibility htext_justify vtext_justify

F1 name posx posy text_size text_orient visibility htext_justify vtext_justify

F2 ???

F3 ???

$FPLIST

footprint list

$ENDFPLIST

ALIAS name1 name2 name3 fields list

DRAW

list graphic elements and pins

ENDDRAW

ENDDEF

Example:

DEF BNC P 0 40 Y NR 1 L NR
F0 “P” 10.120 60 H V L C
F1 “BNC” 110 - 60 40 V V L C
DRAW
C 0 0 70 0 1 0
C 0 0 20 0 1 0
X Ext. 2 0 - 200 130 U 40 40 1 1 P
X In 1 - 150 0.130 R 40 40 1 1 P
ENDDRAW
ENDDEF


Description of DEF

This is the component definition line.

Format:

DEF name reference unused text_offset draw_pinnumber draw_pinname unit_count units_locked option_flag

  • name = component name in library (74LS02 ...), write insert preceding '~' in front of the name, in the case of it does not have any unit in sch library. the preceding '~' has to be ignored when reading the name.
  • reference = Reference ( U, R, IC .., which become U3, U8, R1, R45, IC4...)
  • unused = 0 (reserved)
  • text_offset = offset for pin name position
  • draw_pinnumber = Y (display pin number) or N (do not display pin number).
  • draw_pinname = Y (display pin name) or N (do not display pin name).
  • unit_count = Number of part ( or section) in a component package. Limit is 26 (shown as chars form A to Z).
  • units_locked = = L (units are not identical and cannot be swapped) or F (units are identical and therefore can be swapped) (Used only if unit_count > 1)
  • option_flag = N (normal) or P (component type "power")

Description of F0 and F1

F0 is the component reference line. F1 is the component name line.

Format:

F0 reference posx posy text_size text_orient visibile htext_justify vtext_justify

F1 name posx posy text_size text_orient visibility htext_justify vtext_justify

  • reference = Reference ( U, R, IC .., which become U3, U8, R1, R45, IC4...)
  • name = component name in library (74LS02 ...)
  • posx, posy = position of the text label
  • text_size = Size of the displayed text
  • text_orient = Displayed text orientation (V=Vertical, H=Horizontal(default))
  • visible = Is label displayed (I=Invisible, V=Visible(default))
  • htext_justify = Horizontal text justify (L=Left, R=Right, C=Centre(default))
  • vtext_justify = Vertical text justify (T=Top, B=Bottom, C=Centre(default))

Description of $FPLIST

This line exists if one or more footprints are specified. Footprint names can have wildcards.

Description of ALIAS

This line exists only if the component has alias names.

Format:

ALIAS name1 name2 name3…

Description of DRAW

Lists graphic elements and pins. Each line defines a single element. The line starts with a single character indicating the type e.g. P indicates a polygon. The following items are commonly used in some of the elements:

  • posx, posy = Position of the graphic element
  • unit = unit no. in case of multiple units
  • convert = In case of variations in shape for units, each variation has a number. 0 indicates no variations. For example, an inverter may have two variations - one with the bubble on the input and one on the output.
  • thickness = line thickness
  • fill = fill colour (F=filled with foreground colour, f=filled with background colour, N=Not filled(default))

A record (Arc)

A posx posy radius start_angle end_angle unit convert thickness fill startx starty endx endy

  • posx, posy = centre of the circle part of which is the arc
  • radius = radius of the lost arc
  • start_angle = start angle of the arc in tenths of degrees
  • end_angle = end angle of the arc in tenths of degrees
  • startx, starty = coordinates of the start of the arc
  • endx, endy = coordinates of the end of the arc

C record (Circle)

C posx posy radius unit convert thickness fill

  • posx, posy = centre of the circle
  • radius = radius of the circle

P record (Polyline)

The polyline has a series of points. It need not described a closed shape i.e. a polygon. To do this make the first pair the same as the last pair.

P point_count unit convert thickness (posx posy)* fill

  • point_count = no. of coordinate pairs. posx and posy are repeated these many times.

S record (Rectangle)

S startx starty endx endy unit convert thickness fill

  • startx, starty = Starting corner of the rectangle
  • endx, endy = End corner of the rectangle

T record (Text)

T direction posx posy text_size text_type unit convert text text_italic text_hjustify text_vjustify

  • direction = Direction of text(0=Horizintal, 900=Vertical(default))
  • text_size = Size of the text
  • text_type = ???
  • text = Text to be displayed. All ~ characters are replaced with spaces. in case having one or more spaces in the text, double quote enclosed like "some thing".
  • text_italic = "Italic" or "Normal"
  • text_bold = 0 to normal 1 to bold
  • text_hjustify = C(Center), L(Left) or R(Right)
  • text_vjustify = C(Center), B(Bottom) or T(Top)

X record (Pin)

X name num posx posy length direction name_text_size num_text_size unit convert electrical_type [pin_type]

  • name = name displayed on the pin
  • num = pin no. displayed on the pin
  • posx = Position X same units as the length
  • posy = Position Y same units as the length
  • length = length of pin
  • direction = R for Right, L for left, U for Up, D for Down
  • name_text_size = Text size for the pin name
  • num_text_size = Text size for the pin number
  • unit_num = Unit number reference (see REF 'unit_count')
  • convert = (0 if common to the representations, if not 1 or 2)
  • electrical_type = Elec. Type of pin (I=Input, O=Output, B=Bidi, T=tristate,P=Passive, U=Unspecified, W=Power In, w=Power Out, C=Open Collector, E=Open Emitter, N=Not Connected)
  • [pin_type] = Type of pin or "Graphic Style" (N=Not Visible, I=Invert (hollow circle), C=Clock, IC=Inverted Clock, L=Low In (IEEE), CL=Clock Low, V=Low Out (IEEE), F=Falling Edge, NX=Non Logic). Optional : when not specified uses "Line" graphic style.

Board File Format

Note : this section describes the "old" .brd file format (file version 1 or 2).

General Information

Layer numbering

0. Back - Solder

1. Inner _back

2. Inner_front

3. Inner

5. Inner

6. Inner

7. Inner

8. Inner

9. Inner

10. Inner

11. Inner

12. Inner

13. Inner

14. Inner

15. Front - Component

16. Adhesive/glue Back

17. Adhesive/glue Front

18. Solder Paste Back

19. Solder Paste Front

20. SilkScreen Back

21. SilkScreen Front

22. SolderMask Back

23. SolderMask Front

24. Drawings

25. Comments

26. ECO1

27. ECO2

28. Edge Cuts

First line of description

$GENERAL

$SHEETDESCR

$SETUP block

$EQUIPOT

$MODULE

General description

Field Description

Drawings

All physical units are in mils (1/1000th inch) unless otherwise noted. The default layer number for graphic segments is 21, which corresponds to SilkS_Front.

DS x1 y1 x2 y2 width layer

Draws a line segment from (x1, y1) to (x2, y2) with width width on the layer number specified.

DC x1 y1 x2 y2 width layer

Draws a circle whose center is (x1, y1), and whose radius is specified by the segment (x1, y1) - (x2, y2) with line width width on the layer number specified.

DA x1 y1 x2 y2 angle width layer

Draws a circular arc. Center is at (x1, y1). The arc's starting point is (x2, y2). The length of the arc sweeps clockwise (for positive angles) from here by the number of degrees specified by (angle / 10).

Ttype x y height width angle stroke layer mirror visible layer italic "Text"

Draws the text Text as either reference text (type=0), value text (type=1), or user text (type=2) at position (x, y), rotated counterclockwise (angle / 10) degrees, on layer number layer. Each character will be height high, width wide, and strokes will be stroke thick. Text will be mirrored (mirror=M) or not (mirror=N), italic (italic=I) or not (italic=N), and visible by default (visible=V) or invisible by default (visible=I).

Pad Descriptions

$SHAPE3D

$PAD

A pad is usually a copper area for electrical connection to an electrical component. It has an optional hole for through-hole components, or may be defined as an area on a single copper layer for surface-mount components. It can also be used as a thermal connection for heat distribution, or as a hole for mounting or other uses.

Sh "padNum" shape xSize ySize yBaseIncrease xBaseIncrease angle

Defines the pad's dominant shape. padNum defines the pad number. The shape of the pad (shape) can be circular (C), ovate (O), rectangular (R), or trapezoidal (T) with its size specified by xSize and ySize. (Note that for circular pad shapes xSize and ySize must be equal.) The pad is rotated at an angle of angle. For trapezoidal shapes, yBaseIncrease specifies how much taller the pad's left edge is from its right, and xBaseIncrease specifies how much wider the pad's bottom is from its top; xSize and ySize then specify the size of the pad at its center and the trapezoidal effect increases one edge and decreases the other.

Dr dia xOffset yOffset

Defines the pad's drilled hole offset from the pad's position by (xOffset,yOffset) with a diameter of dia. To specify no hole, specify dia as 0. Note that the drilled hole can be located offset from the center of the pad's shape (Sh) although pcbnew requires the drilled hole be located on the pad itself.

At type flag layers

Defines the pad's attributes. The pad type is specified by type and can be STD for a standard pad with a hole, SMD for a surface-mount pad, CONN for a connector, or HOLE for a hole. flag is N (unknown function). layers specifies the active layers as a 32-bit hexadecimal number with leading zeroes such that active layers are indicated by a 1 bit and inactive by 0.

Ne unknown "netName"

Defines the net name as netName. There are other options specified by the unknown flag: it appears that unknown is 0 in a module library and has a numeric value other than 0 when placed and connected in a board file.

Po x y

Defines the position of the pad as (x,y). This is the point that traces must terminate for pcbnew to confirm connection to a pad.

Graphic items

$DRAWSEGMENT

Comes in Po, De pairs. Example:

   Po 0 73000 59250 63250 59250 150
   De 0 0 900 0 0


Po function x1 y1 x2 y2 width

De ? ? ? ? ?

Line

In a Po line, function is 0.

Circle

In a Po line, function is 1. (x1,y1) defines the center of the circle and (x2,y2) is a point on the circumference.

Arc

In a Po line, function is 2. (x1,y1) defines the center of the circle for the arc. (x2,y2) is the start point for a 90° clockwise arc.

Arc

$TEXTPCB

Te "text"

Defines text as the string to render.

nl "newLineText"

If present after Te, renders newLineText on the line after text. This can be repeated multiple times for multiple new lines. It is also common to have no nl entries if text is to fit on one line only.

Po x y height width thickness angle

Defines the position of the text as (x,y) with a height of height, a width of width, a thickness of thickness, and an angle of angle. Although the user interface only supports angles of 0, 900, 1800, and 2700, other angles can be entered in the board file.

De layerNum mirror 0 style

Defines the options for the text. The text is rendered on layer layerNum. If mirror is 1, the text is rendered normal; if it is 0 it is mirrored. Setting style to Normal renders the text normal and Italic renders the text italic.

$MIRE

$COTATION

Track, vias and Zone section

$TRACK

Comes in Po, De pairs. Example:

Po 0 38900 95200 39500 95800 80 -1
De 0 0 1 0 80000


Po function x1 y1 x2 y2 width ?

  • function must be 0 (only straight line segments, no arcs or circles as in $DRAWSEGMENT)

De layer ? net ? flags

flags bitfield: Unknown length (probably 32 bit), printed as hex with leading 0's truncated.
Binary: ???? ???? al?? ????  ???? ????  ???? ????
a = Autorouted Flag
l = (Segment?) Locked Flag

 

Example: (open a new .brd file, add a track, save it - and then insert/replace the changes below in a text editor; no nets are assigned)


(FIXME: add an example of "(kicad_pcb (version 3)".)

PCBNEW-BOARD Version 1 date 2012-03-18T07:15:54 CET
# Created by Pcbnew(2010-00-09 BZR 23xx)-stable
$GENERAL
LayerCount 6
Ly 1FFF801F
EnabledLayers 1FFF801F
....
$TRACK
# gray track (Inner4 - jumper layer):
Po 0 32000 25250 32000 23250 80 -1
De 3 0 0 0 0
#
# red track (front layer):
Po 0 24250 10750 24250 25250 80 -1
De 15 0 0 0 0
#
# green track (back layer):
Po 0 24250 25250 30000 25250 80 -1
De 0 0 0 0 0
#
# via between red and green track:
Po 3 24250 25250 24250 25250 350 -1
De 15 1 0 0 0
#
$EndTRACK
...

$ZONE

$CZONE_OUTLINE

$EndBOARD

Historical notes

Version 3 and later

As of 2013, the PCBnew application creates ".kicad_pcb" files that begin with "(kicad_pcb (version 3)", and for files from KiCad 4.0.x, "(kicad_pcb (version 4)".

All distances are in millimeters. If the distance is not an integer number of millimeters, the distance will be indicated with a decimal point. For example, the vast majority of PCBs have a board thickness of 1/16 inch ~= 1.6 mm,[2] so Version 3/4 board files often have a line

   (thickness 1.6002)

(The internal PCBnew unit of length is now an integer multiple of 1 nanometer, which enables representation of metric units and imperial units down to 1/100 mil = 1/100,000 inch.[3][4])

Version 2

Earlier versions of the PCBnew application create ".brd" files that begin with "PCBNEW-BOARD Version 2". Such files typically have a line:

   Units mm

indicating that all distances are in millimeters. If the distance is not an integer number of millimeters, the distance will be indicated with a decimal point. For example, the vast majority of PCBs have a board thickness of 1/16 inch ~= 1.6 mm,[2] so Version 2 board files often have a line:

   BoardThickness 1.6002

Version 1

The earliest (?) versions of the PCBnew application created ".brd" files that begin with "PCBNEW-BOARD Version 1". Such files have all distances in integer multiples of some tiny reference unit. Typically such files have a line:

   InternalUnit 0.000100 INCH

indicating that all distances are in integer multiples of 1/10,000 of an inch, which was once the internal PCBnew unit of length.[5] For example, the vast majority of PCBs have a board thickness of 1/16 inch ~= 0.063 inch,[2] so Version 1 board files often have a line:

   BoardThickness 630

License

GNU Free Documentation License

Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

0. PREAMBLE

The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque".

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.

The "publisher" means any person or entity that distributes copies of the Document to the public.

A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition.

The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may publicly display copies.

3. COPYING IN QUANTITY

If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

4. MODIFICATIONS

You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

  1. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
  2. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
  3. State on the Title page the name of the publisher of the Modified Version, as the publisher.
  4. Preserve all the copyright notices of the Document.
  5. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
  6. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
  7. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.
  8. Include an unaltered copy of this License.
  9. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
  10. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
  11. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
  12. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
  13. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified version.
  14. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section.
  15. Preserve any Warranty Disclaimers.

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.

You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties—for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements".

6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

7. AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

8. TRANSLATION

Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

9. TERMINATION

You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.

However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.

10. FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.

Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document.

11. RELICENSING

"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site.

"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.

"Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document.

An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.

The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.

How to use this License for your documents

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

Copyright (c) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this:

with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.

  1. "KiCad File Formats".
  2. a b c Practical Electronics/PCB Layout#Board Thickness and Layers
  3. "KiCad: Internal unit system".
  4. "All dimensions are stored as integer nanometers."--"Pcbnew reference manual".
  5. "KiCad: Convert Internal CPB Units to 1nm".