Designing a multiple levels PCBs in KiCad?

Hello,

I’m looking for some info in designing a clean and simple SMD PCB module that will contain 2 PCBs and my question is what is the official name of a PCB of this type:

image

and what is the proper way to design 2 separate PCB’s with 2 different edge cuts that are related and connected to each other… should you make a separate project for each and then connect em? should you make a heirarchical sheet for each PCB and then connect them in the midle?
if you design two PCB’s on the same PCBnew file how do you then export each and a separate PCB for the manufacturer?

Thanks in advance for your time. :sunglasses:

Some random pages with search “stacked pcbs”:

http://www.muffwiggler.com/forum/viewtopic.php?t=184448&sid=bf037307c6e6b6d832d243b2edac10c8

And what to call them:

https://www.arduino.cc/en/Main/ArduinoShields

1 Like

In kicad such stacked pcbs will be best made using two projects. One for each pcb in the stack.

The connection between them is best made using a custom connector symbol and possibly even a custom footprint.

Well thank you and “Stacked PCBs” would be a proper name to call them rather than hats of shield because it’s essential for them to be connected to each other in other to ensure a proper operation of the circuit.

2 Likes

Those HATs and shields are connected to the main board. It’s completely up to you how to call them. Shield may refer to EMI/EMS shield so it may be confusing. Stack may refer to the layer stackup, so it may be confusing, too. We just adopted “shield” because I remembered it was used with arduino. We have a main device and then different shields. Some are attached to top, some to bottom, and they may be of different size and shape. The problem with “stacked” is this: what you call the added board and the main board? “Stacked”? If you have only one possible stack in mind it doesn’t matter, they may be “bottom board” and “top board”.

As Rene said, you can use a custom footprint for the main board. Even then there are many ways to do it: use one symbol for the whole board and add all connectors as pads to the footprint, or just draw the outline and connector locations as graphics and put the connectors as separate symbols and footprints to the “shield”.

By the way, if you have any doubts about space restrictions in Z axis or other physical compatibility, use FreeCAD and StepUp and create a 3D model for the board which is complete. Attach that model to the footprint which represents that board.

Here is a shield alone and with the main board as a footprint/3D model. The footprint doesn’t have any pads, the connections (pin headers) were added as separate footprints. The actual product won’t have pin headers on the top.

1 Like

Here’s the same main board on top of a “shield”:

image

It should be easy to see how helpful the 3D model is.

1 Like

KiCad does not have any built in support for stacked PCBs. But as Rene already said, it is best developed using one project per PCB.

If you have full freedom where to place a connector then it is almost irrelevant which PCB you start designing first. But if one PCB sets the constraints on the connector placements, then do this PCB first, export STEP and VRML (.wrl) models of this PCB. Then when you are dealing with layout of the second PCB you can bind the 3D model of the first PCB to the connector on the second PCB. This makes it easier to place components on second PCB (if you have vertical spacing constraints).

As for the schematics, has anyone tried to put a connector on a single sheet, annotate it manually and import this sheet as a hierarchical sheet into two project simultaneously? Obviously this would work if you have the same footprint on both projects, so you are limited to TH connectors. But if doable, it would guarantee the same pin connections.

1 Like

I would not suggest to go this route. KiCad assumes that the project has exclusive rights over the file. I can see problems happening with the rescue and cache algorithms as well as the annotation.

I don’t get all the cach stuff and why not doing it in the same project file atleast?

Approach may also depend on how you will have the boards manufactured. The cheapie place I use will do v-scores so you can put them on one board and separate them later. This may do for a small one off projects but could bite you in future runs if you change one of the boards and just want to run that half like a master and shield/cape situation.

Because you limit yourself this way.

One problem are copper zones and DRC. You would need to ensure that the two projects do not share any nets. (Not a power plane and not others) Because if they share nets kicad will want to have them connected and DRC will complain. Leaving you with a lot of false positives that could hide true errors.

Another problem is versioning. It is seldom the case that both pcbs will need a new version during the project livetime. If they are in the same project file then you can only update both of them never only one.

All of these are small problems that simply mean that you will be happier with how it all goes if you separate the projects. Will the added effort pay off? Well depends on how many projects you will make over your whole live. For most projects you will not get any benefit from doing it properly. But the one project that would go south if not done nicely will make up for it. (The bad thing is if you always do it properly then you will never know how much time you save over the long term because you never paid with fixing a bodge job.)

2 Likes

Yes but separating it also means separating it from the nets and everything else like header relative coordination and things like that. this just seem unnatural to do but if this is how the pros do it for now I guess we’ll just go with that untill I become some sort of a python god and start scripting and developing kicad.

