Better Multiple PCB Support In V7? - Page 1
Forum section: electronics / general

author: EPAIII
author_rank: Super Contributor
timestamp: May 14, 2023, 10:20:49 am
content: The advise I got for V6 was to open separate projects for each PCB in a design. Has this changed with V7? Or too early to tell?

author: retiredfeline
author_rank: Frequent Contributor
timestamp: May 14, 2023, 11:22:45 am
content: No change.

author: EPAIII
author_rank: Super Contributor
timestamp: May 15, 2023, 07:53:45 am
content: That's what I feared.Thanks!Quote from: retiredfeline on May 14, 2023, 11:22:45 am

author: ebastler
author_rank: Super Contributor
timestamp: May 15, 2023, 03:02:04 pm
content: The limitations in KiCad 7 (unchanged from 6) are:One schematic file per project -- which may be a set of multiple sheets, held together in a hierarchy.One PCB layout page per project -- which may contain milling contours to outline multiple separate, physical boards.Depending on what you have in mind, this may work just fine for a "multiple PCB" project: If the multiple boards are always used together and manufactured together, e.g. a main board with two piggyback boards which carry a display and interface buttons, a single KiCad project can handle that nicely.But if the multiple PCBs are more loosely coupled and can be "mixed and matched", e.g. a bus system with different optional plug-in boards and more to come later, I would keep them in separate projects.

author: EPAIII
author_rank: Super Contributor
timestamp: May 17, 2023, 07:27:28 am
content: My present project is more like one PCB for the power supply and about 7 or 8 identical PCBs in addition to that for the works. So the numbers may or may not line up.Perhaps a 3 x 3 layout with one power supply and 8 individual boards. That might even save money when purchasing the boards.It would really be nice to have everything in one project.If I decide to try this how does the process work? I understand you need a root drawing to show how all the pieces are connected. But how are the individual PCBs shown in that drawing? Custom part symbols perhaps with the INs and OUTs shown in a manner like pin numbers on ICs? And then individual drawings for each PCB? Do I start at the root drawing and then work down? Or with the individual PCB drawings and then work up?Perhaps there is a video or written lesson on this? I will look.

author: PlainName
author_rank: Super Contributor
timestamp: May 17, 2023, 02:25:11 pm
content: QuoteI'm not sure. If you need to make a change to your PSU you will be changing your 'other' PCBs too, even though there is no real change to them and they are not affected. Further down the line it might be assumed that OtherPCB B is needed to work with PSU B, whereas in reality A will be fine with B (and vice versa). In software, this would be high cohesion and high coupling, which is not a desired trait.Also, there is the implication that 'project' means Kicad file. If it's not in that Kicad file it can't be in the project. But in reality 'project' encompasses many files of various types (documentation, datasheets, PCB, 3D CAD, simulation, etc). If you want it all together, wouldn't it be better to have a folder in your file system called, perhaps, "The Project" and have sub-folders for the various types of sub-project? Easy to shove in source control, zip, delete, whatever.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 17, 2023, 07:38:31 pm
content: What could be nice and useful rather than just a single project holding actually several separate designs would be to add a project container, or something like that. Could be called a "workspace".In which one could add several existing projects, which would be more easily accessible but would still be separate projects. That would give the functionality without fundamentally changing the architecture or risking screwing something up.

author: ebastler
author_rank: Super Contributor
timestamp: May 17, 2023, 08:09:49 pm
content: Quote from: SiliconWizard on May 17, 2023, 07:38:31 pmGood point.Groupingthe files from multiple projects together can be done via a folder hierarchy, of course, with the current Kicad version. But thenswitchingbetween projects still feels clumsy.A multi-level file tree on the left would be nice (with a container, multiple projects within it, and the files for each project), and hopefully it would be relatively easy to implement.

author: abeyer
author_rank: Frequent Contributor
timestamp: May 17, 2023, 09:05:04 pm
content: The one thing I think would be really important to capture in addition would be some sense of a "spanning" change -- eg changing a board to board connector -- where you need the same version of the connector on both boards, and would never want version 1 of board A with version 2 of board B.Maybe version control is adequate to represent that... but I think the "container" UI would need to have some VC integration, at least, then.

