Converting Board to Footprint

I have some Adafruit boards that I would like to incorporate into a layout as if they were components. Is there a way to convert the board into a single, standalone footprint that I can assign to a custom component? Or do I have to create a footprint manually from the board’s dimensions?

  • Mark

What does the footprint need to do?

  • outlines
  • mounting holes
  • connector positions
  • populated with devices and works

in which format do you have the boards?
DXF and STEP would give you the footprint Silks in a second…

I need the outline, mounting holes and connector positions. I’d have to edit the connectors, which are currently just through hole pads, to something else (e.g., pins), but I know how to do that.

The boards are in kicad_pcb format.

I don’t know if there is a tool for that, but if you open a kicad_mod file and compare it with the kicad_pcb file you see that the information you want is similar…

fp_line vs gr_line
fp_text vs gr_text
fp_arc vs gr_arc

I have no other idea, sorry.

then you can create the footprint very easily with kicad StepUp

  1. install kicad StepUp macro in FreeCAD
  2. Load Board with kicad StepUp
  3. with FC export the 2D projection to DXF
  4. open modedit in pcbnew
  5. crete a new module
  6. import DXF
    voila! you have your module in Front Silk
    there you can add i.e. holes and other stuff for mechanical references and add the module to your board :smiley:

That looks very promising, thanks!

But can I ask for somewhat deeper instructions on the “export from FreeCAD” step? I’m not familiar with FreeCAD.

I was able to import the board using the script. But when I try to export the DXF file, nothing gets produced (that’s even after I told FreeCAD it could download and install the libraries necessary to do the export).

I can export other formats (e.g., SVG). So I’m almost there, but apparently doing something wrong. Do I need to select/define a 2D projection of the model? If so, how do I do that?

you need to move the workbench from Part to Draft
then in Draft select the object and the Draft option in Menu “Shape 2D view
then select the 2D object “Shape2DView” and export it to DXF
this is a result for a semi-complex board

coming from this

@Andy_P sorry, I had a prob with my browser and my reply came to you instead of @Mark_Olbert

1 Like

Perfect! Thanx, maui! I now the drawing in a new module and can add the holes and stuff. I take it the process you outlined can’t pull those in as well?

Also, the drawing ended up on Dwgs.User, not F.SilkS. I don’t suppose that matters?

for what I know, there is no easy way to do it… this procedure anyway is giving you a reference for all holes and connectors…

Then, if you want, you can associate the module with a 3D model, this time coming directly from the kicad_pcb board, converted to STEP and VRML with kicad StepUp :smiley: