Image footprints from drawings or QR code in KiCad

 Another FB conversation worth capturing the gist.  No Arduino content.

My hand-wired prototype circuits get knocked around, and I made a couple of them into printed circuit boards (PCBs) for sturdiness.   They're one-offs, but maybe I'll want to make a couple more some day.   So I want to decorate them with images from photos or a QR code. 

A chip on a board design has at least four representations.

  1. a line drawing showing all the pins, to be used as a symbol for the part in the electrical schematic drawing.
  2. a graphical "footprint" drawing showing the features it will need the PCB to provide.    There's a soldering "pad" for each pin, and their geometric arrangement, and maybe some paint marks for orienting the part the right way around.
  3. a "3D model" description so you can build a mechanical model of the assembled board.
  4. various electrical and logical models for simulating the behavior of the board.

I'm using KiCad, which includes EEschema schematic drawing tool, a Bitmap to Footprint Converter, a Footprint Editor and Pcbnew layout tool.

Internet tutorials and FAQ postings said you can use Bitmap to Footprint Converter to make a footprint from a picture and save it in your local footprint library.   (It's just a file system directory containing .kicad_mod files.)   That seemed to work.   Even the size reduction.   And they said you can simply pull the footprint out of your local footprint library with the Add Footprint button on the Pcbnew drawing window.   That seemed to work too.   And when you save the board layout, a copy of that footprint file is embedded in the .kicad_pcb board layout file.   So far so good.

But when I opened the .kicad_pcb file in Pcbnew the next day, the added footprint was gone!   It's in the file.   Where did it go?

It turns out that the layout only includes stuff you drew in the layout tool itself, such as extra text labels and the board outline, and stuff that was in a footprint of a part that was in the schematic.

So if you want to invent a decorative footprint with no corresponding electronic part, you have to make a schematic symbol for it as well as a footprint, and include the symbol in the schematic.   It doesn't have any pins so there is no way to connect it to the circuit.   It will be given a reference number when you run the "annotate schematic symbols" function.   Then you run the "assign PCB footprints to schematic symbols" function to associate all the symbols in the schematic with footprints.   When you read the netlist into Pcbnew, Pcbnew will include the decorative footprint into the layout with the rest.  

Apparently that's how to make the decorative footprint a permanent part of the design.   The "Add Footprint" function doesn't seem to work on footprints with no corresponding and correctly associated schematic symbol.  

I had the same behavior with a QR code footprint generated with the QR code "footprint wizard" that's part of the 

Not sure if this is a bug or a feature.   I suppose I should develop a reproducible case and submit an "issue" to KiCad maintenance.   






Comments

Popular posts from this blog

RAID1 array for our home theater. LVM + md + ZFS or XFS

Software product web sites suck.