author: MitjaN
author_rank: Contributor
timestamp: May 18, 2023, 06:46:26 am
content: Quote from: abeyer on May 17, 2023, 09:05:04 pmThere is a way to do this even now. With some limitations. In project A you can have a hierarchical sheet containing only a board to board connector symbol. In project B you place hierarchical sheet and use the same file (not a copy, but a link to the same file). So any change made to the connector in project B will show up in project A and vice-versa.This works when connectors use the same footprint (e.g. IDC, Micromatch with flat cable connecting the boards). For designs where the footprints are different there are some issues. For PCB that are sandwiched with 100 mils pin headers and you are really designing a prototype this is not really an issue as you can use the same footprint but than solder different connector manually. For serious designs where you want to generate proper BOM for both projects, this is currently not a solutionhttps://gitlab.com/kicad/code/kicad/-/issues/14764.

author: LazyJack
author_rank: Frequent Contributor
timestamp: May 18, 2023, 08:11:13 am
content: Support for multiple PCBs is a deep rabbit hole. Of course, there is the trivial simple solution, like mentioned above that we basically have a collection of project, each of them with schematics and corresponding PCBs. But many designs are not that simple.Let me give you an example.There is one or more schematic drawing, but there is no 1:1 correspondence between a schematic sheet and a board. Instead one needs to divide the design up between separate PCBs, for example for packaging reasons. In this case, there is no logical partitioning of the schematic, but you may need to move components between PCBs to achieve the desired shape. Think about for example a camera. There would be board-to-board interconnects maybe in the shape of real connectors, or wires or flex pcbs. To have any meaningful automation, the design tool has to support treating these connectors as nets and of course it also need to have the ability to assign and reassign components to the different PCBs.There is a similar situation if you have boards on a backplane etc.I would love to see this supported in the future, but no idea how much fundamental architectural changes are needed for this in KiCAD.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 18, 2023, 08:24:25 pm
content: Quote from: MitjaN on May 18, 2023, 06:46:26 amYes, I also use this for multiple instances of the same schematic block on the same board. Very handy. Say no to copy-pasting and maintenance hell.

author: bpiphany
author_rank: Regular Contributor
timestamp: May 19, 2023, 04:35:42 pm
content: It's possible to have multiple.kicad_proproject files in the same folder. They all show up in the kicad file list, and double clicking one that is not the currently open project swaps over. Board and schematic files belonging to other.kicad_profiles can be double clicked and they are opened in stand-alone instances ofpcbneworeeschema, which is useful for cross referencing between different boards.Each of my project folders is set up as a git repository for revision control. In those I keep the.prettycomponent folders as git submodules (eg.${KIPRJMOD}/resistors.pretty). That way I can have different revisions of the same component libraries checked out per project. (If I use components from the kicad standard libraries I copy them into my own git modules first.) It's not perfect in the sense that different boards within the same project folder may get out of sync with the component libraries. But once a board layout is finalized with the current component revisions and committed to git it shouldn't change anyway. If that board's revision needs to be bumped it likely makes sense to update to the latest and greatest of component revisions anyway.

author: berke
author_rank: Frequent Contributor
timestamp: May 21, 2023, 09:24:51 pm
content: Quote from: ebastler on May 15, 2023, 03:02:04 pmThat's what I'm doing with Kicad 6. I have a stacked design with 4 boards connected using 104-pin mezzanine connectors as backplane. For each backplane signal, I have defined a global net.For the PCB I've defined four rectangles in the "Edge Cuts" layer. Each rectangle defines one of the PCBs of the stack.Routing is 95% done.My problem is this: How do I tell KiCAD that the pins will physically connected when the boards are stacked together?Help! I need this to be able to run DRC and to see an uncluttered rat's nest.Right now KiCAD thinks there are missing connections between the pins of connectors on different boards.I'm thinking of removing the edge cuts and making fake routes using fake inner 6th and 7th layers that would span the four boards, but it sounds messy.

author: MitjaN
author_rank: Contributor
timestamp: May 22, 2023, 06:20:28 am
content: Anything that you do will be a hack as Kicad does not support his workflow.The options that I see are:1. You could use WireIt plugin to split the nets connecting two PCB's. I don't know though if it works with V7 or V6.https://github.com/devbisme/WireIt. The significant downside to this is that PCB will not be in sync with schematics. So splitting nets should be the last step2. As you've said, you can connect the PCB on additional layers which will not exist in real PCB. You should even be able to keep edge cuts, as you can suppress individual DRC errors. So you could suppress the errors regarding the tracks crossing the edge cuts.3. Do nothing. Suppress your OCD desires and live on.I think that #3 is the best one.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 22, 2023, 06:46:06 am
content: Well, yes, use an extra dummy copper layer - problem is, it has to be a copper layer. So that will appear in your stackup. But if you really want to handle several PCBs and their interconnections like this, I don't see another way. A bit clunky, but largely doable.

