Making the KiCad Title block data useful

After the Origin issue, another one of KiCad’s slight annoyances is when the contents of the paper space title blocks get out of sync, looking at the support tickets, this is by design, however, it doesn’t stop it from being an annoying “feature”. This is especially problematic when you go from a KiCad Schematic diagram in the Schematic Editor; eeschema to a KiCad PCB layout in the PCB Editor; pcbnew, and store then export finalised versions of both the schematic and PCB as PDF. There are multiple locations you need to update the title block information.

I use KiCad in my day-to-day work as a professional Electronics Engineer, producing schematics for use within my industry, to document the projects that I work on. I need to keep these fields in sync. The information contained in the Title block is used to confirm that you are looking at the right revision of the drawings.

Keeping paper space information synchronised

In a basic KiCad project folder, there are five files that you need to know about, and a few that are managed by KiCad itself

  1. fp-lib-table – a list of project-specific footprint libraries
  2. sym-lib-table – a list of project-specific symbol libraries
  3. {file}.kicad_pcb – PCB file
  4. {file}.kicad_pro – Project file
  5. {file}.kicad_sch – Schematics Capture file

There are other files in a project, but we don’t need to worry about them for this.

The fields in the two-page settings dialogue box above are stored in the .kicad_pcb and .kicad_sch files and can be used anywhere you can “add text” in eeschema or “add a text item” in pcbnew.

Issue Date${ISSUE_DATE}
Current Date${CURRENT_DATE}
Comment {1…9}${COMMENT1} … ${COMMENT9}
Sheet Path${SHEETPATH}
Paper Size${PAPER}
Sheet Number${#}
Total number of schematic Sheets${##}
Built-in text fields which are accessible from both pcbnew and eeschma.

Values like ${CURRENT_DATE}, ${FILENAME}, ${KICAD_VERSION} and the number of papersheets are not stored, but are displayed and updated as required.

For some reason, the template file for the Drawing sheet is not stored in either the .kicad_pcb or .kicad_sch files, with the other fields associated with the schematic or the PCB. This information is stored in the .kicad_pro file, near the bottom in each of the pcbnew, and the eeschema sections (this section is called schematic, rather than eeschma), in a field called “page_layout_descr_file”. right at the bottom of the .kicad_pro file is a section called “text_variables”, this is where we can store our information.

KiCad text variables

Text Variables are stored in the .kicad_pro project file, the dialogue box for accessing them is via the “Schematic Setup” dialogue in eeschema, or “Board Setup” in pcbnew, there does not appear to be a way to edit them without opening either pcbnew or eescheam.

KiCad Schematic Setup - Text Variables
KiCad Schematic Setup – Text Variables

Using the Text Substitution, and variables, you can now keep the title blocks in sycn.

Revision information on your PCBs

As I mentioned above, you can put the information contained in these fields anywhere you can place a text item, I use it on the PCBs themselves, to encode information about the project and revision information of the PCB.

On the silkscreen layer, I use “${TITLE} – Rv: ${REVISON}” to give me the project and revision on one line, and “${COMMENT1}” and “© ${COMPANY}” in a smaller text to give other metadata.

Something else I may start doing is placing “Uncontrolled when Printed – Exported on ${CURRENT_DATE}” as a line in the title block area so that when I come across a PDF version of a schematic or board or a paper version, I know how old it is.

I update the revision number once I send a PCB to fabrication so that when I get the boards back, I know which version of the paperwork they relate to.

Leave a comment

Your email address will not be published. Required fields are marked *

The maximum upload file size: 20 MB. You can upload: image, audio, video, document, spreadsheet, interactive, text, archive, code, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop files here

4 thoughts on “Making the KiCad Title block data useful”