I’m hoping this is the right topic, because it falls under “integrating my board(s) into a larger product”.
If the answer is “yes you have a bunch of work to do” or “don’t use KiCad for this” then okay; I just want to check I am not missing a known workflow for doing this.
My project consists of two main boards (both designed in KiCad), held together with a standoff in each corner. Also, board A has a daughter board (actually a Teensy 4.1 microcontroller) and board B has a different daughterboard (an Adafruit OLED module). I’m really struggling with placing all the components and with keeping inter-board pin connectors aligned.
My workflow was like this:
Lay out board A, placing pin connectors to board B in what seemed like good places
Save that project as board B, and in that new project delete components that are only on board A; also swap the pin connectors for pin sockets while keeping the positions the same
Move things around on board B because other components won’t fit/overlap/are hard to route
measure the x and y positions of moved things, write on paper
Close B, open A, move things to match based on my scribbled notes. Find things that won’t fit, etc. Make more changes. Close A, open B, and so on ad infinitem.
I am finding that 3D board renders do help me keep straight in my head where I want things to go in broad terms, but aren’t useful for checking precise alignment so that everything will integrate together in real life.
What am I doing wrong?
I wish it was possible to open two projects at once and to link items so that if one is moved, the other moves with it.
Without thinking too much about this . . . I’d probably make one board the “main” board and make the other a component of it . . . so make a footprint from the secondary board and use it for alignment purposes in the main board.
I don’t think there is any automatic way that you can incorporate the changes in one project as constraints for a second project. I think the best you can do is to make a manual process as simple and quick as possible . . .
Just to explain better what I am doing, here are front and back 3D renders of the two main boards. (Not all of the pinheaders that will be swapped for sockets, have been swapped in these images)
Reserve an extra user layer in board A for “this” and in B for “that = A”.
In board A draw graphics in that layer indicating the locations of the important components. For example a rectangle along the fab layer rectangle of a footprint. Or draw pin 1 markings. Whatever suits you best. (Unfortunately you can’t copy graphics from footprints directly AFAIK.)
Some things are probably keeping their places and are common to both, you seem to have mounting holes, so draw circles for them.
Group those graphics together when they are ready.
Copy the group.
Go to the board B and paste the group in its place. Mounting holes can be used as anchor points.
Move the footprints in the board B according to the markings.
Note that you don’t have to open and close, you can have both open in two KiCad instances.
If you have a more complicated situation, you can even add another layer pair: “this” in board B and “that = B” in board A. You can now move certain components in A independently and reflect the changes in B, and move some other components in B independently and reflect them in A. Or you can add a third board C, add layers etc.
Then someone should write a plugin for that. I think it would be possible with the new API. I’m not sure if moving could be automatic, but at least you would be able push and/or pull changes by running without copypasting graphics and moving components twice. The plugin (an externally running app which connects to two KiCad instances) wouldn’t be simple, though.
I have device that has 4 PCBs one over the other. All mechanical information needed to design and link together these PCBs I have on several graphic layers. One of these PCBs you can see here (You need to click “Read more” there):
I have never used grouping in KiCad but using Hide mode makes it very easy to select everything at my selected graphic layer. Then I use “Copy with Reference”. In most cases I select 0,0 coordinate point as reference so it is very easy to position pasted graphics exactly at the same position (I sometimes change grid from 0.1mm to 1mm during it).
I have never opened two instances with KiCad projects, but I frequently have one project opened and open second PCB in stand-alone KiCad PCB Editor application (In bottom Windows line next to KiCad icon I have Schematic Editor, PCB Editor and Gerber Viewer).
Especially with pin headers like that (I assume 2.54mm pitch (could be 2mm…)) I would put all the headers on a grid that is the same as the pitch of those headers. That way, they always fit perfectly, or it’s so far off that you can spot it easily.
And you can combine that with a drawing to make it even easier.
And instead of making such a drawing separately, I guess you can plot one of the KiCad layers (for example Silkscreen), to either an SVG or DXF file, and then import that as your drawing in the other project.
Using a coarse grid is a good idea (for most of them - they are a bit shoehorned in, and the overall board size is constrained by external factors). I like the “either fit or it is obvious” characteristic.
That’s a good idea if you are starting from an existing board which won’t be changed. But I’m not sure it’s the easiest way if you make gradual changes to both boards within the same development cycle.
That’s a good idea – I didn’t think pads could be copied separately from the board and pasted. Drawing graphics to the board has a downside that they have to be moved in the original design after footprints there have been moved. Using pads can overcome that problem. However, I would use them in a different way.
It’s possible to create “SMD aperture” pads which have only drawing layers – 3 technical layers are available in the footprint editor in pad Properties. Add such a pad to a footprint and choose only one technical layer for it, no copper or paste/mask. Move it in the footprint to for example on top of copper pad number 1.
When that footprint is on the board, select only this pad, along with other similar pads in other footprints. This is easy with inactive layer hiding and selection filter. Copy them.
In the target board paste them and while they are still selected, group them together (this can’t be done in the original board). Now you can move them to the correct location.
Each pad in the target board actually becomes a new footprint. In novaktamas’s proposal they will be one footprint. Each solution may have pros and cons of which I’m not aware. In any case it’s necessary to copy, delete and paste something. But when using pads they move automatically along with footprints when the original design is changed, so this possibly saves some work compared to drawing board graphics.
When I have a mating connector, I will add a STEP exported from the other board to that footprint as a secondary 3D model (aligned so the pins fit the socket obviously). You do need to remember to regenerate the STEP after making changes, but it helps spot any issues.
For final checks, I (or the MechE authority) will pull the individual board models into CAD and measure alignment of mounting holes etc.
If you’ve made “gradual” changes to one of the PCB, you can simply re-export the silkscreen layer and import it in the other PCB again. Using KiCad to do this is simply the simplest way, also with iterations because you already have the data available. If you want to use another drawing, you would first have to make it.