Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Project skeleton for KiCad projects with KiBot integration.

License

Notifications You must be signed in to change notification settings

bob-swinkels/KiCad-Project-Skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caution

This repository is no longer maintained! It is developed for KiCad version 5 and now we're steadily approaching KiCad 8. I may release something similar in the future when I need to work with KiCad again. Feel free to use this as a staring point to build something similar for a newer version of KiCad.

KiCad Project Skeleton

Project skeleton for KiCad projects with KiBot integration using GitHub Actions. Based on a Hackaday article [1] and two YouTube video's [2,3]:

KiBot GitHub Actions

This skeleton provides three different GitHub workflows to process the KiCad files using KiBot. These workflows look into the ~/pcb/kicad_project directory for a KiCad project file and process the KiCad schematic and PCB files with the same name. Because of this, it is not possible to have multiple KiCad project files in this folder without changing the workflow files.

The workflows execute a string replacement:

  • %%version%% gets replaces with the git release version number.
  • %%date%% gets replaces with the date and time on the schematic and the date (without time) in the PCB files.

There are various GitHub workflows present:

  • KiBot - Generate Review Gerbers - You can run this action manually to generate generic Gerber files for review.
  • KiBot - Generate Schematic Outputs - You can run this action manually to gerarate pdf files of schematic and save the BOM as a CSV so you can import it in OctoPart.
  • KiBot - Release - Runs when you create a GitHub release and automatically exports Gerber and assembly files for JLCPCB, a PDF file of the schematic, a CSV file of the BOM that you can import in OctoPart, an interactive HTML BOM, and a 3D-model (STEP) of the board.

If you would like export options for other manufacturers, please open an issue or make a pull request.

Directory Outline

Managing Schematic Libraries

Project specific symbols can be saved in ~/pcb/lib_sch/lib.lib. Link this library as a project specific library to the project using a relative path like ${KIPRJMOD}/../lib_sch/lib.lib.

Saving a copy of the global symbols.

The global symbols are pulled from Github when the repository is cloned, and this can cause problems if the global symbols have changed in the meantime. To prevent this, KiCad automatically creates a backup in the project folder of the symbols currently in use named <<PROJECT NAME>>-cache.lib.

To make sure everyone uses the same, you can convert the backup of the symbol library to a symbol library. To do this you need to move this file to ~/pcb/lib_sch and rename it to <<PROJECT NAME>>.lib. After this, you can add this symbol library as a project-specific symbol library and replace all symbols with the symbols from this library. NOTE: Do this only after you've completed your whole schematic design!

Managing Footprints

Project specific footprints can be saved in ~/pcb/lib_fp/lib_fp.pretty. Link this library as a project specific library to the project using a relative path like ${KIPRJMOD}/../lib_fp/lib_fp.pretty. Global symbols that are used can be copied to this folder and replaced with this local variant.

Managing 3D models of components

3D models for project specific components should be saved in ~/pcb/3d_models. Then they can be linked to the matching footprint using a relative path like ${KIPRJMOD}/../3d_models/filename.step.

Managing the BOM information

Add the following field name templates in Eeschema (preferences >> Preferences... >> Field Name Templates):

Name Visible URL Description
MFN Manufacturer name.
MFP Manufacturer product number.
LCSC# LCSC/JLCPCB part number (leave part number empty if not using JLCPCB assembly).
Config Board configuration to apply this part to or DNF if part should not be fitted on final board.

About

Project skeleton for KiCad projects with KiBot integration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages