Hierarchical labeling

Hello, I’m trying my first project using hierarchical sheets.

It’s basically a power supply that uses 4 identical LM317 schemes that are power by a single transformer with four secondaries.

I’ll say I want different labels for the output of the 4 LM317, is there a way to use the same schematic but differentiating the 4 signals on the root page?

You need to make 4 hierachical sheets. Draw your LM317 circuit in one of the sheets, and simply do a “select-copy-paste” of the content into the other three.
All four hierachical sheets need to be annotated differently, so you’ll automatically have different signal labels for each.

1 Like

Ok, so if I made a change for the lm317 circuit I’ll have to change all four sheets, right?

I wonder if it isn’t better to have all on one sheet in this case

You can create a single sheet for the LM317, and then use hierarchical labels for the input and output.

Then you can use that sheet 4 times in the root sheet (with the transformer) Connect the transformer to the inputs of the 4 sheets, and all the outputs to some connector output. This way you only have to draw one LM317, and when you do modifications, all 4 instances are kept the same. This is also it’s main limitation.

Duplicates of hierarchical sheets only work properly if you have exact duplicates of a (sub) circuit.
Things like the input capacitors and output voltage set resistors will also always be the same with this approach. (At least on the schematic) and the footprints will thus be the same. KiCad does not know what you actually solder on the PCB, so you can use different value resistors, and for example add some (textual) table with resistor values for different output voltages.

1 Like

Thanks Paul, I’ve probably expressed myself not correctly, because what you describe it’s exactly what I had mind.

My question was about the fact that if I label for example V+ and I place GND, in the final pcb they will all be ratsnested.
But I want them separated.

So I guess the only possibilities are only two:

  1. draw everything in a single schematic
  2. create 4 different sub schematic, copy/paste into each, and change label for nets in each one

PS I was hoping to use the same LM317 sheet also because I wanted to try the Replicate Layout plugin.

@kiltro : it sounds like you already have a (currently not working) project. Try to archive the project (kicad manager–>File–>archive project) and attach the zipped archive in this thread.

1 Like

No I don’t.
I was just trying to understand if it makes sense to use hierachical in this case

You should absolutely be able to make your V+ and GND into hierarchical labels and then have the corresponding hierarchical pins on the root sheet connect directly and uniquely to the transformer’s secondary outputs (assuming that is what you are intending…).
If the labels in question are currently “power symbols”, they are considered to have “global scope” across all sheets and so KiCad causes them to be “ratsnested” on the PCB. By using the hierarchical labels, you do sacrifice the nice ground and power symbols shapes, but it isn’t the end of the world.

1 Like

If I use only one LM317 sheet, and place it four times on the root sheet… All the gnd will be connected on the pcb, all the V+ will be connected too (cause they come from the same LM317 sheet)
I want them separated

Here’s an example of what I’m talking about. In the below example, both subsheets are the same. By separating the power and return into hierarchical labels, the top level transformer secondaries remain isolated.
subsheet example.zip (6.6 KB)

1 Like

You need to use hierarchical labels for power supplies and ground(s), if you don’t want them to become automatically connected. Then you can connect them appropriately in the parent sheet.

“Power” symbols in KiCad are global symbols by default. If you use power symbols, they’ll be shared.

Sorry, can’t open it cause I’m in V.6
Anyway I think I understand and try what you suggest

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.