Version and variation management

I want to give a hypothetical but specific example and then ask some questions.

Suppose the project is a data acquisition board. It has some number of channels for inputs and for outputs.

The input channels are all copies of one sub-circuit, a heirarchical schematic. Same for the output.

Now for the actual board, there can be variations. One variant may have 4 inputs and 4 outputs. Another might have 6 and 2.

Then there can be different variants of the input. For example one uses a 1MHZ ADC and another uses a 500KHZ ADC.

Okay, now the questions.

  1. Can I, how do I, manage those variants in KiCAD?

  2. Can I reuse a sub-circuit file in different projects without making copies of it?

  3. Can I keep a sub-circuit file resident in the project directory when I delete all reference to it in the main schematic?

  4. Suppose that later, I make a revision and a new release of the boards. Is there any sort of revision control in KiCAD?

Thank you

I’ve got time for some quick answers that can be expanded on by others (or me later today).

  1. One board per Kicad project generally, so the 4 in/out board should be a new project from the 6in/out board. Thinking about the ADCs though: You can set sheet instance specific text variables by hitting on the sheet object and adding a line ( to be used with #{variable} in the value field ). But… unless the two ADCs (for instance) are the same pin out and truly just vary by value / model number, I’d suggest just making two similar sub sheets for the ADCs and supporting components and keeping them both up to date manually.

  2. You can reuse a sheet file between projects! Depending on your version control philosophy, this might need to be in a “reusable sub sheets” git sub module or just a reference from one project into the other project’s folder. The reference designators should automatically be adjusted for the new project, but the rest of the component fields will remain specific to the sheet file and be changeable from either project (so be careful!). (citation needed if this is still current behavior)

  3. You can keep the sheet file in the actual project directory when you delete all sheet instances in the project. This is good practice in case you need it again.

  4. There is no revision control in KiCad. There are a couple of threads discussing this on the forum though. Since the files are all plain text, you can use git fairly efficiently (though you wouldn’t want to merge files if you can avoid it). Fossil is another good option for collaborating with a small team, but hard to justify learning/teaching a new VCS for this purpose when git + extra communication works pretty well.

@scandey

Thank you

" The reference designators should automatically be adjusted for the new project"

That means the ref stored in the sub-circuit file presumably. In other words resistor R101 does not go back to “R?”

I am curious about that actually, and maybe an insight,

If I have four copies of the circuit, then I have R101, R201, R301, R401. What is stored in the subcircuit file? Presumably just R1, R2, R3, R4 and the added offset 100 comes from the circuit board that references these sub-circuits.

So, once assigned, those can be safely left in place from on project to another?

In other words, in the gui where it assigns the ref designators, just choose the option that leaves the assigned designators in place and then the only thing that changes is the offset added for the sub-circuit number in each project that uses it.

Did I get that right?

The reference designators are stored in “instances” of the symbols specific to the project name. That being said, the symbol object in the file will appear have the last reference designators set (I think?). In practice this doesn’t matter since the reference designators in the symbol instances override the symbol object definition.

I think you’d need to reset the existing designators for each new project to get a consistent numbering per 100’s like you were describing. Not positive about that though… I suspect otherwise KiCad will automatically assign single incrementing designators across all sheets.

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