

KiCad automation utility
- Size
- 97.6 × 48.3 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 2
- Nets
- 28
- Pads
- 52
- Tracks, vias
- 0, 0
- Routed
- Not yet
- KiCad
- KiCad 6 (file 20211014)
- Created
- 12 Oct 2021
- Updated
- 20 Mar 2023
Overview
Lcd is an open-source printed circuit board by apcountryman, from the apcountryman/KiBot repository on GitHub, published under the AGPL-3.0 licence. It is a 2-layer board of 97.6 × 48.3 mm with 2 parts on 28 nets.
It belongs with the lEDs and displays boards of this library.
README
README.mdKiBot (formerly KiPlot)

This is the documentation for KiBot v1.6.1 for the current development read here.
Important for CI/CD:
- The GitHub actions now use the full/test docker images. So now they include PanDoc and also Blender.
New on v1.6.1
- KiCad 7.0.1 support
Index
- Introduction
- Installation
- Configuration
- Usage
- Usage for CI/CD
- Contributing
- Notes about Gerber format
- Notes about the position file
- Notes about 3D models
- Proposed advanced KiCad usage
- Credits
Introduction
KiBot is a program which helps you to generate the fabrication and documentation files for your KiCad projects easily, repeatable, and most of all, scriptably. This means you can use a Makefile to export your KiCad PCBs just as needed, or do it in a CI/CD environment.
For example, it's common that you might want for each board rev:
- Check ERC/DRC one last time (using KiCad Automation Scripts)
- Gerbers, drills and drill maps for a fab in their favourite format
- Fab docs for the assembler, including the BoM (Bill of Materials), costs spreadsheet and board view
- Pick and place files
- PCB 3D model in STEP, VRML and PCB3D formats
- PCB 3D render in PNG format
- Compare PCB/SCHs
- Panelization
- Stencil creation
You want to do this in a one-touch way, and make sure everything you need to do so is securely saved in version control, not on the back of an old datasheet.
KiBot lets you do this. The following picture depicts the data flow:

If you want to see this concept applied to a real world project visit the Spora CI/CD example.
Installation
KiBot main target is Linux, but some users successfully use it on Windows. For Windows you'll need to install tools to mimic a Linux environment. Running KiBot on MacOSX should be possible now that KiCad migrated to Python 3.x.
You can also run KiBot using docker images in a CI/CD environment like GitHub or GitLab. In this case you don't need to install anything locally.
Dependencies
Notes:
- When installing from the Debian repo you don't need to worry about dependencies, just pay attention to recommended and suggested packages.
- When installing using
pipthe dependencies marked with
will be automatically installed. - The dependencies marked with
can be downloaded on-demand by KiBot.
Note this is poorly tested and is mostly oriented to 64 bits Linux systems. Please report problems. - The
kibot-checktool can help you to know which dependencies are missing. - Note that on some systems (i.e. Debian) ImageMagick disables PDF manipulation in its
policy.xmlfile. Comment or remove lines like this:<policy domain="coder" rights="none" pattern="PDF" />(On Debian:/etc/ImageMagick-6/policy.xml)
Link to Debian stable package.
This is a Python module, not a separated tool.
This is an independent tool, can be a binary or a Python script.
- Mandatory
- Mandatory
KiCad Automation tools v2.2.1 

- Mandatory for:
dxf_sch_print,gencad,hpgl_sch_print,netlist,pdf_pcb_print,pdf_sch_print,ps_sch_print,render_3d,run_drc,run_erc,step,svg_pcb_print,svg_sch_print,update_xml,vrml - Optional to:
- Compare schematics for
diff(v2.2.0) - Show KiAuto installation information for
info(v2.0.0) - Print the page frame in GUI mode for
pcb_print(v1.6.7)
- Compare schematics for
KiKit v1.3.0.4

- Mandatory for:
panelize,stencil_3d,stencil_for_jig - Optional to separate multiboard projects for general use
- Mandatory for:
pcb_print,pcbdraw
- Mandatory for:
stencil_3d,stencil_for_jig
- Mandatory for:
stencil_3d,stencil_for_jig
- Mandatory for:
stencil_3d,stencil_for_jig
KiCost v1.1.8

- Mandatory for
kicost - Optional to find components costs and specs for
bom
Blender v3.4.0

- Mandatory for
blender_export
Interactive HTML BoM v2.4.1.4

- Mandatory for
ibom
KiBoM v1.8.0

- Mandatory for
kibom
KiCad PCB/SCH Diff v2.4.4