I don’t know if there is a single industry standard term. Among the terms that I’ve heard over the years are:

  • Motherboard and Daughterboard: AFAIK this is why we call the main board in computers the motherboard. The primary board that has the main functions is called the motherboard. The daughterboard(s) has auxiliary functions, and may be electrically connected to any system on the motherboard that the design requires without going through any expansion bus control circuits. Other common terms for daughterboards are: “daughtercard”, “mezzanine board”, or “piggyback board”. Sometimes this daughterboard is where the actual CPU/µProcessor/µController is.
  • Expansion card: An auxiliary circuit that connects to a motherboard through a predefined bus control subcircut. For example, PCI cards are properly expansion cards instead of daughterboards because of the PCI bus.
  • Backplane: Traditionally this is a board that just has connectors for connecting two or more other boards together. The term comes from the traditional use of this board being the back plane (or wall) of a PWB card rack and provides the connections for all the boards in the rack. This can be a common bus to all the rack positions, or custom wiring from rack slot to rack slot. (I suppose you could stretch the definition to call the bank of PCI and other expansion slots on a computer motherboard to be the “backplane area” of the motherboard. Though, I’m not sure if I’ve actually heard anyone outside the cacophony of my own mind use the term this way…)
  • Shields: Commonly used in the Arduino ecosystem. Because they have direct connection to the µC, they would fall under the category of daughterboard.
  • Hats: Commonly used in the RaspberryPi ecosystem. The official definition by the RPi organization states that hats should have an identifier EEPROM connected via I2C to pins 27 and 28, but that “rule” isn’t always followed. Because they have direct connection to the µP, they would fall under the category of daughterboard.
  • Bonnets: Commonly used in the RaspberryPi ecosystem, specifically for RPi Zero form factor boards. I’m not sure if this is an “official” name from the RPi organization, or a 3rd party name that has caught on by some vendors. Because they have direct connection to the µC, they would fall under the category of daughterboard.
  • Capes: Commonly used in the BeagleBone ecosystem. I get the impression that these are daughterboards with direct connection to the µC, but I don’t have much experience with that ecosystem.

There may be other names used that I’m not as familiar with (so didn’t think of them off the top of my head). For example, I’m not sure what terms IPC uses for board-to-board stackups.

So, as you can see, there is really no “one” term for these. But, if you are looking for parts, often you can find the connectors at the distributors under the terms board-to-board connectors and/or mezzanine connectors. (Though, nothing is stopping you from using any connector that has male and female PCB mount connectors. In the past I’ve used d-sub connectors for this…)

1 Like

The only upside of doing both/all of them in single project is reuse of connector layout via placing connector in a separate hierarchical sheet and using it for each board. But you loose too much in my opinion regarding 3D modeling.

3D modeling becomes quite important with stacked PCBs and me personally I would not like to loose this option.

1 Like

Separating the boards isn’t just for you or KiCad. Manufacturers don’t usually like several projects in one bunch and I don’t think many would even allow or accept several boards (independent shapes with edge.cuts) in one gerber set.

Some explicitly tell that they don’t even accept several boards inside one outline and if they notice you try to do that they take the price of two projects (you can do some tricks to avoid that). Or they may require you do the panelization yourself, or that they will do the panelization with some minimum number of pieces, or… etc…

You should contact and ask your manufacturer first if you want to do that.

1 Like

I am not sure i follow. You would always need to have two sets of connectors placed as you can not have the boards designed on top of each other. (KiCad is not build for this in any way. You would need to make the boards next to each other.)

The closest you can get is by reusing the board you designed first as a template for the second one.


Yes a way to reuse a design as an interface definition would be a nice feature. But we can only help you understand how to do something with the current feature set.

Unless you are planning on running simulations, which I doubt?, you might try opening them as stand alone projects. That may satisfy the organizational logic you need to keep it straight in your head? Says someone that hasn’t used standalone except for some crude copy and paste a few years back and may misunderstand … :wink:

Standalone does not add much but removes most of the newer features that require tight interaction between schematic and pcb. (I fail to see how it will fix anything to be honest.)

Like I said, I haven’t used it much and not at all recently.

The closest thing I can think of would be to do this as a flat design because that is the desired work flow. Then delete half the project, copy the directory to a new direcory, and then restore the original. Then delete the other half. At that point you could do the same if you want to keep the original plus the two boards separate. I know it’s a really bad kludge, but I think that might work if the OP really wants one overview project.

Hello,
I have talked about this before: If you want to have a single schematic diagram that supports multiple printed board assemblies (PBAs), you would assign reference designator prefixes based on your system subdivision diagram (see ANSI/ASME Y14.44 Figure 7 Typical System Subdivision) using the Unit Numbering Method of assigning reference designators. You use the class letter A, which means a separable assembly. So, you would have A1, A2, A3, A… Copy the schematic over to however many PBAs/PCBs projects you need and start deleting. For the A1 PBA/PCB delete everything that doesn’t have an A1 prefix and then delete the A1 prefix. Do the same with all the other PBAs/PCBs. This will leave you with basic reference designators on your boards. This is if you want separate boards.

If you want a single board you will have to leave the ref des prefixes in place and provision the board with mouse bites or V-grooves to separate into subassembly boards.
–Larry