Difference between revisions of "Kicad Templates"

From media_wiki
Jump to: navigation, search
Line 139: Line 139:
 
   Download file here and copy inside the meta folder.
 
   Download file here and copy inside the meta folder.
 
    
 
    
 
+
File info.html
 +
  <html>
 +
  <head>
 +
  <title>50mm X 50mm Template Board</title>
 +
  </head>
 +
  <body>
 +
  <h1>50mm X 50mm - Template</h1>
 +
  <h2>Used for creating a 50mm x 50mm Board</h2>
 +
  <p>This project template is the basic board with the dimensions of 50mm long and 50mm wide. <br>
 +
  More information can be found at the following link:
 +
  <a href="https://www.Microrusty.com" target="blank">www.microrusty.com</a><br>
 +
  Search for Embedded Workshop Wiki<br><br>
 +
  This Template was created January 10, 2022 by Rusty Cain<br>
 +
  <br> This Board template includes the following features:<br>
 +
  <ul>
 +
  <li>50mm X 50mm board </li>
 +
  <li>3mm or 1/8inch Mounting holes </li>
 +
  <li>Mounting holes are grounded with via's</li>
 +
  <li>Front/Top Silk screened with www.microrusty.com 2020</li>
 +
  <li>Bottom Silk screened with www.microrusty.com 2020</li>
 +
  <li>Board has rounded corners. </li>
 +
  </ul>
 +
  </p>
 +
  <p>This template includes a PCB edge as specified in the <a href="https://www.microrusty.com/mediawiki/index.php/KiCad_5.0" target="blank">100mm X 50mm board.</a>
 +
with the mounting holes placed correctly to align the boards.
 +
  </p>
 +
  <p>The board outline looks like the following:</p>
 +
  <p><img src="brd.png"></p>
 +
  <p>3D Board looks like the following:</p>
 +
  <p><img src="3D.png"></p>
 +
  <p>(c)2022 Rusty Cain<br>
 +
  <br></p>
 +
  </body>
 +
  </html>
  
 
    
 
    

Revision as of 02:58, 23 January 2022

(Updated 1/22/2022)

This wiki document is an example of how to create Kicad Templates.

The steps are the same for Kicad Versions 5 and 6. 
Any template created in Kicad 5 will not work in Kicad 6 without converting the files.
You don’t need to follow the files system structure I used in this this example.
I have selected this file system method for personal ease of use on my Raspberry Pi 4
This document was written to support Kicad 5.X but can be used with Kicad 6.X
The same process works for other Linux and Windows versions.
As of the time of writing this document (January 2022) there was not a Kicad Version 6 for the Raspberry Pi. 

Set or Change the Path for User Templates in Kicad Example 1: Using the defaults.

 Open Kicad
 Select: Preferences Tab 
 Select Configure Paths
       : |       Name                 |	             Path       |
 Select: | KICAD_USER_TEMPLATE_DIR    |	/home/pi/kicad/template |
 Create the needed folders for Version 5:
 mkdir /home/pi/kicad/template.

Windows Note: Kicad 6.0 has already created the folders needed for templates  
 C:\Users\username\Documents\KiCad\6.0\template\ 
 No need to change the path for Windows Versions.

Set or Change the Path for User Templates in Kicad Example 2: Creating your own user path.

In your home directory create a directory named Kicad-projects.
mkdir /home/pi/Kicad-projects
Then CD to your new directory.
cd Kicad-projects
In the Kicad-projects directory make another directory named kicad-templates.
mkdir kicad-templates 
 or
mkdir /home/pi/Kicad-projects/kicad-templates
Open Kicad
 Select: Preferences Tab 
 Select Configure Paths
       : |       Name                 |	             Path       |
 Select: | KICAD_USER_TEMPLATE_DIR    |	/home/pi/kicad/template |
 Under Path column change to: /home/pi/Kicad-projects/Kicad-templates

Create Template Start Project

 Open: KiCad
 Select: File,  Click on: New, Click on: Project
 Select: Kicad-Projects folder
 Select: Kicad-templates folder
 Enter project name: 50mmX50mm-Template
 Click on: Save
 Select: Schematic Layout Editor
 New users note
 Configure Global Symbol Library Table will appear.
 Select: Copy default global symbol library table (recommended) Click: OK 

Setup the Schematic Page layout

 Select: File tab: Page Setting or Click on Edit Page settings Icon.
 Change Paper size to A 8.5 X 11
 Update Title Block fields

Configure the Schematic Grid size

 Select: View: Grid Settings
 Note: Kicad Version 6 has changed this to Grid Properties.   
 Set to appropriate size

Start editing in the schematic

Schematic-template.png
 Select : Place Symbol Icon on right side tool bar. 
 Click in schematic work sheet area.
 A window called Choose Symbol will open.
 In search filter enter mount.
 Select: MountingHole_Pad  Mounting Hole with connection.
 Place Mounting Hole on schematic work sheet area.
 Click on Select item icon on right side tool bar. (Looks like mouse cursor)
 Hover over mounting hole pad and hit the “C” to Copy. Note: ver6.0 use: “Control C”
 Repeat two more times. You should now have 4 Mounting Holes.
 Select: Place graphic lines or polygons icon on right side tool bar.
 Draw square around the 4 mounting holes.
 Select: Annotate schematic symbol Icon on top tool bar.
 Click: on Annotate tab then close
 Click: Save Icon on top tool bar to save drawing.