- Mandatory for
diff
- Mandatory for
kikit_present
- Mandatory for
populate
- Mandatory for
qr_lib
- Optional to get color messages in a portable way for general use
- Optional to:
- Compare with files in the repo for
diff - Find commit hash and/or date for
kikit_present - Find commit hash and/or date for
pcb_replace - Find commit hash and/or date for
sch_replace - Find commit hash and/or date for
set_text_variables
- Compare with files in the repo for
- Optional to:
- Automatically crop images for
blender_export - Create outputs preview for
navigate_results - Create monochrome prints and scaled PNG files for
pcb_print - Create JPG and BMP images for
pcbdraw - Automatically crop images for
render_3d
- Automatically crop images for
- Optional to:
- Create outputs preview for
navigate_results - Create PNG icons for
navigate_results - Create PDF, PNG, PS and EPS formats for
pcb_print - Create PNG, JPG and BMP images for
pcbdraw
- Create outputs preview for
- Optional to:
- Run external commands to create replacement text for
pcb_replace - Run external commands to create replacement text for
sch_replace - Run external commands to create replacement text for
set_text_variables
- Run external commands to create replacement text for
- Optional to:
- Create outputs preview for
navigate_results - Create PNG, PS and EPS formats for
pcb_print
- Create outputs preview for
- Optional to automatically adjust SVG margin for
pcbdraw
- Optional to create PDF/ODF/DOCX files for
report - Note: In CI/CD environments: the
kicad_auto_testdocker image contains it.
- Optional to compress in RAR format for
compress
- Optional to create XLSX files for
bom
Installation on Ubuntu or Debian
The easiest way is to use the repo, but if you want to manually install the individual .deb files you can:
Get the Debian package from the releases section and run:
sudo apt install ./kibot*_all.debImportant note: Sometimes the release needs another packages that aren't part of the stable Debian distribution. In this case the packages are also included in the release page. As an example version 0.6.0 needs:
sudo apt install ./python3-mcpy_2.0.2-1_all.deb ./kibot_0.6.0-1_all.debImportant note: The KiCad Automation Scripts packages are a mandatory dependency. The KiBoM, InteractiveHtmlBom and PcbDraw are recommended.
Installation using pip
pip install --no-compile kibotNote that pip has the dubious idea of compiling everything it downloads.
There is no advantage in doing it and it interferes with the mcpy macros.
Also note that in modern Linux systems pip was renamed to pip3, to avoid confusion with pip from Python 2.
If you are installing at system level I recommend generating the compilation caches after installing.
As root just run:
kibot --help-outputs > /dev/nullNote that pip will automatically install all the needed Python dependencies.
But it won't install other interesting dependencies.
In particular you should take a look at the KiCad Automation Scripts dependencies.
If you have a Debian based OS I strongly recommend trying to use the .deb packages for all the tools.
If you want to install the code only for the current user add the --user option.
If you want to install the last git code from GitHub using pip use:
pip3 install --user git+https://github.com/INTI-CMNB/KiBot.gitYou can also clone the repo, change to its directory and install using:
pip3 install --user -e .In this way you can change the code and you won't need to install again.
Notes about virtualenv
If you try to use a Python virtual environment you'll need to find a way to make the KiCad module (pcbnew) available on it.
I don't know how to make it.
In addition: note that the virtual env will change the system share data paths. They will no longer point to things like /usr/share/
but to a virtual env place. So you'll need to either define environment variables to tell KiBot where are the libs or just add
symlinks from the virtual env to the system level libs.
Installation on other targets
- Install KiCad 5.1.6 or newer
- Install Python 3.5 or newer
- Install the Python Yaml and requests modules
- Run the script src/kibot
Configuration
KiBot uses a configuration file where you can specify what outputs to generate and which preflight (before launching the outputs generation) actions to perform. By default you'll generate all of them, but you can specify which ones from the command line.
The configuration file should be named using the .kibot.yaml suffix, i.e. my_project.kibot.yaml. The format used is YAML. This is basically a text file with some structure. This file can be compressed using gzip file format.
If you never used YAML read the following explanation. Note that the explanation could be useful even if you know YAML.
Quick start
If you want to learn by examples, or you just want to take a look a what
KiBot can do, you can use the --quick-start command line option.
First change to the directory where your project (or projects) is located. Now run KiBot like this:
kibot --quick-startThis will look for KiCad projects starting from the current directory and going down the directory structure. For each project found KiBot will generate a configuration file showing some common outputs. After creating the configuration files KiBot will start the outputs generation.
Here is an example of what's generated using the following example repo.
You can use the generated files as example of how to configure KiBot. If you want to just generate the configuration files and not the outputs use:
kibot --quick-start --dryIf you want to know about all the possible options for all the available outputs you can try:
kibot --exampleThis will generate a configuration file with all the available outputs and all their options.
Section order
The file is divided in various sections. Some of them are optional.
The order in which they are declared is not relevant, they are interpreted in the following order:
kiplot/kibotsee The headerimportsee Importing outputs from another file, Importing filters and variants from another file and Importing internal templatesglobalsee Default global optionsfilterssee Filters and variantsvariantssee Filters and variantspreflightsee The preflight sectionoutputssee The outputs sectiongroupssee Grouping outputs
The header
All configuration files must start with:
kibot:
version: 1This tells to KiBot that this file is using version 1 of the format.
The preflight section
This section is used to specify tasks that will be executed before generating any output.
Supported preflight options:
annotate_pcb: [dict] Annotates the PCB according to physical coordinates. This preflight modifies the PCB and schematic, use it only in revision control environments. Used to assign references according to footprint coordinates. The project must be fully annotated first.- Valid keys:
bottom_main_ascending: [boolean=true] Sort the main axis in ascending order for the bottom layer. For X this is left to right and for Y top to bottom.bottom_main_axis: [string='y'] [x,y] Use this axis as main sorting criteria for the bottom layer.bottom_secondary_ascending: [boolean=true] Sort the secondary axis in ascending order for the bottom layer. For X this is left to right and for Y top to bottom.bottom_start: [number=101] First number for references at the bottom layer. Use -1 to continue from the last top reference.grid: [number=1.0] Grid size in millimeters.top_main_ascending: [boolean=true] Sort the main axis in ascending order for the top layer. For X this is left to right and for Y top to bottom.top_main_axis: [string='y'] [x,y] Use this axis as main sorting criteria for the top layer.top_secondary_ascending: [boolean=true] Sort the secondary axis in ascending order for the top layer. For X this is left to right and for Y top to bottom.top_start: [number=1] First number for references at the top layer.use_position_of: [string='footprint'] [footprint,reference] Which coordinate is used.
- Valid keys:
annotate_power: [boolean=false] Annotates all power components. This preflight modifies the schematic, use it only in revision control environments. Used to solve ERC problems when using filters that remove power reference numbers.check_zone_fills: [boolean=false] Zones are filled before doing any operation involving PCB layers. The original PCB remains unchanged.erc_warnings: [boolean=false] Option forrun_erc. ERC warnings are considered errors.fill_zones: [boolean=false] Fill all zones again and save the PCB.filters: [list(dict)] A list of entries to filter out ERC/DRC messages. Note that ignored errors will become KiBot warnings (i.e.(W058) ...). To farther ignore these warnings use thefiltersoption in theglobalsection.- Valid keys:
error: [string=''] Error id we want to exclude. A name for KiCad 6 or a number for KiCad 5, but always a string.- error_number: Alias for number.
filter: [string=''] Name for the filter, for documentation purposes.- filter_msg: Alias for filter.
number: [number=0] Error number we want to exclude. KiCad 5 only.regex: [string=''] Regular expression to match the text for the error we want to exclude.- regexp: Alias for regex.
- Valid keys:
ignore_unconnected: [boolean=false] Option forrun_drc. Ignores the unconnected nets. Useful if you didn't finish the routing. It will also ignore KiCad 6 warnings.pcb_replace: [dict] Replaces tags in the PCB. I.e. to insert the git hash or last revision date. This is useful for KiCad 5, useset_text_variableswhen using KiCad 6. This preflight modifies the PCB. Even when a back-up is done use it carefully.- Valid keys:
date_command: [string=''] Command to get the date to use in the PCB.
git log -1 --format='%as' -- "$KIBOT_PCB_NAME"
Will return the date in YYYY-MM-DD format.
date -d @`git log -1 --format='%at' -- "$KIBOT_PCB_NAME"` +%Y-%m-%d_%H-%M-%S
Will return the date in YYYY-MM-DD_HH-MM-SS format.
Important: on KiCad 6 the title block data is optional. This command will work only if you have a date in the PCB/Schematic.replace_tags: [dict|list(dict)] Tag or tags to replace.- Valid keys:
after: [string=''] Text to add after the output ofcommand.before: [string=''] Text to add before the output ofcommand.command: [string=''] Command to execute to get the text, will be used only iftextis empty. KIBOT_PCB_NAME variable is the name of the current PCB.tag: [string=''] Name of the tag to replace. Useversionfor a tag named@version@.tag_delimiter: [string='@'] Character used to indicate the beginning and the end of a tag. Don't change it unless you really know about KiCad's file formats.text: [string=''] Text to insert instead of the tag.
- Valid keys:
- Valid keys:
run_drc: [boolean=false] Runs the DRC (Distance Rules Check). To ensure we have a valid PCB. The report file name is controlled by the global output pattern (%i=drc %x=txt). Note that the KiCad 6+ Test for parity between PCB and schematic option is not supported. If you need to check the parity use theupdate_xmlpreflight. KiCad 6 introducedwarningsthey are currently counted be theunconnectedcounter of KiBot. This will change in the future.run_erc: [boolean=false] Runs the ERC (Electrical Rules Check). To ensure the schematic is electrically correct. The report file name is controlled by the global output pattern (%i=erc %x=txt).sch_replace: [dict] Replaces tags in the schematic. I.e. to insert the git hash or last revision date. This is useful for KiCad 5, useset_text_variableswhen using KiCad 6. This preflight modifies the schematics. Even when a back-up is done use it carefully.- Valid keys:
date_command: [string=''] Command to get the date to use in the SCH.
git log -1 --format='%as' -- "$KIBOT_SCH_NAME"
Will return the date in YYYY-MM-DD format.
date -d @`git log -1 --format='%at' -- "$KIBOT_SCH_NAME"` +%Y-%m-%d_%H-%M-%S
Will return the date in YYYY-MM-DD_HH-MM-SS format.
Important: on KiCad 6 the title block data is optional. This command will work only if you have a date in the SCH/Schematic.replace_tags: [dict|list(dict)] Tag or tags to replace.- Valid keys:
after: [string=''] Text to add after the output ofcommand.before: [string=''] Text to add before the output ofcommand.command: [string=''] Command to execute to get the text, will be used only iftextis empty. KIBOT_SCH_NAME variable is the name of the current sheet. KIBOT_TOP_SCH_NAME variable is the name of the top sheet.tag: [string=''] Name of the tag to replace. Useversionfor a tag named@version@.tag_delimiter: [string='@'] Character used to indicate the beginning and the end of a tag. Don't change it unless you really know about KiCad's file formats.text: [string=''] Text to insert instead of the tag.
- Valid keys:
- Valid keys:
set_text_variables: [dict|list(dict)] Defines KiCad 6 variables. They are expanded using ${VARIABLE}, and stored in the project file. This preflight replacespcb_replaceandsch_replacewhen using KiCad 6. The KiCad project file is modified.- Valid keys:
after: [string=''] Text to add after the output ofcommand.before: [string=''] Text to add before the output ofcommand.command: [string=''] Command to execute to get the text, will be used only iftextis empty. This command will be executed using the Bash shell. Be careful about spaces in file names (i.e. use "$KIBOT_PCB_NAME"). TheKIBOT_PCB_NAMEenvironment variable is the PCB file and theKIBOT_SCH_NAMEenvironment variable is the schematic file.expand_kibot_patterns: [boolean=true] Expand %X patterns. The context isschematic.name: [string=''] Name of the variable. Theversionvariable will be expanded using${version}.text: [string=''] Text to insert instead of the variable.- variable: Alias for name.
- Valid keys:
update_qr: [boolean=false] Update the QR codes. Complements theqr_liboutput. The KiCad 6 files and the KiCad 5 PCB needs manual update, generating a new library isn't enough.update_xml: [boolean=false|dict] Update the XML version of the BoM (Bill of Materials). To ensure our generated BoM is up to date. Note that this isn't needed when using the internal BoM generator (bom). You can compare the PCB and schematic netlists using it.- Valid keys:
check_pcb_parity: [boolean=false] Check if the PCB and Schematic are synchronized. This is equivalent to the Test for parity between PCB and schematic of the DRC dialog. Only available for KiCad 6.as_warnings: [boolean=false] Inform the problems as warnings and don't stop.enabled: [boolean=true] Enable the update. This is the replacement for the boolean value.
- Valid keys:
Here is an example of a preflight section:
preflight:
run_erc: true
update_xml: true
run_drc: true
check_zone_fills: true
ignore_unconnected: falseMore about pcb_replace and sch_replace
These options are supposed to be used in a version control environment. This is because, unlike other options, they modify the PCB and/or schematic and might damage them. In a version control environment you can just roll-back the changes.
Don't be afraid, they make a back-up of the files and also tries to disable dangerous changes. But should be used carefully. They are ideal for CI/CD environment where you don't actually commit any changes.
Filtering DRC and ERC errors
Sometimes KiCad reports DRC or ERC errors that you can't get rid off. This could be just because you are part of a team including lazy people that doesn't want to take the extra effort to solve some errors that aren't in fact errors, just small violations made on purpose. In this case you could exclude some known errors.
For this you must declare filters entry in the preflight section. Then you can add as many filter entries as you want.
Each filter entry has an optional description and defines to which error type is applied (number) and a regular expression
that the error must match to be ignored (regex). Like this:
filters:
- filter: 'Optional filter description'
error: 'Error_type'
regex: 'Expression to match'Here is a KiCad 5 example, suppose you are getting the following errors:
** Found 1 DRC errors **
ErrType(4): Track too close to pad
@(177.185 mm, 78.315 mm): Track 1.000 mm [Net-(C3-Pad1)] on F.Cu, length: 1.591 mm
@(177.185 mm, 80.715 mm): Pad 2 of C3 on F.Cu and others
** Found 1 unconnected pads **
ErrType(2): Unconnected items
@(177.185 mm, 73.965 mm): Pad 2 of C4 on F.Cu and others
@(177.185 mm, 80.715 mm): Pad 2 of C3 on F.Cu and othersAnd you want to ignore them. You can add the following filters:
filters:
- filter: 'Ignore C3 pad 2 too close to anything'
error: '4'
regex: 'Pad 2 of C3'
- filter: 'Ignore unconnected pad 2 of C4'
error: '2'
regex: 'Pad 2 of C4'If you need to match text from two different lines in the error message try using (?s)TEXT(.*)TEXT_IN_OTHER_LINE.
If you have two or more different options for a text to match try using (OPTION1|OPTION2).
A complete Python regular expressions explanation is out of the scope of this manual. For a complete reference consult the Python manual.
KiCad 6 uses strings to differentiate errors, use them for the error field. To keep compatibility you can use the number or error_number options for KiCad 5.
Note that this will ignore the errors, but they will be reported as warnings. If you want to suppress these warnings take a look at Filtering KiBot warnings
Important note: this will create a file named kibot_errors.filter in the output directory.
Default global options
The section global contains default global options that affects all the outputs.
Currently only a few option are supported.
Default output option
This option controls the default file name pattern used by all the outputs. This makes all the file names coherent. You can always choose the file name for a particular output.
The pattern uses the following expansions:
- %c company from pcb/sch metadata.
- %C
ncomments linenfrom pcb/sch metadata. - %d pcb/sch date from metadata if available, file modification date otherwise.
- %D date the script was started.
- %f original pcb/sch file name without extension.
- %F original pcb/sch file name without extension. Including the directory part of the name.
- %g the
file_idof the global variant. - %G the
nameof the global variant. - %i a contextual ID, depends on the output type.
- %I an ID defined by the user for this output.
- %p pcb/sch title from pcb metadata.
- %r revision from pcb/sch metadata.
- %S sub-PCB name (related to multiboards).
- %T time the script was started.
- %x a suitable extension for the output type.
- %v the
file_idof the current variant, or the global variant if outside a variant scope. - %V the
nameof the current variant, or the global variant if outside a variant scope.
They are compatible with the ones used by IBoM.
The default value for global.output is %f-%i%I%v.%x.
If you want to include the revision you could add the following definition:
global:
output: '%f_rev_%r-%i.%x'Note that the following patterns: %c, %Cn, %d, %f, %F, %p and %r depends on the context.
If you use them for an output related to the PCB these values will be obtained from the PCB.
If you need to force the origin of the data you can use %bX for the PCB and %sX for the schematic, where
X is the pattern to expand.
You can also use text variables (introduced in KiCad 6). To expand a text variable use ${VARIABLE}.
Default dir option
The default dir value for any output is .. You can change it here.
Expansion patterns are allowed.
Note that you can use this value as a base for output's dir options. In this case the value defined in the output must start with +.
In this case the + is replaced by the default dir value defined here.
Default variant option
This option controls the default variant applied to all the outputs. Example:
global:
variant: 'production'Default units option
This option controls the default value for the position and bom outputs.
If you don't define it then the internal defaults of each output are applied. But when you define it the default is the defined value.
On KiCad 6 the dimensions has units. When you create a new dimension it uses automatic units. This means that KiCad uses the units currently selected.
This selection isn't stored in the PCB file. The global units value is used by KiBot instead.
Output directory option
The out_dir option can define the base output directory. This is the same as the -d/--out-dir command line option.
Note that the command line option has precedence over it.
Expansion patterns are applied to this value, but you should avoid using patterns that expand according to the context, i.e. %c, %d, %f, %F, %p and %r. The behavior of these patterns isn't fully defined in this case and the results may change in the future.
You can also use text variables (introduced in KiCad 6). To expand a text variable use ${VARIABLE}.
Date format option
- The %d, %sd and %bd patterns use the date and time from the PCB and schematic.
When abscent they use the file timestamp, and the
date_time_formatglobal option controls the format used. When available, and in ISO format, thedate_formatcontrols the format used. You can disable this reformatting assigningfalseto thedate_reformatoption. - The %D format is controlled by the
date_formatglobal option. - The %T format is controlled by the
time_formatglobal option.
In all cases the format is the one used by the strftime POSIX function, for more information visit this site.
PCB details options
The following variables control the default colors and they are used for documentation purposes:
pcb_material[FR4] PCB core material. Currently known are FR1 to FR5solder_mask_color[green] Color for the solder mask. Currently known are green, black, white, yellow, purple, blue and red.silk_screen_color[white] Color for the markings. Currently known are black and white.pcb_finish[HAL] Finishing used to protect pads. Currently known are None, HAL, HASL, ENIG and ImAg.
Filtering KiBot warnings
KiBot warnings are marked with (Wn) where n is the warning id.
Some warnings are just recommendations and you could want to avoid them to focus on details that are more relevant to your project. In this case you can define filters in a similar way used to filter DRC/ERC errors.
As an example, if you have the following warning:
WARNING:(W43) Missing component `l1:FooBar`You can create the following filter to remove it:
global:
filters:
- number: 43
regex: 'FooBar'All available global options
global:
- Valid keys:
aliases_for_3d_models: [list(dict)] List of aliases for the 3D models (KiCad 6). KiCad stores 3D aliases with the user settings, not locally. This makes impossible to create self contained projects. You can define aliases here to workaround this problem. The values defined here has precedence over the KiCad configuration. Related to https://gitlab.com/kicad/code/kicad/-/issues/3792.- Valid keys:
- alias: Alias for name.
name: [string=''] Name of the alias.- text: Alias for value.
value: [string=''] Path to the 3D model.- variable: Alias for name.
- Valid keys:
allow_blind_buried_vias: [boolean=true] Allow the use of buried vias. This value is only used for KiCad 7+. For KiCad 5 and 6 use the design rules settings, stored in the project.allow_microvias: [boolean=true] Allow the use of micro vias. This value is only used for KiCad 7+. For KiCad 5 and 6 use the design rules settings, stored in the project.castellated_pads: [boolean=false] Has the PCB castellated pads? KiCad 6: you should set this in the Board Setup -> Board Finish -> Has castellated pads.- copper_finish: Alias for pcb_finish.
copper_thickness: [number|string] Copper thickness in micrometers (1 Oz is 35 micrometers). KiCad 6: you should set this in the Board Setup -> Physical Stackup.cross_footprints_for_dnp: [boolean=true] Draw a cross for excluded components in theFablayer.cross_no_body: [boolean=false] Cross components even when they don't have a body. Only for KiCad 6 and internal cross.cross_using_kicad: [boolean=true] When using KiCad 7+ let KiCad cross the components.csv_accept_no_ref: [boolean=false] Accept aggregating CSV files without references (Experimental).date_format: [string='%Y-%m-%d'] Format used for the day we started the script. Is also used for the PCB/SCH date formatting whentime_reformatis enabled (default behavior). Uses thestrftimeformat.date_time_format: [string='%Y-%m-%d_%H-%M-%S'] Format used for the PCB and schematic date when using the file timestamp. Uses thestrftimeformat.dir: [string=''] Default pattern for the output directories. It also applies to the preflights, unlessuse_dir_for_preflightsis disabled.disable_3d_alias_as_env: [boolean=false] Disable the use of environment and text variables as 3D models aliases.drc_exclusions_workaround: [boolean=false] KiCad 6 introduced DRC exclusions. They are stored in the project but ignored by the Python API. This is reported as bug number 11562 (https://gitlab.com/kicad/code/kicad/-/issues/11562). If you really need exclusions enable this option, this will use the GUI version of the DRC (slower). Current KiCad version is 6.0.7 and the bug is still there.drill_size_increment: [number=0.05] This is the difference between drill tools in millimeters. A manufacturer with 0.05 of increment has drills for 0.1, 0.15, 0.2, 0.25, etc..edge_connector: [string='no'] [yes,no,bevelled] Has the PCB edge connectors? KiCad 6: you should set this in the Board Setup -> Board Finish -> Edge card connectors.edge_plating: [boolean=false] Has the PCB a plated board edge? KiCad 6: you should set this in the Board Setup -> Board Finish -> Plated board edge.environment: [dict] Used to define environment variables used by KiCad. The values defined here are exported as environment variables and has more precedence than KiCad paths defined in the GUI. You can make reference to any OS environment variable using ${VARIABLE}. The KIPRJMOD is also available for expansion.- Valid keys:
define_old: [boolean=false] Also define legacy versions of the variables. Useful when using KiCad 6 and some libs uses old KiCad 5 names.footprints: [string=''] System level footprints (aka modules) dir. KiCad 5: KICAD_FOOTPRINT_DIR and KISYSMOD. KiCad 6: KICAD6_FOOTPRINT_DIR.models_3d: [string=''] System level 3D models dir. KiCad 5: KISYS3DMOD. KiCad 6: KICAD6_3DMODEL_DIR.symbols: [string=''] System level symbols dir. KiCad 5: KICAD_SYMBOL_DIR. KiCad 6: KICAD6_SYMBOL_DIR.templates: [string=''] System level templates dir. KiCad 5: KICAD_TEMPLATE_DIR. KiCad 6: KICAD6_TEMPLATE_DIR.third_party: [string=''] 3rd party dir. KiCad 6: KICAD6_3RD_PARTY.user_templates: [string=''] User level templates dir. KiCad 5/6: KICAD_USER_TEMPLATE_DIR.
- Valid keys:
erc_grid: [number=50] Grid size used for the ERC. This value must be in mils. This is needed for KiCad 7 in order to run the off grid check. Shouldn't be needed in KiCad 8. https://gitlab.com/kicad/code/kicad/-/issues/14110.extra_pth_drill: [number=0.1] How many millimeters the manufacturer will add to plated holes. This is because the plating reduces the hole, so you need to use a bigger drill. For more information consult: https://www.eurocircuits.com/pcb-design-guidelines/drilled-holes/.field_3D_model: [string='_3D_model'] Name for the field controlling the 3D models used for a component.field_lcsc_part: [string=''] The name of the schematic field that contains the part number for the LCSC/JLCPCB distributor. When empty KiBot will try to discover it.filters: [list(dict)] KiBot warnings to be ignored.- Valid keys:
error: [string=''] Error id we want to exclude.- error_number: Alias for number.
filter: [string=''] Name for the filter, for documentation purposes.- filter_msg: Alias for filter.
number: [number=0] Error number we want to exclude.regex: [string=''] Regular expression to match the text for the error we want to exclude.- regexp: Alias for regex.
- Valid keys:
hide_excluded: [boolean=false] Default value for thehide_excludedoption of various PCB outputs.impedance_controlled: [boolean=false] The PCB needs specific dielectric characteristics. KiCad 6: you should set this in the Board Setup -> Physical Stackup.kiauto_time_out_scale: [number=0.0] Time-out multiplier for KiAuto operations.kiauto_wait_start: [number=0] Time to wait for KiCad in KiAuto operations.kicad_dnp_applied: [boolean=true] The KiCad v7 PCB flag Do Not Populate is applied to our fitted flag before running any filter.kicad_dnp_applies_to_3D: [boolean=true] The KiCad v7 PCB flag Do Not Populate is applied to our fitted flag for 3D models, even when no filter/variant is specified. Disablingkicad_dnp_appliedalso disables this flag.out_dir: [string=''] Base output dir, same as command line--out-dir.output: [string='%f-%i%I%v.%x'] Default pattern for output file names. Affected by global options.pcb_finish: [string='HAL'] Finishing used to protect pads. Currently used for documentation and to choose default colors. KiCad 6: you should set this in the Board Setup -> Board Finish -> Copper Finish option. Currently known are None, HAL, HASL, HAL SnPb, HAL lead-free, ENIG, ENEPIG, Hard gold, ImAg, Immersion Silver, Immersion Ag, ImAu, Immersion Gold, Immersion Au, Immersion Tin, Immersion Nickel, OSP and HT_OSP.pcb_material: [string='FR4'] PCB core material. Currently used for documentation and to choose default colors. Currently known are FR1 to FR5.remove_adhesive_for_dnp: [boolean=true] When applying filters and variants remove the adhesive (glue) for components that won't be included.remove_solder_paste_for_dnp: [boolean=true] When applying filters and variants remove the solder paste for components that won't be included.restore_project: [boolean=false] Restore the KiCad project after execution. Note that this option will undo operations likeset_text_variables.set_text_variables_before_output: [boolean=false] Run theset_text_variablespreflight before running each output that involves variants. This can be used when a text variable uses the variant and you want to create more than one variant in the same run. Note that this could be slow because it forces a board reload each time you run an output that uses variants.silk_screen_color: [string='white'] Color for the markings. Currently used for documentation and to choose default colors. KiCad 6: you should set this in the Board Setup -> Physical Stackup. Currently known are black and white.silk_screen_color_bottom: [string=''] Color for the bottom silk screen. When not definedsilk_screen_coloris used. Readsilk_screen_colorhelp.silk_screen_color_top: [string=''] Color for the top silk screen. When not definedsilk_screen_coloris used. Readsilk_screen_colorhelp.solder_mask_color: [string='green'] Color for the solder mask. Currently used for documentation and to choose default colors. KiCad 6: you should set this in the Board Setup -> Physical Stackup. Currently known are green, black, white, yellow, purple, blue and red.solder_mask_color_bottom: [string=''] Color for the bottom solder mask. When not definedsolder_mask_coloris used. Readsolder_mask_colorhelp.solder_mask_color_top: [string=''] Color for the top solder mask. When not definedsolder_mask_coloris used. Readsolder_mask_colorhelp.time_format: [string='%H-%M-%S'] Format used for the time we started the script. Uses thestrftimeformat.time_reformat: [boolean=true] Tries to reformat the PCB/SCH date using thedate_format. This assumes you let KiCad fill this value and hence the time is in ISO format (YY-MM-DD).units: [string=''] [millimeters,inches,mils] Default units. Affectsposition,bomandpanelizeoutputs. Also KiCad 6 dimensions.use_dir_for_preflights: [boolean=true] Use the globaldiras subdir for the preflights.variant: [string=''] Default variant to apply to all outputs.
Filters and variants
The filters and variants are mechanisms used to modify the circuit components. Both concepts are closely related. In fact variants can use filters.
The current implementation of the filters allow to exclude components from some of the processing stages. The most common use is to exclude them from some output. You can also change components fields/properties and also the 3D model.
Variants are currently used to create assembly variants. This concept is used to manufacture one PCB used for various products. You can learn more about KiBot variants on the following example repo. The example is currently using KiCad 6, if you want to see the example files for KiCad 5 go here.
As mentioned above the current use of filters is to mark some components. Mainly to exclude them, but also to mark them as special. This is the case of do not change components in the BoM.
Filters and variants are defined in separated sections. A filter section looks like this:
filters:
- name: 'a_short_name'
type: 'generic'
comment: 'A description'
# Filter optionsSupported filters:
- expand_text_vars: Expand_Text_Vars
This filter expands KiCad 6 text variables (${VARIABLE}).
- Valid keys:
comment: [string=''] A comment for documentation purposes.include_kicad_env: [boolean=true] Also expand KiCad environment variables.include_os_env: [boolean=false] Also expand system environment variables.name: [string=''] Used to identify this particular filter definition.
- Valid keys:
- field_modify: Field_Modify
Changes the content of one or more fields.
- Valid keys:
comment: [string=''] A comment for documentation purposes.fields: [string|list(string)='Datasheet'] Fields to convert.include: [string|list(string)=''] Name of the filter to select which components will be affected. Applied to all if nothing specified here.name: [string=''] Used to identify this particular filter definition.regex: [string='(https?://\S+)'] Regular expression to match the field content. Only fields that matches will be modified. An empty regex will match anything. The example matches an HTTP URL.replace: [string='\1'] Text to replace, can contain references to sub-expressions. The example converts an HTTP URL into an HTML link, like the URLify filter.
- Valid keys:
- field_rename: Field_Rename
This filter implements a field renamer.
The internal
_kicost_renamefilter emulates the KiCost behavior.- Valid keys:
comment: [string=''] A comment for documentation purposes.name: [string=''] Used to identify this particular filter definition.rename: [list(dict)] Fields to rename.- Valid keys:
field: [string=''] Name of the field to rename.name: [string=''] New name.
- Valid keys:
- Valid keys:
- generic: Generic filter
This filter is based on regular expressions.
It also provides some shortcuts for common situations.
Note that matches aren't case sensitive and spaces at the beginning and the end are removed.
The internal
_mechanicalfilter emulates the KiBoM behavior for default exclusions. The internal_kicost_dnpfilter emulates KiCost'sdnpfield.- Valid keys:
comment: [string=''] A comment for documentation purposes.config_field: [string='Config'] Name of the field used to classify components.config_separators: [string=' ,'] Characters used to separate options inside the config field.exclude_all_hash_ref: [boolean=false] Exclude all components with a reference starting with #.exclude_any: [list(dict)] A series of regular expressions used to exclude parts. If a component matches ANY of these, it will be excluded. Column names are case-insensitive.- Valid keys:
column: [string=''] Name of the column to apply the regular expression. Use_field_lcsc_partto get the value defined in the global options.- field: Alias for column.
invert: [boolean=false] Invert the regex match result.match_if_field: [boolean=false] Match if the field exists, no regex applied. Not affected byinvert.match_if_no_field: [boolean=false] Match if the field doesn't exists, no regex applied. Not affected byinvert.regex: [string=''] Regular expression to match.- regexp: Alias for regex.
skip_if_no_field: [boolean=false] Skip this test if the field doesn't exist.
- Valid keys:
exclude_bottom: [boolean=false] Exclude components on the bottom side of the PCB.exclude_config: [boolean=false] Exclude components containing a key value in the config field. Separators are applied.exclude_empty_val: [boolean=false] Exclude components with empty 'Value'.exclude_field: [boolean=false] Exclude components if a field is named as any of the keys.exclude_refs: [list(string)] List of references to be excluded. Use R* for all references with R prefix.exclude_smd: [boolean=false] Exclude components marked as smd in the PCB.exclude_tht: [boolean=false] Exclude components marked as through-hole in the PCB.exclude_top: [boolean=false] Exclude components on the top side of the PCB.exclude_value: [boolean=false] Exclude components if their 'Value' is any of the keys.exclude_virtual: [boolean=false] Exclude components marked as virtual in the PCB.include_only: [list(dict)] A series of regular expressions used to include parts. If there are any regex defined here, only components that match against ANY of them will be included. Column/field names are case-insensitive. If empty this rule is ignored.- Valid keys:
column: [string=''] Name of the column to apply the regular expression. Use_field_lcsc_partto get the value defined in the global options.- field: Alias for column.
invert: [boolean=false] Invert the regex match result.match_if_field: [boolean=false] Match if the field exists, no regex applied. Not affected byinvert.match_if_no_field: [boolean=false] Match if the field doesn't exists, no regex applied. Not affected byinvert.regex: [string=''] Regular expression to match.- regexp: Alias for regex.
skip_if_no_field: [boolean=false] Skip this test if the field doesn't exist.
- Valid keys:
invert: [boolean=false] Invert the result of the filter.keys: [string|list(string)=dnf_list] [dnc_list,dnf_list] List of keys to match. Thednf_listanddnc_listinternal lists can be specified as strings. Usednf_listfor ['dnf', 'dnl', 'dnp', 'do not fit', 'do not load', 'do not place', 'no stuff', 'nofit', 'noload', 'noplace', 'nostuff', 'not fitted', 'not loaded', 'not placed']. Usednc_listfor ['dnc', 'do not change', 'fixed', 'no change'].name: [string=''] Used to identify this particular filter definition.
- Valid keys:
- rot_footprint: Rot_Footprint
This filter can rotate footprints, used for the positions file generation.
Some manufacturers use a different rotation than KiCad.
The internal
_rot_footprintfilter implements the simplest case.- Valid keys:
comment: [string=''] A comment for documentation purposes.extend: [boolean=true] Extends the internal list of rotations with the one provided. Otherwise just use the provided list.invert_bottom: [boolean=false] Rotation for bottom components is negated, resulting in either:(- component rot - angle)or when combined withnegative_bottom,(angle - component rot).name: [string=''] Used to identify this particular filter definition.negative_bottom: [boolean=true] Rotation for bottom components is computed via subtraction as(component rot - angle).rotations: [list(list(string))] A list of pairs regular expression/rotation. Components matching the regular expression will be rotated the indicated angle.skip_bottom: [boolean=false] Do not rotate components on the bottom.skip_top: [boolean=false] Do not rotate components on the top.
- Valid keys:
- subparts: Subparts
This filter implements the KiCost subparts mechanism.
- Valid keys:
check_multiplier: [list(string)] List of fields to include for multiplier computation. If empty all fields insplit_fieldsandmanf_pn_fieldare used.comment: [string=''] A comment for documentation purposes.manf_field: [string='manf'] Field for the manufacturer name.manf_pn_field: [string='manf#'] Field for the manufacturer part number.modify_first_value: [boolean=true] Modify even the value for the first component in the list (KiCost behavior).modify_value: [boolean=true] Add '- p N/M' to the value.mult_separators: [string=':'] Separators used for the multiplier. Each character in this string is a valid separator.multiplier: [boolean=true] Enables the subpart multiplier mechanism.name: [string=''] Used to identify this particular filter definition.ref_sep: [string='#'] Separator used in the reference (i.e. R10#1).separators: [string=';,'] Separators used between subparts. Each character in this string is a valid separator.split_fields: [list(string)] List of fields to split, usually the distributors part numbers.split_fields_expand: [boolean=false] Whentruethe fields insplit_fieldsare added to the internal names.use_ref_sep_for_first: [boolean=true] Force the reference separator use even for the first component in the list (KiCost behavior).value_alt_field: [string='value_subparts'] Field containing replacements for theValuefield. So we get real values for split parts.
- Valid keys:
- urlify: URLify
Converts URL text in fields to HTML URLs.
- Valid keys:
comment: [string=''] A comment for documentation purposes.fields: [string|list(string)='Datasheet'] Fields to convert.name: [string=''] Used to identify this particular filter definition.
- Valid keys:
- var_rename: Var_Rename
This filter implements the VARIANT:FIELD=VALUE renamer to get FIELD=VALUE when VARIANT is in use.
- Valid keys:
comment: [string=''] A comment for documentation purposes.force_variant: [string=''] Use this variant instead of the current variant. Useful for IBoM variants.name: [string=''] Used to identify this particular filter definition.separator: [string=':'] Separator used between the variant and the field name.variant_to_value: [boolean=false] Rename fields matching the variant to the value of the component.
- Valid keys:
- var_rename_kicost: Var_Rename_KiCost
This filter implements the kicost.VARIANT:FIELD=VALUE renamer to get FIELD=VALUE when VARIANT is in use.
It applies the KiCost concept of variants (a regex to match the VARIANT).
The internal
_var_rename_kicostfilter emulates the KiCost behavior.- Valid keys:
comment: [string=''] A comment for documentation purposes.name: [string=''] Used to identify this particular filter definition.prefix: [string='kicost.'] A mandatory prefix. Is not case sensitive.separator: [string=':'] Separator used between the variant and the field name.variant: [string=''] Variant regex to match the VARIANT part. When empty the currently selected variant is used.variant_to_value: [boolean=false] Rename fields matching the variant to the value of the component.
- Valid keys:
Examples for filters
The tests/yaml_samples directory contains all the regression tests. Many of them test the filters functionality.
- int_bom_exclude_any.kibot.yaml: Shows how to use regular expressions to match fields and exclude components. Is the more powerful filter mechanism.
- int_bom_fil_1.kibot.yaml: Shows various mechanisms. In particular how to change the list of keywords, usually used to match 'DNF', meaning you can exclude components with arbitrary text.
- int_bom_fil_2.kibot.yaml: Shows how to use KiCad 5 module attributes (from the PCB) to filter SMD, THT and Virtual components. Note KiCad 6 is redefining the attributes.
- int_bom_include_only.kibot.yaml: Shows how to use regular expressions to match only some components, instead of including a few.
- int_bom_var_t2is_csv.kibot.yaml: Shows how to use filters and variants simultaneously, not a good idea, but possible.
- print_pdf_no_inductors_1.kibot.yaml: Shows how to change the
dnf_filterfor a KiBoM variant. - print_pdf_no_inductors_2.kibot.yaml: Shows how to do what
print_pdf_no_inductors_1.kibot.yamldoes but without the need of a variant.
Built-in filters
- _datasheet_link converts Datasheet fields containing URLs into HTML links
- _expand_text_vars is a default
expand_text_varsfilter - _kibom_dnc_Config it uses the internal
dnc_listto exclude components with- Value matching any of the keys
- Any of the keys in the
Configfield (comma or space separated)
- _kibom_dnf_Config it uses the internal
dnf_listto exclude components with- Value matching any of the keys
- Any of the keys in the
Configfield (comma or space separated)
- _kicost_dnp used emulate the way KiCost handles the
dnpfield.- If the field is 0 the component is included, otherwise excluded.
- _kicost_rename is a
field_renamefilter that applies KiCost renamings.- Includes all
manf#andmanfvariations supported by KiCost - Includes all distributor part number variations supported by KiCost
- 'version' -> 'variant'
- 'nopop' -> 'dnp'
- 'description' -> 'desc'
- 'pdf' -> 'datasheet'
- Includes all
- _mechanical is used to exclude:
- References that start with #
- Virtual components
- References that match: '^TP[0-9]*' or '^FID'
- Part names that match: 'regex': 'mount.*hole' or 'solder.*bridge' or 'solder.*jump' or 'test.*point'
- Footprints that match: 'test.*point' or 'mount.*hole' or 'fiducial'
- _none does nothing, useful when you want to remove a filter with default value
- _only_smd is used to get only SMD parts
- _only_tht is used to get only THT parts
- _only_virtual is used to get only virtual parts
- _rot_footprint is a default
rot_footprintfilter - _var_rename is a default
var_renamefilter - _var_rename_kicost is a default
var_rename_kicostfilter
Note that the kibom... filters uses a field named Config, but you can customise them invoking _kibom_dnf_FIELD. This will create an equivalent filter, but using the indicated FIELD.
Supported variants:
ibom: IBoM variant style The Config field (configurable) contains a value. If this value matches with a value in the whitelist is included. If this value matches with a value in the blacklist is excluded.- Valid keys:
comment: [string=''] A comment for documentation purposes.dnc_filter: [string|list(string)=''] Name of the filter to mark components as 'Do Not Change'. Use '_kibom_dnc' for the default KiBoM behavior.dnf_filter: [string|list(string)=''] Name of the filter to mark components as 'Do Not Fit'. Use '_kibom_dnf' for the default KiBoM behavior. Use '_kicost_dnp'' for the default KiCost behavior.exclude_filter: [string|list(string)=''] Name of the filter to exclude components from BoM processing. Use '_mechanical' for the default KiBoM behavior.file_id: [string=''] Text to use as the replacement for %v expansion.name: [string=''] Used to identify this particular variant definition.pre_transform: [string|list(string)=''] Name of the filter to transform fields before applying other filters. Use '_var_rename' to transform VARIANT:FIELD fields. Use '_var_rename_kicost' to transform kicost.VARIANT:FIELD fields. Use '_kicost_rename' to apply KiCost field rename rules.sub_pcbs: [list(dict)] Used for multi-board workflows as defined by KiKit. I don't recommend using it, for detail read this. But if you really need it you can define the sub-PCBs here. Then you just use VARIANT[SUB_PCB_NAME] instead of just VARIANT.- Valid keys:
name: [string=''] Name for this sub-pcb.- ref: Alias for reference.
reference: [string=''] Use it for the annotations method. This is the reference for thekikit:Boardfootprint used to identify the sub-PCB. Note that you can use any footprint as long as its position is inside the PCB outline. When empty the sub-PCB is specified using a rectangle.- bottom_right_x: Alias for brx.
- bottom_right_y: Alias for bry.
brx: [number|string] The X position of the bottom right corner for the rectangle that contains the sub-PCB.bry: [number|string] The Y position of the bottom right corner for the rectangle that contains the sub-PCB.center_result: [boolean=true] Move the resulting PCB to the center of the page. You can disable it only for the internal tool, KiKit should always do it.file_id: [string=''] Text to use as the replacement for %v expansion. When empty we use the parentfile_idplus thenameof the sub-PCB.strip_annotation: [boolean=false] Remove the annotation footprint. Note that KiKit will remove all annotations, but the internal implementation just the one indicated byref. If you need to remove other annotations use an exclude filter.tlx: [number|string] The X position of the top left corner for the rectangle that contains the sub-PCB.tly: [number|string] The Y position of the top left corner for the rectangle that contains the sub-PCB.tolerance: [number|string] Used to enlarge the selected rectangle to include elements outside the board. KiCad 5: To avoid rounding issues this value is set to 0.000002 mm when 0 is specified.tool: [string='internal'] [internal,kikit] Tool used to extract the sub-PCB..- top_left_x: Alias for tlx.
- top_left_y: Alias for tly.
units: [string='mm'] [millimeters,inches,mils,mm,cm,dm,m,mil,inch,in] Units used when omitted.
- Valid keys:
variant_field: [string='Config'] Name of the field that stores board variant for component.variants_blacklist: [string|list(string)=''] List of board variants to exclude from the BOM.variants_whitelist: [string|list(string)=''] List of board variants to include in the BOM.
- Valid keys:
kibom: KiBoM variant style The Config field (configurable) contains a comma separated list of variant directives. -VARIANT excludes a component from VARIANT. +VARIANT includes the component only if we are using this variant.- Valid keys:
comment: [string=''] A comment for documentation purposes.config_field: [string='Config'] Name of the field used to classify components.dnc_filter: [string|list(string)='_kibom_dnc_CONFIG_FIELD'] Name of the filter to mark components as 'Do Not Change'. Use '_kibom_dnc' for the default KiBoM behavior.dnf_filter: [string|list(string)='_kibom_dnf_CONFIG_FIELD'] Name of the filter to mark components as 'Do Not Fit'. Use '_kibom_dnf' for the default KiBoM behavior. Use '_kicost_dnp'_kibom_dnf_CONFIG_FIELD' for the default KiCost behavior.exclude_filter: [string|list(string)='_mechanical'] Name of the filter to exclude components from BoM processing. Use '_mechanical' for the default KiBoM behavior.file_id: [string=''] Text to use as the replacement for %v expansion.name: [string=''] Used to identify this particular variant definition.pre_transform: [string|list(string)=''] Name of the filter to transform fields before applying other filters. Use '_var_rename' to transform VARIANT:FIELD fields. Use '_var_rename_kicost' to transform kicost.VARIANT:FIELD fields. Use '_kicost_rename' to apply KiCost field rename rules.sub_pcbs: [list(dict)] Used for multi-board workflows as defined by KiKit. I don't recommend using it, for detail read this. But if you really need it you can define the sub-PCBs here. Then you just use VARIANT[SUB_PCB_NAME] instead of just VARIANT.- Valid keys:
name: [string=''] Name for this sub-pcb.- ref: Alias for reference.
reference: [string=''] Use it for the annotations method. This is the reference for thekikit:Boardfootprint used to identify the sub-PCB. Note that you can use any footprint as long as its position is inside the PCB outline. When empty the sub-PCB is specified using a rectangle.- bottom_right_x: Alias for brx.
- bottom_right_y: Alias for bry.
brx: [number|string] The X position of the bottom right corner for the rectangle that contains the sub-PCB.bry: [number|string] The Y position of the bottom right corner for the rectangle that contains the sub-PCB.center_result: [boolean=true] Move the resulting PCB to the center of the page. You can disable it only for the internal tool, KiKit should always do it.file_id: [string=''] Text to use as the replacement for %v expansion. When empty we use the parentfile_idplus thenameof the sub-PCB.strip_annotation: [boolean=false] Remove the annotation footprint. Note that KiKit will remove all annotations, but the internal implementation just the one indicated byref. If you need to remove other annotations use an exclude filter.tlx: [number|string] The X position of the top left corner for the rectangle that contains the sub-PCB.tly: [number|string] The Y position of the top left corner for the rectangle that contains the sub-PCB.tolerance: [number|string] Used to enlarge the selected rectangle to include elements outside the board. KiCad 5: To avoid rounding issues this value is set to 0.000002 mm when 0 is specified.tool: [string='internal'] [internal,kikit] Tool used to extract the sub-PCB..- top_left_x: Alias for tlx.
- top_left_y: Alias for tly.
units: [string='mm'] [millimeters,inches,mils,mm,cm,dm,m,mil,inch,in] Units used when omitted.
- Valid keys:
variant: [string|list(string)=''] Board variant(s).
- Valid keys:
kicost: KiCost variant style Thevariantfield (configurable) contains one or more values. If any of these values matches the variant regex the component is included. By default a pre-transform filter is applied to support kicost.VARIANT:FIELD and field name aliases used by KiCost. Also a defaultdnf_filterimplements the KiCost DNP mechanism.- Valid keys:
comment: [string=''] A comment for documentation purposes.dnc_filter: [string|list(string)=''] Name of the filter to mark components as 'Do Not Change'. Use '_kibom_dnc' for the default KiBoM behavior.dnf_filter: [string|list(string)=''] Name of the filter to mark components as 'Do Not Fit'. Use '_kibom_dnf' for the default KiBoM behavior. Use '_kicost_dnp'' for the default KiCost behavior.exclude_filter: [string|list(string)=''] Name of the filter to exclude components from BoM processing. Use '_mechanical' for the default KiBoM behavior.file_id: [string=''] Text to use as the replacement for %v expansion.name: [string=''] Used to identify this particular variant definition.pre_transform: [string|list(string)=''] Name of the filter to transform fields before applying other filters. Use '_var_rename' to transform VARIANT:FIELD fields. Use '_var_rename_kicost' to transform kicost.VARIANT:FIELD fields. Use '_kicost_rename' to apply KiCost field rename rules.separators: [string=',;/ '] Valid separators for variants in the variant field. Each character is a valid separator. Only supported internally, don't use it if you plan to use KiCost.sub_pcbs: [list(dict)] Used for multi-board workflows as defined by KiKit. I don't recommend using it, for detail read this. But if you really need it you can define the sub-PCBs here. Then you just use VARIANT[SUB_PCB_NAME] instead of just VARIANT.- Valid keys:
name: [string=''] Name for this sub-pcb.- ref: Alias for reference.
reference: [string=''] Use it for the annotations method. This is the reference for thekikit:Boardfootprint used to identify the sub-PCB. Note that you can use any footprint as long as its position is inside the PCB outline. When empty the sub-PCB is specified using a rectangle.- bottom_right_x: Alias for brx.
- bottom_right_y: Alias for bry.
brx: [number|string] The X position of the bottom right corner for the rectangle that contains the sub-PCB.bry: [number|string] The Y position of the bottom right corner for the rectangle that contains the sub-PCB.center_result: [boolean=true] Move the resulting PCB to the center of the page. You can disable it only for the internal tool, KiKit should always do it.file_id: [string=''] Text to use as the replacement for %v expansion. When empty we use the parentfile_idplus thenameof the sub-PCB.strip_annotation: [boolean=false] Remove the annotation footprint. Note that KiKit will remove all annotations, but the internal implementation just the one indicated byref. If you need to remove other annotations use an exclude filter.tlx: [number|string] The X position of the top left corner for the rectangle that contains the sub-PCB.tly: [number|string] The Y position of the top left corner for the rectangle that contains the sub-PCB.tolerance: [number|string] Used to enlarge the selected rectangle to include elements outside the board. KiCad 5: To avoid rounding issues this value is set to 0.000002 mm when 0 is specified.tool: [string='internal'] [internal,kikit] Tool used to extract the sub-PCB..- top_left_x: Alias for tlx.
- top_left_y: Alias for tly.
units: [string='mm'] [millimeters,inches,mils,mm,cm,dm,m,mil,inch,in] Units used when omitted.
- Valid keys:
variant: [string=''] Variants to match (regex).variant_field: [string='variant'] Name of the field that stores board variant/s for component. Only supported internally, don't use it if you plan to use KiCost.
- Valid keys:
Changing the 3D model, simple mechanism
This mechanism allows small changes to the 3D model. Is simple to use, but the information is located in the schematic.
If a component defines the field _3D_model then its value will replace the 3D model.
You can use var_rename or var_rename_kicost filter to define this field only for certain variants.
In this way you can change the 3D model according to the component variant.
When the component has more than one 3D model you must provide a comma separated list of models to replace the current models.
Changing the 3D model, complex mechanism
When the a component has a long list of 3D models and you want to keep all the information in the PCB you can use this mechanism.
The information is stored in the Text items of the footprint. If you want to change the 3D models for certain variant you must add an item containing:
%VARIANT_NAME:SLOT1,SLOT2,SLOTN%Where VARIANT_NAME is the name of the variant that will change the list of 3D models.
The SLOT1,SLOT2,SLOTN is a comma separated list of 3D model positions in the list of 3D models.
All the slots listed will be enabled, the rest will be disabled.
Here is an example. In this example we have a display whose aspect and connectio can radically change according to the variant. We have two variants:
left, uses a ERM1602DNS-2.1 with a connector on the left and two other pins on the righttop, uses a WH1602B-TMI-JT# with a single connector on the top
We have the following list of 3D models:
${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_2x07_P2.54mm_Vertical.wrl
${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x16_P2.54mm_Vertical.wrl
${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x01_P2.54mm_Vertical.wrl
${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x01_P2.54mm_Vertical.wrl
${KIPRJMOD}/steps/WH1602B-TMI-JT#.step
${KIPRJMOD}/steps/ERM1602DNS-2.1.stepThe ERM1602DNS-2.1 uses slots 1, 3, 4 and 6. So the effective list will be:
${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_2x07_P2.54mm_Vertical.wrl
${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x01_P2.54mm_Vertical.wrl
${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x01_P2.54mm_Vertical.wrl
${KIPRJMOD}/steps/ERM1602DNS-2.1.stepThe WH1602B-TMI-JT# uses slots 2 and 5. So the effective list will be:
${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x16_P2.54mm_Vertical.wrl
${KIPRJMOD}/steps/WH1602B-TMI-JT#.stepTo achieve it we define the following texts in the footprint: %left:1,3,4,6% and %top:2,5%.
Here are both variants:


If you preffer to use the variant specific matching mechanism you can use the following syntax:
$TEXT_TO_MATCH:SLOT1,SLOT2,SLOTN$In this case the variant will be applied to the TEXT_TO_MATCH, if it matches (equivalent to a component fitted) the SLOT will be used.
Some important notes:
- If you want to control what models are used when no variant is used you'll need to create a
defaultvariant. This is what the above example does. In this case thedefaultvariant shows all the connectors, but no display. Note that changing the 3D model needs the variants infrastructure. - If you are using variants and a lot of them select the same slots you can add a special text:
%_default_:SLOTS%. This will be used if none %VARIANT_NAME:SLOT%` matched. - If you want to disable a model and avoid any kind of warning add
_Disabled_by_KiBotto the 3D model path. This could be needed if you want to remove some model and you don't want to adjust the slot numbers. - This mechanism can be used with any of the available variants. For this reason we use the
VARIANT_NAMEand we avoid relying on any variant specific mechanism. But you can use the alternative syntax if you preffer the variant specific matching system.
DNF and DNC internal keys
The current list of DNF keys is:
- dnf
- dnl
- dnp
- do not fit
- do not place
- do not load
- nofit
- nostuff
- noplace
- noload
- not fitted
- not loaded
- not placed
- no stuff
The current list of DNC keys is:
- dnc
- do not change
- no change
- fixed
You can define your own lists as the int_bom_fil_1.kibot.yaml shows.
The outputs section
In this section you put all the things that you want to generate. This section contains one or more outputs. Each output contain the following data:
namea name so you can easily identify it.commenta short description of this output.typeselects which type of output will be generated. Examples are gerbers, drill files and pick & place filesdiris the directory where this output will be stored.extendsused to use another output'soptionsas base.run_by_defaultindicates this output will be created when no specific outputs are requested.disable_run_by_defaultcan be used to disable therun_by_defaultstatus of other output.output_idtext to use for the %I expansion content.optionscontains one or more options to configure this output.layersa list of layers used for this output. Not all outputs needs this subsection.
Important note about the layers: In the original kiplot (from John Beard) the name of the inner layers was Inner.N where N is the number of the layer, i.e. Inner.1 is the first inner layer. This format is supported for compatibility. Note that this generated a lot of confusion because the default KiCad name for the first inner layer is In1.Cu. People filled issues and submitted pull-requests to fix it, thinking that inner layers weren't supported. Currently KiCad allows renaming these layers, so this version of kiplot supports the name used in KiCad. Just use the same name you see in the user interface.
The available values for type are:
- Plot formats:
gerberthe gerbers for fabrication.pspostscript plothpglformat for laser printerssvgscalable vector graphicspdfportable document formatdxfmechanical CAD format
- Drill formats:
excellondata for the drilling machinegerb_drilldrilling positions in a gerber file
- Pick & place
positionof the components for the pick & place machine
- Documentation
pdf_sch_printschematic in PDF formatsvg_sch_printschematic in SVG formatps_sch_printschematic in PS formatdxf_sch_printschematic in DXF formathpgl_sch_printschematic in HPGL formatpdf_pcb_printPDF file containing one or more layer and the page framesvg_pcb_printSVG file containing one or more layer and the page framepcb_printPDF/SVG/PNG/EPS/PS, similar topdf_pcb_printandsvg_pcb_print, with more flexibilityreportgenerates a report about the PDF. Can include images from the above outputs.diffcreates PDF files showing schematic or PCB changes.
- Bill of Materials
bomThe internal BoM generator.kibomBoM in HTML or CSV format generated by KiBoMibomInteractive HTML BoM generated by InteractiveHtmlBomkicostBoM in XLSX format with costs generated by KiCost
- 3D model:
stepStandard for the Exchange of Product Data for the PCBvrmlVirtual Reality Modeling Language for the PCBrender_3dPCB render, from the KiCad's 3D Viewerblender_exportPCB export to Blender and high quality 3D render. Including export to:fbx(Kaydara's Filmbox), 'obj' (Wavefront), 'x3d' (ISO/IEC standard),gltf(GL format),stl(3D printing) and 'ply' (Stanford).
- Web pages:
populateTo create step-by-step assembly instructions.kikit_presentTo create a project presentation web page.navigate_resultsgenerates web pages to navigate the generated outputs.
- Fabrication helpers:
panelizecreates a PCB panel containing N copies of the PCB.stencil_3dcreates a 3D self-registering printable stencil.stencil_for_jigcreates steel stencils and 3D register.
- Others:
boardviewcreates a file useful to repair the board, but without disclosing the full layout.gencadexports the PCB in GENCAD format.compresscreates an archive containing generated data.download_datasheetsdownloads the datasheets for all the components.pcbdrawnice images of the PCB in customized colors.pdfunitejoins various PDF files into one.qr_libgenerates symbol and footprints for QR codes.sch_variantthe schematic after applying all filters and variants, including crossed components.pcb_variantthe PCB after applying all filters and variants, including modified 3D models.copy_filesused to copy generated files and source material.infocreates a report about the tools used during the KiBot run.netlistgenerates the list of connections for the project (classic and IPC-D-356 formats).
Here is an example of a configuration file to generate the gerbers for the top and bottom layers:
kibot:
version: 1
preflight:
run_drc: true
outputs:
- name: 'gerbers'
comment: "Gerbers for the board house"
type: gerber
dir: gerberdir
options:
# generic layer options
exclude_edge_layer: false
exclude_pads_from_silkscreen: false
plot_sheet_reference: false
plot_footprint_refs: true
plot_footprint_values: true
force_plot_invisible_refs_vals: false
tent_vias: true
line_width: 0.15
# gerber optionsMost options are the same you'll find in the KiCad dialogs.
Outputs are generated in the order they are declared in the YAML file.
To create them in an arbitrary order use the --cli-order command line option and they will be created in the order specified in the command line.
Specifying the layers
You have various ways to specify the layers. If you need to specify just one layer you can just use its name:
layers: 'F.Cu'If you want to specify all the available layers:
layers: 'all'You can also select the layers you want in KiCad (using File, Plot dialog) and save your PCB. Then you just need to use:
layers: 'selected'You can also use any of the following grup of layers:
- copper all the copper layers
- technical all the technical layers (silk sreen, solder mask, paste, adhesive, etc.)
- user all the user layers (draw, comments, eco, margin, edge cuts, etc.)
You can also mix the above definitions using a list:
layers:
- 'copper'
- 'Dwgs.User'This will select all the copper layers and the user drawings. Note that the above mentioned options will use file name suffixes and descriptions selected automatically. If you want to use a particular suffix and provide better descriptions you can use the following format:
layers:
- layer: 'F.Cu'
suffix: 'F_Cu'
description: 'Front copper'
- layer: 'B.Cu'
suffix: 'B_Cu'
description: 'Bottom copper'You can also mix the styles:
layers:
- 'copper'
- layer: 'Cmts.User'
suffix: 'Cmts_User'
description: 'User comments'
- 'Dwgs.User'If you need to use the same list of layers for various outputs you can use YAML anchors. The first time you define the list of layers just assign an anchor, here is an example:
layers: &copper_and_cmts
- copper
- 'Cmts.User'Next time you need this list just use an alias, like this:
layers: *copper_and_cmtsSupported outputs:
Notes:
- Most relevant options are listed first and in bold. Which ones are more relevant is quite arbitrary, comments are welcome.
- Aliases are listed in italics.
-
Blender Export Experimental
- Type:
blender_export - Description: Exports the PCB in various 3D file formats. Also renders the PCB with high-quality. Needs KiCad 6 or newer. This output is complex to setup and needs very big dependencies. Please be patient when using it. You need Blender with the pcb2blender plug-in installed. Visit: pcb2blender. You can just generate the exported PCB if no output is specified. You can also export the PCB and render it at the same time
- Valid keys:
comment: [string=''] A comment for documentation purposes. It helps to identify the output.dir: [string='./'] Output directory for the generated files. If it starts with+the rest is concatenated to the default dir.name: [string=''] Used to identify this particular output definition. Avoid using_as first character. These names are reserved for KiBot.options: [dict] Options for theblender_exportoutput.- Valid keys:
pcb3d: [string|dict] Options to export the PCB to Blender. You can also specify the name of the output that generates the PCB3D file. See thePCB2Blender_2_1andPCB2Blender_2_1_haschtltemplates.- Valid keys:
download: [boolean=true] Downloads missing 3D models from KiCad git. Only applies to models in KISYS3DMOD and KICAD6_3DMODEL_DIR. They are downloaded to a temporal directory and discarded. If you want to cache the downloaded files specify a directory using the KIBOT_3D_MODELS environment variable.no_virtual: [boolean=false] Used to exclude 3D models for components with 'virtual' attribute.show_components: [list(string)|string=all] [none,all] List of components to draw, can be also a string fornoneorall. Unlike thepcbdrawoutput, the default isall.dnf_filter: [string|list(string)='_none'] Name of the filter to mark components as not fitted. A short-cut to use for simple cases where a variant is an overkill.highlight: [list(string)=[]] List of components to highlight.highlight_on_top: [boolean=false] Highlight over the component (not under).highlight_padding: [number=1.5] [0,1000] How much the highlight extends around the component [mm].kicad_3d_url: [string='https://gitlab.com/kicad/libraries/kicad-packages3D/-/raw/master/'] Base URL for the KiCad 3D models.output: [string='%f-%i%I%v.%x'] Name for the generated PCB3D file (%i='blender_export' %x='pcb3d'). Affected by global options.pre_transform: [string|list(string)='_none'] Name of the filter to transform fields before applying other filters. A short-cut to use for simple cases where a variant is an overkill.solder_paste_for_populated: [boolean=true] Add solder paste only for the populated components. Populated components are the ones listed inshow_components.variant: [string=''] Board variant to apply.version: [string='2.1'] [2.1,2.1_haschtl] Variant of the format used.
- Valid keys:
point_of_view: [dict|list(dict)] How the object is viewed by the camera.- Valid keys:
view: [string='top'] [top,bottom,front,rear,right,left,z,Z,y,Y,x,X] Point of view. Compatible withrender_3d.file_id: [string=''] String to diferentiate the name of this view. When empty we use theview.rotate_x: [number=0] Angle to rotate the board in the X axis, positive is clockwise [degrees].rotate_y: [number=0] Angle to rotate the board in the Y axis, positive is clockwise [degrees].rotate_z: [number=0] Angle to rotate the board in the Z axis, positive is clockwise [degrees].
- Valid keys:
render_options: [dict] Controls how the render is done for therenderoutput type.- Valid keys:
samples: [number=10] How many samples we create. Each sample is a raytracing render. Use 1 for a raw preview, 10 for a draft and 100 or more for the final render.transparent_background: [boolean=false] Make the background transparent.auto_crop: [boolean=false] When enabled the image will be post-processed to remove the empty space around the image. In this mode thebackground2is changed to be the same asbackground1.background1: [string='#66667F'] First color for the background gradient.background2: [string='#CCCCE5'] Second color for the background gradient.- height: Alias for resolution_y.
resolution_x: [number=1280] Width of the image.resolution_y: [number=720] Height of the image.- width: Alias for resolution_x.
- Valid keys:
add_default_light: [boolean=true] Add a default light when none specified. The default light is located at (-size3.33, size3.33, size*5) where size is max(width, height) of the PCB.camera: [dict] Options for the camera. If none specified KiBot will create a suitable camera. If no position is specified for the camera KiBot will look for a suitable position.- Valid keys:
name: [string=''] Name for the light.pos_x: [number|string] X position [m]. You can usewidth,heightandsizefor PCB dimensions.pos_y: [number|string] Y position [m]. You can usewidth,heightandsizefor PCB dimensions.pos_z: [number|string] Z position [m]. You can usewidth,heightandsizefor PCB dimensions.type: [string='perspective'] [perspective,orthographic,panoramic] Type of camera.
- Valid keys:
light: [dict|list(dict)] Options for the light/s.- Valid keys:
name: [string=''] Name for the light.pos_x: [number|string] X position [m]. You can usewidth,heightandsizefor PCB dimensions.pos_y: [number|string] Y position [m]. You can usewidth,heightandsizefor PCB dimensions.pos_z: [number|string] Z position [m]. You can usewidth,heightandsizefor PCB dimensions.
- Valid keys:
outputs: [dict|list(dict)] Outputs to generate in the same run.- Valid keys:
type: [string='render'] [fbx,obj,x3d,gltf,stl,ply,blender,render] The format for the output. Therendertype will generate a PNG image of the render result.fbxis Kaydara's Filmbox, 'obj' is the Wavefront, 'x3d' is the new ISO/IEC standard that replaced VRML,gltfis the standardized GL format,stlis the 3D printing format, 'ply' is Polygon File Format (Stanford). Note that some formats includes the light and camera and others are just the 3D model (i.e. STL and PLY).output: [string='%f-%i%I%v.%x'] Name for the generated file (%i='3D_blender_$VIEW' %x=VARIABLE). The extension is selected from the type. Affected by global options.
- Valid keys:
pcb_import: Options to configure how Blender imports the PCB. The default values are good for most cases.- Valid keys:
center: [boolean=true] Center the PCB at the coordinates origin.components: [boolean=true] Import the components.cut_boards: [boolean=true] Separate the sub-PCBs in separated 3D models.enhance_materials: [boolean=true] Create good looking materials.merge_materials: [boolean=true] Reuse materials.solder_joints: [string='SMART'] [NONE,SMART,ALL] The plug-in can add nice looking solder joints. This option controls if we add it for none, all or only for THT/SMD pads with solder paste.stack_boards: [boolean=true] Move the sub-PCBs to their relative position.texture_dpi: [number=1016.0] [508-2032] Texture density in dots per inch.
- Valid keys:
- Valid keys:
category: [string|list(string)=''] The category for this output. If not specified an internally defined category is used. Categories looks like file system paths, i.e. PCB/fabrication/gerber. The categories are currently used fornavigate_results.disable_run_by_default: [string|boolean] Use it to disable therun_by_defaultstatus of other output. Useful when this output extends another and you don't want to generate the original. Use the boolean true value to disable the output you are extending.extends: [string=''] Copy theoptionssection from the indicated output. Used to inherit options from another output of the same type.output_id: [string=''] Text to use for the %I expansion content. To differentiate variations of this output.priority: [number=50] [0,100] Priority for this output. High priority outputs are created first. Internally we use 10 for low priority, 90 for high priority and 50 for most outputs.run_by_default: [boolean=true] When enabled this output will be created when no specific outputs are requested.
- Type:
-
BoardView
- Type:
boardview - Description: Exports the PCB in board view format. This format allows simple pads and connections navigation, mainly for circuit debug. The output can be loaded using Open Board View (https://openboardview.org/)
- Valid keys:
comment: [string=''] A comment for documentation purposes. It helps to identify the output.dir: [string='./'] Output directory for the generated files. If it starts with+the rest is concatenated to the default dir.name: [string=''] Used to identify this particular output definition. Avoid using_as first character. These names are reserved for KiBot.options: [dict] Options for theboardviewoutput.- Valid keys:
output: [string='%f-%i%I%v.%x'] Filename for the output (%i=boardview, %x=brd). Affected by global options.dnf_filter: [string|list(string)='_none'] Name of the filter to mark components as not fitted. A short-cut to use for simple cases where a variant is an overkill.pre_transform: [string|list(string)='_none'] Name of the filter to transform fields before applying other filters. A short-cut to use for simple cases where a variant is an overkill.variant: [string=''] Board variant to apply. Used for sub-PCBs.
- Valid keys:
category: [string|list(string)=''] The category for this output. If not specified an internally defined category is used. Categories looks like file system paths, i.e. PCB/fabrication/gerber. The categories are currently used fornavigate_results.disable_run_by_default: [string|boolean] Use it to disable therun_by_defaultstatus of other output. Useful when this output extends another and you don't want to generate the original. Use the boolean true value to disable the output you are extending.extends: [string=''] Copy theoptionssection from the indicated output. Used to inherit options from another output of the same type.output_id: [string=''] Text to use for the %I expansion content. To differentiate variations of this output.priority: [number=50] [0,100] Priority for this output. High priority outputs are created first. Internally we use 10 for low priority, 90 for high priority and 50 for most outputs.run_by_default: [boolean=true] When enabled this output will be created when no specific outputs are requested.
- Type:
-
BoM (Bill of Materials)
- Type:
bom - Description: Used to generate the BoM in CSV, HTML, TSV, TXT, XML or XLSX format using the internal BoM.
This output can generate XYRS files (pick and place files).
Is compatible with KiBoM, but doesn't need to update the XML netlist because the components
are loaded from the schematic.
Important differences with KiBoM output:
- All options are in the main
optionssection, not inconfsubsection. - TheComponentcolumn is namedRowand works just like any other column. This output is what you get from the 'Tools/Generate Bill of Materials' menu in eeschema. - Valid keys:
comment: [string=''] A comment for documentation purposes. It helps to identify the output.dir: [string='./'] Output directory for the generated files. If it starts with+the rest is concatenated to the default dir.name: [string=''] Used to identify this particular output definition. Avoid using_as first character. These names are reserved for KiBot.options: [dict] Options for thebomoutput.- Valid keys:
columns: [list(dict)|list(string)] List of columns to display. Can be just the name of the field.- Valid keys:
field: [string=''] Name of the field to use for this column. Use_field_lcsc_partto get the value defined in the global options.name: [string=''] Name to display in the header. The field is used when empty.comment: [string=''] Used as explanation for this column. The XLSX output uses it.join: [list(dict)|list(string)|string=''] List of fields to join to this column.- Valid keys:
field: [string=''] Name of the field.text: [string=''] Text to use instead of a field. This option is incompatible with thefieldoption. Any space to separate it should be added in the text. Use \n for newline and \t for tab.text_after: [string=''] Text to add after the field content. Will be added only if the field isn't empty. Any space to separate it should be added in the text. Use \n for newline and \t for tab.text_before: [string=''] Text to add before the field content. Will be added only if the field isn't empty. Any space to separate it should be added in the text. Use \n for newline and \t for tab.
- Valid keys:
level: [number=0] Used to group columns. The XLSX output uses it to collapse columns.
- Valid keys:
csv: [dict] Options for the CSV, TXT and TSV formats.- Valid keys:
quote_all: [boolean=false] Enclose all values using double quotes.separator: [string=','] CSV Separator. TXT and TSV always use tab as delimiter. Only one character can be specified.hide_header: [boolean=false] Hide the header line (names of the columns).hide_pcb_info: [boolean=false] Hide project information.hide_stats_info: [boolean=false] Hide statistics information.
- Valid keys:
format: [string=''] [HTML,CSV,TXT,TSV,XML,XLSX,HRTXT] format for the BoM. Defaults to CSV or a guess according to the options. HRTXT stands for Human Readable TeXT.group_fields: [list(string)] List of fields used for sorting individual components into groups. Components which match (comparing all fields) will be grouped together. Field names are case-insensitive. If empty: ['Part', 'Part Lib', 'Value', 'Footprint', 'Footprint Lib', 'Voltage', 'Tolerance', 'Current', 'Power'] is used.hrtxt: [dict] Options for the HRTXT formats.- Valid keys:
separator: [string='I'] Column Separator.header_sep: [string='-'] Separator between the header and the data.hide_header: [boolean=false] Hide the header line (names of the columns).hide_pcb_info: [boolean=false] Hide project information.hide_stats_info: [boolean=false] Hide statistics information.justify: [string='left'] [left,right,center] Text justification.
- Valid keys:
html: [dict] Options for the HTML format.- Valid keys:
datasheet_as_link: [string=''] Column with links to the datasheet.generate_dnf: [boolean=true] Generate a separated section for DNF (Do Not Fit) components.logo: [string|boolean=''] PNG file to use as logo, use false to remove.title: [string='KiBot Bill of Materials'] BoM title.col_colors: [boolean=true] Use colors to show the field type.digikey_link: [string|list(string)=''] Column/s containing Digi-Key part numbers, will be linked to web page.extra_info: [string|list(string)=''] Information to put after the title and before the pcb and stats info.hide_pcb_info: [boolean=false] Hide project information.hide_stats_info: [boolean=false] Hide statistics information.highlight_empty: [boolean=true] Use a color for empty cells. Applies only whencol_colorsistrue.mouser_link: [string|list(string)=''] Column/s containing Mouser part numbers, will be linked to web page.style: [string='modern-blue'] Page style. Internal styles: modern-blue, modern-green, modern-red and classic. Or you can provide a CSS file name. Please use .css as file extension..
- Valid keys:
ignore_dnf: [boolean=true] Exclude DNF (Do Not Fit) components.normalize_values: [boolean=false] Try to normalize the R, L and C values, producing uniform units and prefixes.number: [number=1] Number of boards to build (components multiplier).output: [string='%f-%i%I%v.%x'] filename for the output (%i=bom). Affected by global options.sort_style: [string='type_value'] [type_value,type_value_ref,ref] Sorting criteria.units: [string='millimeters'] [millimeters,inches,mils] Units used for the positions ('Footprint X' and 'Footprint Y' columns). Affected by global options.xlsx: [dict] Options for the XLSX format.- Valid keys:
datasheet_as_link: [string=''] Column with links to the datasheet.generate_dnf: [boolean=true] Generate a separated section for DNF (Do Not Fit) components.kicost: [boolean=false] Enable KiCost worksheet creation. Note: an example of how to use it on CI/CD can be found here.logo: [string|boolean=''] PNG file to use as logo, use false to remove.specs: [boolean=false] Enable Specs worksheet creation. Contains specifications for the components. Works with only some KiCost APIs.title: [string='KiBot Bill of Materials'] BoM title.col_colors: [boolean=true] Use colors to show the field type.digikey_link: [string|list(string)=''] Column/s containing Digi-Key part numbers, will be linked to web page.extra_info: [string|list(string)=''] Information to put after the title and before the pcb and stats info.hide_pcb_info: [boolean=false] Hide project information.hide_stats_info: [boolean=false] Hide statistics information.highlight_empty: [boolean=true] Use a color for empty cells. Applies only whencol_colorsistrue.kicost_api_disable: [string|list(string)=''] List of KiCost APIs to disable.kicost_api_enable: [string|list(string)=''] List of KiCost APIs to enable.kicost_config: [string=''] KiCost configuration file. It contains the keys for the different distributors APIs. The regular KiCost config is used when empty. Important for CI/CD environments: avoid exposing your API secrets! To understand how to achieve this, and als
- Valid keys:
- Valid keys:
- Type:
Parts
2| Qty | Value | Footprint | References |
|---|---|---|---|
| 1 | **Val | kibom-variant_4:LCD_16x02_Dual | DS1001 |
| 1 | Conn_01x12_Female | Connector_PinHeader_2.54mm:PinHeader_1x12_P2.54mm_Vertical | J1 |
More from apcountryman/KiBot
5- 2 layers73 × 13 mm

- 2 layers31 × 12 mm

- 2 layers37 × 13 mm

- 2 layers37 × 12 mm

- 2 layers35 × 11 mm

Similar boards
- 2 layers37 × 19 mm

Passive rpi hub75-adapter
hzeller/rpi-rgb-led-matrix
Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
2 parts4.4kGPL-2.0 - 2 layers33 × 19 mm

- 2 layers

Diode template
adamws/kicad-kbplacer
KiCad plugin for automatic keyboard's key placement and routing
2 parts547GPL-3.0 - 2 layers20.3 × 15.2 mm

L0 button
Luos-io/luos_engine
Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.
2 parts546MIT - 2 layers35.1 × 46.8 mm

SDEX2M2 Breakout Board
NVNTLabs/switch2-SDEX2M2
Micro SD Express to M.2 NVME Adapter for Nintendo Switch 2
2 parts542GPL-3.0 - 2 layers59.3 × 36.6 mm

ExpansionBoardTemplate
BlueSCSI/BlueSCSI-v2
BlueSCSI v2/Ultra - an open source, open hardware, SCSI emulator using the Pi Pico PR2040 and Pico 2 RP2350
2 parts459GPL-3.0 - 2 layers

Alpha.9mm.wire
ohmtech-rdi/eurorack-blocks
Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust
2 parts410 - 2 layers26.7 × 64 mm

Questions
How big is the Lcd PCB?
It measures 97.6 × 48.3 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Lcd use?
2 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Lcd KiCad files?
From the apcountryman/KiBot repository on GitHub, at the commit this page was made from: the board is docs/samples/3D_Model_LCD/lcd.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Lcd design in my own project?
Its repository publishes it under the AGPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).