5
\$\begingroup\$

I just started playing around with KiCad, and still try to get my head around proper hirarchy management.

Let's say I want to create a simple and-gate with transistors, but need to use this gate multiple times in a schematic.

Is there a way to define the and-gate schematic once, and reusing it multiple times?

Ideally including changing of referenced sub-schematics. e.g. if I spot an error in a gate, I can change it once, and it gets fixed everywhere it was used.

It's somewhat like components, but actually using a circut instead of just a single component.

I know I can copy&paste a sub-sheet, but that copies annotations as well and removes the possibility to change a whole schematic later on

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

Yes, with subsheets.

If you create a subsheet, you are asked for the sheet name, and a file name. The sheet name must be unique in the project, but the same file name can be used multiple times in the same project.

Reference designators are specific to the sheet path, so the "same" component may be named Q1 on one instance and Q2 on another -- use the hierarchy navigator to select which one you wish to edit.

\$\endgroup\$
5
  • \$\begingroup\$ Hmm, for whatever reason editing the shematic afterwards didn't propagate to the other instances. It works now, and annotation with reseting existing annotations also works around the duplicate annotations that come up from this. Thanks! \$\endgroup\$
    – SkaveRat
    Commented Apr 21, 2017 at 14:30
  • \$\begingroup\$ So with regards to the OP, suppose they use 5 'and-gates' in different places. Does this mean there will be one 'and-gate' file, but 5 schematic sheets of the same 'and-gate' circuit corresponding to each time it is used? Isn't that redundant?? Why not just have one sheet and one file of the 'and-gate' circuit...and 5 references.... \$\endgroup\$
    – Jet Blue
    Commented Aug 18, 2018 at 22:14
  • \$\begingroup\$ Thinking about it some more, I imagine the rationale is that even though the circuits are identical you "need" unique references for the individual parts... But, I think whoever is reading the schematic can do simple maths... no need to have the same part listed with 5 different references (e.g. U1,U2,U3,U4,U5)...seeing U1 referenced 5 times should be enough for them to figure out they need five of them... =/ \$\endgroup\$
    – Jet Blue
    Commented Aug 18, 2018 at 22:26
  • \$\begingroup\$ Otherwise, seems plain waste of paper and time. If the reader of the schematic is not familiar with the KiCad hierarchy system, they could be wasting time trying to identify what is the subtle difference between two sheets of the same circuit (not knowing that it's just the reference number)...Also suppose the OP was making an ALU with the 'and-gate' circuit...Exactly how many sheets of the 'and-gate' would they need =P </end_rant> Edit: It occurred to me that I forgot about the PCB layout part of this, where unique reference are needed ...Huh, interesting dilemma \$\endgroup\$
    – Jet Blue
    Commented Aug 18, 2018 at 22:30
  • \$\begingroup\$ @JetBlue, the five AND gates could also be living in two quad packages, so you'd end up with U1A, U1B, U1C, U1D, U2A as references, while on the PCB you have U1 and U2. \$\endgroup\$ Commented Aug 19, 2018 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.