Adding and placing headers for CPU modules

My PCB uses a Blue pill module as the main CPU on the board. In order to fit it I will need to manually place 2 headers to accommodate all 40 pins onthe board.
In this case 2x PinHeader_1x20_P2.54mm_Horizontal.kicad_mod.
The manufacturer I’m using (Aisler) would actually be able to automatically place these headers. If I could get them onto the PCB together with the part number. However the footprint of the Bluepill lies already at that location.

For the schematic I use a custom symbol that shows the connection to the Blue Pill board. I would rather use this then just the symbols for 2 headers which also have the wrong pin count. (2x20 instead of going up to 40) For the PCB and 3D view I also have custom footprints with silkscreen for the Blue Pill.

How would I be able to incorporate the headers in the right location without messing up the board layout and connections?

The method described here looks promising, but doesn’t cover everything.

If I use a dummy symbol for the headers with the correct footprint, I could place them at the same location of the BluePill. But the DRC will go haywire because of all the illegal connections.
Would it be possible to place the headers and keep them excluded from the DRC and routing?

What is your main worry here? Just getting the parts onto the board. Easiest is just put the headers in the schematic and connect through them. They will be on the same net so no violations.

I don’t buy the “Blue Pills” anymore, because they lost the race to the bottom and I don’t want to waste time on incompatibilities of re-labeled IC’s. But the WeAct STM32F411CEU8 “Black Pill” I buy now has the same issue.

You also have to solder the headers yourself. The delivered male headers with square pins are just fine for breadboarding, but I prefer to use thinner round header pins for One-off projects on matrix board and other PCB’s for several reasons.

  1. The round pins fit in a normal 40pin DIP socket. (Also single Footprint for PCBnew, but you can also get single row headers for these).
  2. Height of the total is much less. (which also leaves less room to place stuff under it.
  3. The female headers for the square pins are often of dubious quality (though good ones do exist).
  4. The single row headers are “wobbly” during placement on the PCB.

A possible workaround is to keep your PCB as is, but just before generating the placement files, delete the “Blue Pill” from the PCB and place two single row headers in the right location. You can easily place them by snapping one of the pins to the endpoint of a track where the “Blue Pill” was.

But for a method like this, do make some notes and / or a checklist to redo the same steps if you re-visit this same project in a few years time.

[Edit] Hermits suggestion is a bit better I think, Just place both the “Blue Pill” and the single row headers on the schematic and on the PCB. This will generate “Overlapping Courtyard” DRC errors, and a workaround for that is to delete the courtyard from the footprint in one of the variants.

In my example not only did I use dummy symbols for the sockets (headers in your case), but I also used “dummy” footprints for the sockets that consisted only of non-copper layers. I had the anchor point of my sockets line up with pin 1 of the IC (standard insertion point for THT parts). I’m not sure where you would need the anchor point of the headers for your assembler, but if pin1 works for them then that will make lining up the header dummy footprints with the pads of your blue pill footprint using magnetic pads. If the assembler needs the anchor point to be the center of the header then try to make sure that the center of the blue pill connections are on a convenient grid point to make lining up things easier. Because the header dummy footprints aren’t locked in position relative to the blue pill footprint, make sure that verifying alignment is in your final checklist before sending this board out for manufacture and assembly.

As far as overlapping courtyard concerns, I would design the blue pill footprint without any courtyard, you will need to make sure “must have courtyard” (or what ever the actual wording is) is turned off. This will allow components to be mounted under the Blue Pill between the headers, just note that it will be your responsibility to make sure that you don’t have any tall components under the Blue Pill.

I would like the following:

  1. Use a symbol that represents the CPU module I use. Be it an Arduino Nano, RPI Zero, NodeMCU, IC-socket, ETX or BluePill. That way the logic function of the circuit is clear and it becomes harder to mix up pins.
  2. Add the necessary dummy headers to the schematic that represent the headers but have no pins and select the footprints of these headers to the symbols. That way you don’t clutter the circuit diagram.
  3. Import the headers and the footprint of the CPU module in PCBnew.
  4. Place the CPU module on the board.
  5. Place the headers at the correct location location over the footprint of the CPU module.
  6. Exclude the headers from DRC, but keep the placement, MPN and BOM info.
  7. Run the DRC and it only checks the connections to and from the CPU module.

After talking it over with a friend who actually does this for a living. There currently doesn’t exist a proper solution for this. They have the same problem at work. The manufacturer can’t handle multiple parts for a single footprint. I can also remember from a previous job that the spacing of the connector for an ETX board was just of by half a mm. But that made things really difficult.
So it would be really great to use a single symbol, map it to various footprints and the relative positions of the components that are necessary. Like the silkscreen and pads for the CPU module and the pads of the headers.

But if that is not possible, I can settle for using a dummy symbol for the headers make and PCBnew exclude them for the DRC.

Thanks, this could work.

Perhaps I’m missing the issue but could one not simply created in a private library 4 symbols for 10 pin headers with numbers.

Header 1 numbers 1 to 10 Not needed but a good idea to keep them named similarly.
Header 2 numbers 11 to 20
Header 3 numbers 21 to 30
Header 4 numbers 31 to 40

This would be a clean and easy to do for follow on projects.

That could work. But you would still need to place the components in the correct locations manually and check it every time.
It would work better if there was a single footprint that would result in several parts being placed. I’m not quite sure how to model it exactly. But I’m thinking of writing an issue for this in Gitlab to address the issue.

If we could present a solution for this problem without too many headaches, it would make a good selling point for Kicad compared to other tools.

I have a hunch that the developers wouldn’t favor that over https://gitlab.com/kicad/code/kicad/-/issues/2409. Basically what we need isn’t several footprints in one but a schematic file and layout file tied together (predesigned block) which can be appended to another design.

A quick search in gitlab already came up with a feature request and subsequent discussion for multi-part footprints. I’ve added a comment there. No need to create an extra issue.

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