Friday, 2 May 2014

Closing the KiCAD Gaps

Imports and Persistence

As discussed before, I'd decided to try KiCAD for the first time and the approach I took as to port an existing design, in this case EEVBlog's uCurrent.

To recap, I'd produce a schematic that still needed it's annotation and part values updated, and I'd also imported the Altium PCB files into KiCAD, with an Altium to P-CAD conversion as an intermediate step.

Footprints, Modules and Libraries.

Some of the KiCAD terms are quite strange to me.  In the PCB editor 'footprints' are 'modules' - and just like the schematic library editor there is also the PCB Library Editor.

However, unlike the schematic editor where you use the 'Edit Library' toolbar to open the libraries, you use the 'open module editor' toolbar to launch the module editor, and then you load the library editor through that.  To me this seems messy and over-complicated - why not just launch the library editor from PCBnew in the first place (similar workflows for similar tasks, people!).

Now, I'll admit what I wanted to do was unconventional - I wanted to create a new footprint library from the boar I imported, and the first step I felts was to be able to create a new library.  But this option is disabled until you actually load a module (footprint).

Why No New?

After scratching my head some more, I discovered that once you 'load a module from the current board' (toolbar circled in red below) you can then 'create new library and save current module' 

Once the new library is saved, you can then import one of each module type (saving as you go - each time you load a new module you will lose the old one if not saved to the current library).  But there is a catch.

When you make a new library, it's not 'available' to the rest of your project.  So you need to switch to PCBnew and Preferences / Library you need to Add your newly created library.  Then you can switch back to the module editor, select your new library and the 'Active Library' and then continue to import and save modules from the PCB.

There isn't any filtering or removal of duplicate footprints in the module import tool.  If you have a five of 0805 resistors in your PCB you will presented with a list of 5 0805 modules to import - of course you only need one and thus you need to use wet-RAM to make sure you get the right number of modules imported.

Once you've finished importing modules, save the library and then fire up CVPCB.

Not So Portable

I've installed KiCAD on my laptop at home and my desktop at work.  My usual habit when working on projects is to email the latest version of my files to / from home / work.  It's not elegant but it works for me. 

With Altium, once you've finished your schematic, and imported all your footprints into a PCB you only need to transfer those files when working elsewhere.  For the case of the uCurrent I only need the one schematic and one pcb file.

KiCAD doesn't play like this.

I opened up my KiCAD schematic on my work desk top, and all my custom footprints are gone.  How the heck are you meant to share your work with others?  To me this looks like you need to share any and all libraries you make as well as the schematic and PCB files.  This is a big fail IMHO.

The fix was simple - get a copy of the library onto my work machine, add the library in preferences, restart Eechema and it's correct again.

Module Import

The next step was to link the modules with schematics.  To do this you run up Cvpcb and associate each part with a footprint.

Again, this is very different to how Altium does it.  In Altium you can associate a footprint with a library part, but not in KiCAD.  This introduces extra overhead, in that for each and every PCB you design you need to associate your parts to footprints manually.  In Altium you only need to do it once, but again, it's megabuck tool vs. free tool and this is far from a deal breaker with KiCAD.

Once I'd associated each part with a footprint, I built a new netlist in Eeschema, and the run the 'read netlist' tool in Pcbnew to synchronise the two, and I got the following result below...


After making a successful import, there are a few nets showing as incorrect / not connected.  But some thing looks weird here...

 The picture below shows pad between different parts as being connected by copper traces, and there's a rats nest showing that these parts need to be connected.  Wha?

What's Wrong?

Looking elsewhere on the board, the fault becomes obvious.  The nets in the picture below show as 'crossed over' and this is our clue.

Crossed Over Net

For non polarised parts (e.g. Resistors) you have two pins and pads, and when I placed these in Eeschema I have a 50 / 5 chance of getting it oriented in the same way as placed in the pcb.  The fix is to simply rotate the parts in the PCB re-import the netlist and you're done.

The last fix was to correct the pads for the banana plugs.  In Altium these are oval, but the import from PCAD turns them into round holes.  


I manually corrected the slots to match those in Altium and I removed all of EEVBlog's logos (as requested by Dave) and I'm done.

Final Verdict

KiCAD is a mixed bag, and the truth is coming into this project I really wanted to give KiCAD the thumbs up and take it up as my new design tool, and this project was to help convince me of this fact.

But, Altium has spolied me and I can't give it up.  There are still too many quirks with KiCAD that slow down my design and I can't get past that.  I'm not talking about the high powered features Alitum has that KiCAD doesn't (such as the list editor, or report information, signal integrity etc) but basic editor functions that are just munted.

  • Inconsistent interfaces between Eeschema and Pcbnew
  • Manual assignment of footprints to schematic parts - massive time overhead
  • The select tools in Pcbnew.  Right click, zoom, answer the crap pop up dialog (Each. And. Every. Time.) right click again and then select your action (block delete for example). FARK!
  • The fact you cant simply copy parts from schematics to libraries. 
  • Not embedding the parts in Eeschema.
That last point is a big deal breaker - I wanted to look at using KiCAD to make sharing my designs easier but if you only have the schematic and pcb files you may end up with a broken schematic.  How is this better than releasing a PDF of the schematic?

That said, I'm happy that I can make my designs useful for KiCAD users.  I'll export my PCB's to PCAD and release my schematics as PDFs, along with a set of gerbers.  

If you want to duplicate my designs, the Gerbers will let you make your own boards.  If you want to modify my designs, you're producing new schematics anyway, and if you import the PCAD file into KiCAD you get all my footprints.  WIN.

You can grab my KiCAD uCurrent files here:  KiCAD_uCurrent

Alitum is killer as I can set this up once in my OutJob file and create all these artifacts with a single button click.  Oh yeah, Altium spoils me!


  1. HI Simon, I am an Alitum user too ,now want to try Kicad. I know for PCB files, can save Alitum PCB file to P-CAD then import to Pcbnew of Kicad, is that right? So I wanna to know do you have any suggestions about convert schematic from Alitum to Kicad? Many thanks!

  2. This is great - can you include the Altium and intermediate P-CAD files with the kiCad 'tuned' result.
    That will allow others to follow your steps along the way.

  3. Hi Simon, as you say KiCad has many quirks. I struggled with issues of portability as you did. I took a different path by creating any new footprints inside the project structure and manually editing the files to point to those.
    It is still a cludge but it works for me.
    I have not been spoilt by altium and was going to look for another package until I discovered push and shove and the 3D viewer. I thought they were pretty cool for free.