author: berke
author_rank: Frequent Contributor
timestamp: May 22, 2023, 02:46:08 pm
content: Quote from: MitjaN on May 22, 2023, 06:20:28 amThat's not feasible, how am I going to route all those nets without seeing what is missing? Not the mention the high likelihood of errors. As usual it's a "the client wants their board last week, but I got their specs yesterday" kind of scenario.Quote from: MitjaNI just tried to do that going through pseudo layers 5 and 6.I've defined rule areas around the boards that only allow tracks on the pseudo-layers, that's the easy part.Quote from: SiliconWizard on May 22, 2023, 06:46:06 amBut connecting layers needs vias, and it's a tight design I didn't leave space for vias in the bottom right card! Plus, existing vias also prevent the pseudo-layers from routing.Quote from: MitjaNI guess I'll have to look into that plugin, and if not painfully route those pseudo layers.Thanks for your feedback!

author: IanJ
author_rank: Unknown
timestamp: May 22, 2023, 07:21:36 pm
content: Quote from: berke on May 21, 2023, 09:24:51 pmWhen I came across this in KiCad on a dual board design all I did was separate the parts in the Pcb and the Schematic thus separated nets.Ian.

author: LazyJack
author_rank: Frequent Contributor
timestamp: May 22, 2023, 08:20:30 pm
content: But then you have to make the decision on which component goes to which board at the schematic level. If pcb had some kind of net-tie feature or a kind of "teleporting via", where one puts down a connector and its counterpart on the other board will becme part of the same net. I'm not familiar at all how the pcb editor works, but maybe this would not be so hard to implement. You could define coupled connectors, where each side is part of the same net, but you would be free to route any net to it, when it would connect its other side to the same net. This is so that you would not have to comit the pinout on the schematic.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 22, 2023, 08:35:57 pm
content: Quote from: berke on May 22, 2023, 02:46:08 pmWell, yeah. it would work for throug-hole connectors (not needing extra vias), but otherwise not that well indeed.

author: PlainName
author_rank: Super Contributor
timestamp: May 22, 2023, 08:54:10 pm
content: QuoteIsn't that why you have a schematic? It shows the human what the thing is, so they don't have to reverse engineer the gerbers.

author: LazyJack
author_rank: Frequent Contributor
timestamp: May 22, 2023, 09:39:02 pm
content: No. The schematic is the circuit. The boards are the packaging. If I have to fit the circuit into some funky shape using two boards, I don't care which component goes onto which board, as long as it implements the function of the circuit. I would like to be able to place the components onto any board at depending on how they fit best and not make that decision at the svhematic level.

author: PlainName
author_rank: Super Contributor
timestamp: May 22, 2023, 10:12:20 pm
content: Hmmm. Well I think I would do it differently. I would have (simplistically):CAD showing how the PCBs fit (and in what they fit).PCB overlay showing where components are on each PCB.Schematic showing the circuit for each PCB.Schematic showing how each PCB is connected to the others.If appropriate, a block diagram showing the functional blocks and which PCB they are on.The PCB schematic documents the PCB. It seems to me the reason you don't want that is because you prefer to make it up as you go along; you don't know where things are going to go until you place them. I think that's not the way to do design, and it's certainly not the way to document a design - when you or someone comes to fix them, how will they match something on the schematic to which PCB? Or vice versa: what the hell does this PCB do?I think your approach would be like having the text of all man pages stuffed into one document without any of the command names. But, having said that, whatever floats your boat

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 22, 2023, 11:13:22 pm
content: When dealing with board-to-board connectors, my approach to limit errors and make things easier is just to create custom symbols for said connectors, with text for the pinout near each pin.Make its incredibly easier to not screw up the schematics, and can be reused as many times as wanted without having to look at the pinout on a separate document everytime.Simple and effective.

