Introduction

Throughout the last few years, KiCAD has been my goto tool as a hobbyist and as a professional. I readily admit that KiCAD lacks some of the polish and features found within Altium, Allegro, and PADS. Despite the lack of features, KiCAD has one advantage that those packages did not have, which is that it grew up in a hobbyist's world. The primary result of this unique upbringing as been that KiCAD is likely the easiest package to setup and use of all schematic-to-layout packages.

Unfortunately, there has been one glaring feature lacking in recent releases: copy and paste. The copy/paste feature initially appears superficial, until the user wishes to re-use a significant portion - including all archived part data - from one or more additional schematics.

This article will present the current simplest method of gaining access to those juicy schematic bits. We present this with the desire that this article quickly becomes outdated by a true copy/paste functionality.

Create your Circuit

Open a new KiCAD instance and draw your ciruit. In our case, we are simply going to draw a voltage divider. You could draw up something more useful, but I would rather that this tutorial be very easy to follow.

voltage divider circuit

Layer it

Next, we are going to create a heirarchical sheet. This will cause KiCAD to make a *.sch file which represents your circuit. This command may be found on the right menu or by using the Place -> Hierarchical Sheet. Draw the square on the page by clicking in the upper left of where you want the circuit to start and the lower right. The exact location doesn't matter and may be adjusted after initial creation.

circuit with sheet

When you have finished clicking, a window will appear asking what you want to name the *.sch file and what you wish this particular instance of it to be called. Fill it out. The one that we want to remember later is the `.sch name.

schematic sheet properties window

You can verify that you now have a multi-sheet schematic by selecting the navigator menu button navigator menu button and double-clicking on the lower-level page. The page that you started in was the Root, the new page will bear the name that you assigned in the Schematic Sheet Properties window.

You should also have an additional *.sch file within the project directory which bears the name that you gave the sch file. This will be our source schematic!

Move the Components Down

Highlight all of the voltage divider circuit by dragging a selection box around it. Right-click and select Save Block. Alternately, you could also use CTRL-C.

Navigate into the sheet using the navigator menu button.

Use the paste button paste button to paste your subcircuit into the schematic sheet.

This next part is going to be a bit weird, but just do it and you will see why in a moment. Select all of the components and move them 'above' the sheet. When you import them into a schematic in a moment, the location at which the components are placed is where they will be imported next!

subcircuit above sheet

Bring 'em In

Create a new schematic or open another schematic into which the parts are to be imported. File -> Append Schematic Sheet. Navigate to your circuit. In this cases, we navigated to voltage-divider.sch. This operation will overwrite your sheet, but will bring in the entire schematic contained in the *.sch file without overwriting your current schematic page.

imported subcircuit

Two things to note:

  1. Our circuit is in the exact same place that we left it, which is off-sheet. This is visually displeasing, but easy enough to move.
  2. The sheet changed! Manually change it back, using the sheet properties. Unfortunately, this is not avoidable at this time.

Wrap-Up

This isn't ideal. We would much rather copy-paste elements of schematics directly. In some ways, defining a subcircuit is a bit like defining a component. It becomes part of your bag of tricks and creates a way to easily create several 'boilerplate' sections of your circuitry with little effort. How many times have you put that switching regulator on the page?

My suggestion is that you create a single schematic library in which you store several of your most-used schematics into it... intelligently named, of course. When you have need of a circuit, simply import it into your new schematic as a block. As your thoughts on a particular subcircuit evolve - such as changing to sulfur-resistant components - then you can modify your subcircuits and gain the advantages of having a single source for your circuits as opposed to multiple sources (copy/paste errors finding their way into several schematics, even when the first one was corrected, is common).

Good luck, and enjoy KiCAD!



© by Jason R. Jones 2016
My thanks to the Pelican and Python Communities.