← Back to team overview

kicad-developers team mailing list archive

Re: Back annotate references from PCB


> On Nov 22, 2019, at 12:42 PM, Brian <lotharyx@xxxxxxxxx> wrote:
>>> On 22 Nov 2019, at 19:29, Brian <lotharyx@xxxxxxxxx <mailto:lotharyx@xxxxxxxxx>> wrote:
>>> From the peanut gallery:
>>> Can someone tell me an example use-case for a single schematic symbol corresponding to multiple board entities within a single project?
>>> As perhaps a rather naïve PCB designer, it seems like mostly a bad idea to me to have anything other than 1:1.
>>> Thanks,
>>> -Brian Henning 

>> On 11/22/19 2:37 PM, Jeff Young wrote:
>>> Hi Brian,
>>> Imagine you’re doing an audio amplifier.  Your main schematic sheet has 4 subsheets: PSU, control logic, left channel and right channel.  Both left channel and right channel point to the same sub-page.  So there’s a single schematic symbol for each part in the left & right channel, which gets annotated as two different references (ie: Q101 and Q201), and attached to two different footprints.
>>> Cheers,
>>> Jeff.

> Hi Jeff,
> Thanks for helping me understand this.  So how would someone looking at the schematic know that this one symbol represents both Q101 and Q201?  For that matter, if there's some instructions or a tutorial about creating a situation like this (one schematic drawing representing multiple instances of the subcircuit on the pcb), I'd be interested to learn it.  I have a couple projects in the pipeline where I might find this feature useful; in the past, I've manually copy/pasted sections of a schematic to repeat subcircuits.
> Thanks,
> -Brian

When I first read Brian H’s message, “multiple board entities” stood out — I thought he was talking about having more than one physical PCB in the project! Now I understand his concern.

Brian — when you have a design which uses multiple instantiations of the same sub-sheet, when you look at that design in the schematic editor (are we still calling it EESChema?) you can navigate through the sub-sheets using the Hierarchical Navigator. In each instance of a sub-sheet, you will see that each component has been assigned unique reference designators.

So do a simple test. Create a project. In the project’s main sheet, choose Create Hierarchical sheet from the right-hand menu. Give it a reasonable file name (like subsheet.sch) and give it a reasonable Sheet Name. (Sheet name is basically a reference designator for a sub-sheet.) Enter that sheet, add some parts. keep it simple, like a single inverting op-amp circuit, so an op-amp symbol and two resistors. Add two power symbols for the op-amp power. Add hierarchical labels for the input and output. Don’t worry about annotation yet. Save the sheet. 

Navigate back to the top. Right-click on the sub-sheet symbol and choose “Import sheet pins.” You need to do this once for each hierarchical label you added. This is how you bring nets up to a higher level. Now select that sub-sheet symbol by left-clicking/holding and drawing a rectangle around it. Right-click and choose “duplicate block.” Now you have a new instance of that same sub-sheet. Place it. Then right-click on it, choose “Edit …” (or just hit E) and give it a better sheet name. Now you have two unique instances of that sub-sheet. Choose Tools -> Annotate Schematic. When that’s done, enter each of the sub-sheets — you will see that they each have unique reference designators for the same symbols. Also, the non-hierarchical (local) nets in each sub-sheet will have unique net labels! So when you export the netlist for PCB it’ll work as you expect.

Oh, yeah, when you print out the schematic, you will get as many sheets as you have instances of the sub-sheets. So the simple example here, with a top-level sheet and two instances of a single sub-sheet will give you three printed pages.

Try it!


Follow ups