Assign footprint to schematic symbols

MountingHole.PNG
 Select: Assign footprint to schematic symbols icon on top tool bar.
 New users note:
 Configure Global Footprint Library Table
 Select: Copy default global footprint library table (recommended)
 Select:  MountingHole
 From drop down menu Select: MountingHole_3.2mm_M3_Pad_Via
 Click:  Apply, Save Schematic & Continue. Click: OK
 Select: Generate netlist icon on top tool bar.
 Select: Generate netlist in Netlist window.
 Note for Kicad Version 6: The Netlist is created automatically so this part can be skipped. 
 Click Save in file window.

Creating the PCB

 Select: Run Pcbnew to layout printed circuit board icon on top tool bar
 New users note:
 Enable Graphics Acceleration window popup.
 Select: Enable Acceleration

Setup the PCB Page layout

 Select: File tab: Page Setting or Click on Edit Page settings Icon.
 Change Paper size to A 8.5 X 11
 Update Title Block fields

Configure the PCB Grid size

 Select: View: Grid Settings
Grid-select.png
 Note: Kicad Version 6 has changed this to Grid Properties.   
 Select under Fast Switching: Grid 1  
 In the drop down menu Select:  Grid: 2.5400 mm (100.00 mils)
 Select under Fast Switching: Grid 2
 In the drop down menu Select:  Grid: 1.0000 mm (39.37 mils) 
 Click OK
 Hold down the alt key and hit the 1 key to change to Grid 2 Grid: 1.0000 mm (39.37 mils) 

Start editing the PCB Layout

Brd50X50.PNG
 Select: Load Netlist icon on top tool bar.
 Click on: Browse icon and select: 50mmX50mm-Template.net. Click: Open
 Select: Update PCB in Netlist window.
 Click Save in file window if you want the report file otherwise select Close.
 Place Mounting Holes in the middle of the worksheet.
 Select:  Grid 1.0000mm 3937(mils) drop down menu on top tools bar
 Select:  Edge.Cuts in the Layers Menu right side.
 Select: Add Graphics Lines right side tool bar.
 Click in top left corner of a 10mm square and draw a 50mm  X 50mm square.
 Select: F-Silks in the layer menu right side tool bar.
 Select: Add Graphics Lines right side tool bar.
 Draw the 4 Cross-hairs. One in each corner.
 Select:  Edge.Cuts in the Layers Menu right side.
 Select: Add Graphics arc right side tool bar.
 Add the Arc to each corner of the board.
 Move the corner edges back to Arc.
 Test Board edge cut with ALT 3 3D View.
 Move Mounting Holes to each corner and align with cross hairs.
 Add Silk layer graphics to board by selecting:
 Add text on copper layer or graphics text icon on right side tool bar.
 Save file

Add a folder called meta to the project.

 There needs to be a folder inside your project folder named meta
 Create the meta folder
 mkdir /home/pi/kicad/template/50mmX50mm-Template/meta (default method)
 or
 mkdir /home/pi/Kicad-projects/kicad-templates/50mmX50mm-Template/meta (Your own method)
 For Windows: C:\Users\username\OneDrive\Kicad_Projects\KiCad-Templates\50X50_Template\meta
 Inside the meta folder are two addition required files named info.html and icon.png
 info.html Contains the html code that displays information for the template. 
 This HTML file can be found here ---------374893742837447 Download and save inside meta folder.
 You can use Notepad++ to modify the html file and save it back to the meta directory using the name info.html
 icon.png is the file that is used for the template thumbnail. Max size for the picture is 64 X 64 pixels.
 Download file here and copy inside the meta folder.
 

File info.html

 <html>
 <head>
 <title>50mm X 50mm Template Board</title>
 </head>
 <body>

50mm X 50mm - Template

Used for creating a 50mm x 50mm Board

This project template is the basic board with the dimensions of 50mm long and 50mm wide.
More information can be found at the following link: <a href="https://www.Microrusty.com" target="blank">www.microrusty.com</a>
Search for Embedded Workshop Wiki

This Template was created January 10, 2022 by Rusty Cain

This Board template includes the following features:

  • 50mm X 50mm board
  • 3mm or 1/8inch Mounting holes
  • Mounting holes are grounded with via's
  • Front/Top Silk screened with www.microrusty.com 2020
  • Bottom Silk screened with www.microrusty.com 2020
  • Board has rounded corners.

This template includes a PCB edge as specified in the <a href="https://www.microrusty.com/mediawiki/index.php/KiCad_5.0" target="blank">100mm X 50mm board.</a> with the mounting holes placed correctly to align the boards.

The board outline looks like the following:

<img src="brd.png">

3D Board looks like the following:

<img src="3D.png">

(c)2022 Rusty Cain

 </body>
 </html>




Set Up Procedures KiCad 5.0

KiCad 5.0