Raspberry Pi B+ Hat Template

I don’t know, but that seems like it would be even more prone to error than the operation of just deleting a few segments.

Again, that seems to make things harder for the average user for the slight advantage of moving the board outline. Plus, it makes the board outline uneditable within pcbnew.

Probably the best thing to do is what was recommended by kammutierspule: make two separate templates.

As you can see up there with Aquila it’s confusing and not straight forward for noobs :wink:

Hm… have you had a chance to look at the footprint I attached up there for a 100x100 board?
I find it very easy to follow the outline on the drawings layer with segments/arcs on the edge cut layer.
This then also can be pulled in an existing project where much of the layout has been done already (for conversions for example)… and messing up the mounting holes/cutouts is pretty hard that way also, as they’re fixed on the footprint and dimensional fit of the board edges can always be checked visually by just looking at the lines ( no need for measuring anything)
On the other hand, if somebody likes different outlines better (chamfered edges, some other cutout, etc…) he can easily incorporate them without loosing the reference outline for the ‘standard’ hat, nor does he need to do calcs or measurements while modifying.

I whipped up the RPi-hat footprint just for demonstrating the concept for the PTH version…z_RPi_Hat_PTH.kicad_mod (7.3 KB)
Would probably need to be centered on the connector though for the 3d model placement without offset, but that is details…

The end of the story is, you can treat the shields/capes/hats as you treat any other connector footprint (like a uSD card slot for example) and you won’t be able to mess up mounting holes if they’ve been done right first time.
Looked at it from this angle your customized symbols for the SMT and PTH 2x20 pinhead connector would make more sense too, as those would be really symbolizing footprints of those hats (SMT and PTH).

That’s a pro and you won’t get edge cuts out of the footprint in the first place anyway - have you actually tried to get edge cuts into a footprint file? Text-editor only… and even then, don’t load that footprint with the footprint editor as he will complain and move them to some other layer.
Already hard enough that the footprint editor doesn’t allow direct drawing on Dwgs.User and Cmts.User layers…

Admitted you can put edge cuts into a footprint (did a Nokia 5110 display backward and had the cutout in the footprint) but after a while I decided against it and just kept the cutout info on the dwgs layer and redid the cutout on the board the display got onto:

So the edge cuts wont be in the footprint, everybody would have to ‘redraw’ them according to the footprint outline/cutout lines. And as I said, that’s a plus.

  1. it’s fully customizable (sharp corners, chamfered corners, different cuts, etc pp)
  2. people learn to do edge cuts/cut outs properly (show a man how to fish :wink:
  3. people don’t lose the reference dimensions/forms by manipulating the edge cut drawings as they will always be there with the footprint (no need for those dimension sizers also)
  4. if really needed the footprint on that board can be manipulated (pads changed, etc…) either in-situ just for that board or for all in the FPeditor
  5. can be loaded into existing projects/boards to save on layout time
  6. less clutter/easier to manage (just 1 symbol and 1 footprint per version), no need for a project template that you have to use from the beginning and with all that is contained
  7. no chance of accidentally altering any of the sub-components positions without noticing (mount holes, pin header, edge cuts, etc…)

One more question - why are all pins for the RPi_GPIO symbols (be it PTH or SMT) defined as ‘inverted’? Even GND and 3.3V are ‘inverted’…

1 Like

Hi there,

I found a work around by importing an existing RasPi Hat pcb-format from Eagle into KiCad.

Next I used this as a template for other projects.
E.g. I replaced the board of the following pcb:

Therefore I simply added it as a pcb with pcbnew:

Thanks for your help.

Cheers

Aquila

The new PI Zero dimensions.

https://www.raspberrypi.org/documentation/hardware/raspberrypi/mechanical/rpi-zero-v1_2_dimensions.pdf

Contains two symbols for the RPiZero hat, 1 is in pin order and the other in logical order where I did see fit.
rpi_a _b _2b_hat.lib (3.7 KB)

That’s the footprint that goes with it…
z_RPiZero_Hat_NPTH.kicad_mod (6.2 KB)

And, yeah, one has to manually ‘redraw’ the outline of the footprint on the edge.cuts layer to get a board, but that is good as:

  1. you can’t screw up alignment of connector vs mounting holes
  2. you always have the outline of the RPiZero referenced from the footprint
  3. you can adjust the outline of your hat design to your liking without screwing up 1) or 2) :wink:

