2021 May 10

Acoptex.Com

Arduino and Raspberry Pi projects

Basics project 135i How to create custom project templates in KiCad v5


SHARE

Basics: Project 135i

Project name: How to create custom project templates in KiCad v5

Tags: KiCad, KiCad v5, Project templates in KiCad v5, system templates, user templates, custom templates

Attachments: KICADPROJECT4.zip

General

We will learn about project templates and how to create custom project templates in KiCad v5.

What is KiCad?

KiCad is a free, easy to download software that is used for electronic design automation (EDA) and computer-aided design (CAD). While using this program, PCB design schematics can be realized from their electrical circuits. Within, there are tools that allow the creation of a bill of materials (BOM), artwork, 3D view of the PCB + components and Gerber files. From the workflow of KiCad working process, kiCad offers using of import or export methods to make the process of doing the project easier by adding done and completed projects or components and just modifying on them then export them to the wanted file extension.

KiCad is available for Linux, Windows and Apple macOS. System Requirements (hardware, software and specific) are well described here.

What are project templates?

Using a project template facilitates setting up a new project with predefined settings. Project templates can contain pre-defined board outlines, connector positions, schematic elements, design rules and so on. The complete schematics and/or PCBs used as seed files for the new project may even be included.

Step by Step instruction

0. Project templates paths and environment variables

KiCad has the following paths for template files:

  • System templates: <kicad bin dir>/../share/kicad/template/
  • User templates:
    • Unix: ~/kicad/templates/
    • Windows: C:\Documents and Settings\username\My Documents\kicad\templates
    • Mac: ~/Documents/kicad/templates/
  • path defined in the environment variables KICAD_USER_TEMPLATE_DIR, KICAD_TEMPLATE_DIR. When the environment variable KICAD_PTEMPLATES is defined there is a third tab, Portable Templates, which lists templates found at the KICAD_PTEMPLATES path (DEPRECATED).
project templates in KiCad v5

1.Using system project templates

  1. We assume that you have the KiCad v5 already installed. Double-click on the KiCad shortcut to start the program.
shortcut KiCad

2. You will see KiCad project manager window opened. Go to New – > Project from Template… or press Ctrl+T on your keyboard.

project templates in KiCad v5

3. The Project Template Selector window pops up. In the System Templates tab, click on a template’s icon (for example, Arduino Nano). It will display the project template information. Click on OK button.

project templates in KiCad v5
project templates in KiCad v5

4. Give new project a name and click on Save button. The template files will be copied to the new project location and renamed to reflect the new project’s name.

project templates in KiCad v5
project templates in KiCad v5

2. Creating own project template

1.Create the directory with the name of your project template. The your project template files will be stored there.

project templates in KiCad v5
project templates in KiCad v5

2. Sub-folder meta contains files describing the project template.

project templates in KiCad v5

3. The sub-folder meta contains of two image files: the brd.png – a PCB board image, the icon.png – icon of the project template, the size of the icon must be 64 x 64 px (see below, Acoptex -KICAD PROJECT 4), info.html – contains information about the project. Image files can be edited with Paint.net, Paint, Adobe Photoshop or other similar program. Html file can be edited with any text editor.

project templates in KiCad v5

The <title> tag determines the actual name of the template that is exposed to the user for template selection. Please note that the project template name will be cut off if it’s too long. Due to font kerning, typically 7 or 8 characters can be displayed. Using HTML means that images can be easily in-lined without having to invent a new scheme. Only basic HTML tags can be used in this document.

Here is a sample info.html file:

project templates in KiCad v5

3. Using user project template

  1. Double-click on the KiCad shortcut to start the program.
shortcut KiCad

2. You will see KiCad project manager window opened. Go to New – > Project from Template… or press Ctrl+T on your keyboard.

project templates in KiCad v5

3. The Project Template Selector window pops up. Go to the User Templates tab, click on a template’s icon. It will display the project template information. Click on OK button. All files and directories in a project template folder are copied to the new project path when a new project is created using a project template, except meta. When a new project will be created from a project template, all files and directories starting with the template name will be renamed with the new project file name, excluding the file extension.

Please note that you need to make sure that the Template path is correct, as it should read the metadata from your previously created project template.

project templates in KiCad v5

Summary

We have learnt about project templates and how to create custom project templates in KiCad v5.

Thank you for reading and supporting us.

Libraries:

  • None

Project resources:

  • See attachments on the beginning of this project description.