author: berke
author_rank: Frequent Contributor
timestamp: May 24, 2023, 01:27:17 pm
content: Here is how I ended up doing it.I first further decomposed the schematic so that no sheet spans more than one board.Note that due to lack of space I had to relocate components on separate boards until things fit in the available space.There was no way to know ahead of time which component goes on which board beforehand, so there go any top-down "just decide where your stuff will be placed before you start" design fantasies.I then replaced all the global nets with hierarchical labels. This applies especially to all power nets (3V3, 5V, GND, etc.). This was excruciatingly boring and took a long time to do manually, about half a day or 8 hours. (Maybe one day I'll write some code to parse the schematic S-expressions in a real language to be able to do that programmatically next time.)Then I connected the connectors of each board to the subcircuits of that board only.In the end you get for example four ground nets PCB0/GND, PCB1/GND, PCB2/GND, PCB3/GND, four 3V3 nets PCB0/3V3, PCB1/3V3 etc.I made good use of the menu option that allows you to mass-convert labels from one type to the other (e.g. global to hierarchical.)Once I did that I was able to finally see that needs to be routed in the PCB editor rat's nest.One important thing that was useful is that I used local labels to connect connector pins to subcircuit pins.I wasn't able to use a sheet for defining the connector pinouts, KiCAD was complaining about multiple labels per net, but maybe there is a way to do it using local labels.A few improvements to KiCAD come to mind though:- Power symbols that create local, not global nets. This way you can have ground symbols that look like ground and not just a square box with a "GND" sign as seen below.- Selection filters in the schematic editor to select only local/global labels, only power symbols, etc. That will make the job of extracting subcircuits and making them into sheets not using global nets much easier.- An option for automatically invoking and laying out the pins of a hierarchical sheet instance- An option for sorting the above- Another option for automatically updating the pin directions (in/out/bidirectional) even if it's just cosmetic

author: PlainName
author_rank: Super Contributor
timestamp: May 24, 2023, 06:07:22 pm
content: Well done for gettng it sortedI think your requirement is something of a niche, but the suggestions you make would be useful.

author: Kleinstein
author_rank: Super Contributor
timestamp: May 24, 2023, 07:48:50 pm
content: It is not that rare to have 2 boards that somehow should fit togehter. It would help to get a certain level of support for this.A tricky case is using stacked boards with multipler connectors (e.g. pin headers) in parallel (e.g. the arduino shields). In this case the idea with defining a custom connector to combine the connectors is a good idea - this way at least the spacing is the same and no bend pins. At least with many connectors both sides are somewhat symmetric and male and female side could use the same footprint.Having multiple subsets of supply can be even useful on a single board with isolation barrier.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 24, 2023, 08:01:20 pm
content: At the current state of KiCad, I personally think handling several boards in the same project is going through unnecessary hoops and limitations for a questionable benefit. (As I said, I much prefer handling separate projects but creating custom connectors with pin-out to avoid pin-out errors.)And for integration, my goal is usually to have 100% of parts with a 3D model in STEP format - ideally from the manufacturers, then export the boards in STEP, and then check integration in a CAD software.No need to cross fingers hoping the connectors will face one another properly. Just export boards in STEP and check.

author: PlainName
author_rank: Super Contributor
timestamp: May 24, 2023, 11:45:11 pm
content: QuoteIndeed, but usually you know what goes on which board before you do the layout.

author: berke
author_rank: Frequent Contributor
timestamp: May 29, 2023, 08:00:30 am
content: Quote from: SiliconWizard on May 24, 2023, 08:01:20 pmHow would I have gone about that? Copy the manufacturer's symbols, and edit the pin names I guess? I think your custom symbol technique is a great idea for maintaining consistency between sheets. I'd only have to edit and update the symbol.Any ideas for easing the 1-to-1 connections between the connectors on both sides? Here's how it looks presently.

author: EPAIII
author_rank: Super Contributor
timestamp: June 01, 2023, 09:29:57 am
content: Seems there is a lot more to this than I ever imagined. Than I even could imagine.As for my project, which is dead simple compared to many here, I have abandoned any thought of doing it in one. Each board will be a separate project for me.I am the rank beginner here but a thought came to me that might work for a two board situation with one or two connectors running between them. Two boards could be layed out as one snap-apart with the two connector edges facing each other about a half inch to an inch apart. In the schematic both connectors would be shown with connections drawn from pin to pin for all pins. Let the auto router rout those connections between the two connectors in the area that will be snapped out. There WILL be a lot of crossovers. KiCAD then knows all the nets so paths can be checked and simulations run. And the excess copper is tossed away after the boards are separated.Just a thought. And thanks for all the discussion. It has been eye opening, for sure.Quote from: SiliconWizard on May 24, 2023, 08:01:20 pm

author: EPAIII
author_rank: Super Contributor
timestamp: January 06, 2024, 10:16:50 am
content: Sounds like a great way to confuse the terminology and we have far too much of that in the CAD world already. I would say a project should be the highest grouping of files. It could contain a number of physical items, meaning boxes or assemblies or chassis or even vehicle of trailer sized facilities or whatever. Perhaps there's even two levels of things there, or three. Then those boxes would contain all the circuit boards and other items (big power transformers, etc.) needed for that box to function.To my mind, that should be the goal. Having the BEST possible noun at each level to describe what is intended at that level. And a "project" would be at the top most level, not the bottom.Please forgive me if reopening this old thread is frowned upon. I was rereading it and this just seemed to belong here.Quote from: SiliconWizard on May 17, 2023, 07:38:31 pm

author: PlainName
author_rank: Super Contributor
timestamp: January 06, 2024, 11:32:56 am
content: Let's say I build an ECU. There will be perhaps a couple of PCBs, the connectors between then, the box it goes in, the fixings for mounting the PCBs in the box. And let's add the connectors that plug into the interfaces (but no cables since we don't know where this is going). That's a project, right?OK, now lets build a car and fit it with wheels and [...], and an ECU. Gosh, that car must be worthy of 'project' (and then some!) but what of the ECU? Is that no longer a project? Do we have to think up a new name for it because it's used in some bigger thing?No, a 'project' is just an encompassing term for a particular planned aim, in this case the creation of an ECU. Or car. The files that make up a PCB would be a project. The files (spec sheet, manufacturing info, test results) that make up a resistor on the PCB would be a project.So 'project' is actually the appropriate noun for a collection of files that comprise a thing, whether those are just the schematics and layouts, or include (or, perhaps, are just) the mechanical CAD files and other stuff. That thing may be the smallest part of the collection of a million components en route to the moon. It just depends on where you're standing as to what view you're seeing.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 07, 2024, 03:24:02 pm
content: As said before, KiCad is still one PCB per project. There are some advantages of combining several PCB's in a single project. For example it makes ERC for the whole design possible, but in the end the difference is not very big. Maybe KiCad will get native support for multi-pcb projects at some time, but don't expect it soon. ** Maybe ** in a few years time...In the mean time, what you can do: You can create some custom libraries, For example with schematic symbols for connectors, and then name all the signals in the connector. For some time you can also draw lines on Edge.Cuts in a footprint, which allows to draw a PCB outline and put it in a library just like any other footprint (Although this is not the intended use). KiCad also has a built in template system. You can save any project as a template, and then use that template to start a new project. You can find these templates in:Project Manager / File / New Project from Template.

author: julian1
author_rank: Frequent Contributor
timestamp: January 09, 2024, 07:42:48 pm
content: Working with multiple PCBs in the same kicad is possible. And It is a common enough workflow, when there is a need to merge both schematic and pcb layout - from two or more boards. For example when different pcbs are imported and brought together in the same project, then the desired bits of the layout kept from the different boards, and unwanted bits deleted.What prevents this being a more general workflow is the need to manage designators so that they are unique in the project, and with no duplicates for different boards. So some care needs to be taken to avoid conflicts. Using sub/hierachical sheets can ease this process.It is possible to imagine a Kicad feature development, where designator IDs would get a unique prefix for each individual board. But this would unreasonably clutter the handling of the common simple case, of one board per project.And the incremental bang-for-buck is not that high, given one can already create shared symbols, to ensure consistency with things like wiring harnesses, as well as copy pcb dimensioning indicators between boards, to handle physical alignment of features like edges, headers, mounting holes etc.

author: EPAIII
author_rank: Super Contributor
timestamp: January 10, 2024, 11:59:47 pm
content: When it is said that a single PCB per project is the more common case I think it reveals the hobbyist origins of KiCAD. This is not a bad (or good) thing, just a thing. While I was first a hobbyist in electronics, I also have over 55 years as a professional and most of the electronic things that I have worked with did have multiple PCBs as well as other assemblies. For that matter, even today's hobby systems can often utilize multiple PCBs. Consider an Arduino or other computer on a board with one or more add-on boards stacked on it. Or a control panel added to such a system. I can argue that a single PCB is not the norm for even hobby projects. In fact, multiple PCBs and/or assemblies ARE the norm in electronic projects, even the simplest ones.I am not involved in the development of KiCAD: I wish I had the coding skills to be but at present, I don't. But I do think that if KiCAD is going to be a major player in the PCB world, that including multiple PCBs and OTHER TYPES OF ASSEMBLIES would be a big concern. Just a thought, but perhaps a separate program for the schematics would be the way to start. That program would need a way of exporting sections of that overall schematic to KiCAD for the individual PCBs. Perhaps it would also need a way of including block diagrams at one or more levels of refinement. Just some thoughts that come to mind.I can understand that different people can see different meanings in a word.What should be there is a top level explanation of how the program (KiCAD) works and does not yet work. And that frame of reference should make the meanings of the words used by the developers very plain.It might also be helpful if there was one recommended work-around for situations like a project that includes more than one circuit board. Have more than one if you want, but DOCUMENT them so a beginner, like me can easily use them. And that work-around should be included in the thinking of the developers in order to preserve it in future versions and also as a goal for a future version where it is included as a fundamental feature instead of just a work-around.