Im jumping in a little late here.

Found this one as well. Seems to be kind of documented with Hat spec power supply as well.

Raspberry Pi Hat Template

Seems pretty sweet. I might try and build on this one if it measures up.

After a quick search turns out its already on Hackaday.

I’m new to KiCAD, kinda surprised to see no current, ready to go Raspberry Pi 2/3 template!

The template by @devbisme won’t open in the latest KiCAD (4.0.x). I managed to fix the errors mentioned by @Aquila (added the xess lib, removed the “special” lib since it is not supported or needed). KiCAD then ran a “rescue” process that showed the part with pins in a preview window. 3D no worky, as mentioned by others.

Searched the web, the only other pi template uncovered has disappeared off the web. I also don’t know how to import from Eagle (but read up about it, that it is error prone, etc).

Is nobody using KiCAD for raspberry pi? I can’t be the only one. My apologies if this warranted a new thread.

Google worked for me https://hackaday.io/project/8985-raspberry-pi-hat-template

Try the files I put into the thread above which treat the RPi as a module (that you load into your project) rather than a new project itself.
Way more freedom.
If you got problems with the workflow I’m happy to help.

RPi A+/2B/3B

RPi Zero

If you ever work with the compute module you’ll find that the workflow doesn’t change, as for that one you really got to use a 200 pin SO-DIM connector which is a footprint and only asks for a special symbol with RPi-CM specific pin labeling.

KiCAD noob here, not seeing how to add/open a “_mod” file.

I created my own board using the 2x20 pin header, more work than I wanted, but a good lesson for me in working with KiCAD anyway. That said, I don’t trust my own work yet, so if I can open a board as mentioned here, that would be best. @bobc, that hackaday template is cool, but way overkill depending on the need.

http://docs.kicad.org/stable/en/pcbnew.html#_footprint_libraries_management

In the case of footprints - a library is a folder with .kicad_mod files in it.
So, just save the .kicad_mod file convenient in a folder that ends in .pretty and then link it via the library manager to your actual project (or the global template by opening that, makeing the adjustments and saving it - next project started will have those libs from the start).

For symbols it’s a bit more complicated still, as the system there is older and documentation lacking (or I’m to dumb to find the correct passage)

http://docs.kicad.org/stable/en/eeschema.html#library-selection-and-maintenance

You must add any new library you wish to use in a schematic to the list
of project libraries in Eeschema using the component configuration dialog.

PS: screenshot shows symbol lib setup without github.

1 Like

I’ve just created a new template and submitted a pull request to add it to the default templates for the Raspberry Pi HAT. This includes the EEPROM and a few options for the power, including powering from the HAT to the Pi (and the required protection). It looks like the previously linked one is MIA. This current version does not have the cutouts for the Display and Camera ribbon connectors.

You can find the template here: Raspberry Pi HAT Template

The Raspberry Pi Foundation HAT design specs

And if you are looking for how to program the EEPROM:
Howto: Raspi HAT EEPROM and device-tree

Will this hat work with the newer Pi3B+?

Yes. The HAT connector is the same.

@jonbuford: Thank you!

Well… There are additional pins. But only if you are creating a hat to enable PoE. I honestly don’t know what if any documentation exists publicly for 3rd parties to make their own PoE hats (or incorporate PoE functions in parallel to the original intent of a hat) simply because I haven’t bothered to look.

But, yeah… the 40pin connector and ribbon cable pass-throughs are all in the same places.

1 Like

@SembazuruCDE: Therefore, there exist no PoE hats for the Pi3B+? If there do exist, how were they built without access to documentation?

Raspberry Pi will be releasing a first-party PoE hat.